Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs freezes, seemingly when attempting to send data to HLS #191

Open
byorgey opened this issue Dec 9, 2024 · 0 comments
Open

Emacs freezes, seemingly when attempting to send data to HLS #191

byorgey opened this issue Dec 9, 2024 · 0 comments

Comments

@byorgey
Copy link

byorgey commented Dec 9, 2024

I am having an issue where for certain .hs files, emacs consistently freezes after they have been open for a few seconds. I cannot get emacs unstuck with Ctrl-G; the only way to get it unstuck is to kill it or at least send it a SIGUSR2.

When emacs freezes, sending it SIGUSR2 produces a trace like the following (the trace always looks very similar to this). Happy to provide any additional information or carry out any recommended debugging steps.

  process-send-string(#<process lsp-haskell> "Content-Length: 64\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$...")
  #f(compiled-function (process message) #<bytecode 0x1fd20b4909e61763>)(#<process lsp-haskell> (:jsonrpc "2.0" :method "$/cancelRequest" :params (:id 45)))
  apply(#f(compiled-function (process message) #<bytecode 0x1fd20b4909e61763>) #<process lsp-haskell> (:jsonrpc "2.0" :method "$/cancelRequest" :params (:id 45)))
  lsp-process-send(#<process lsp-haskell> (:jsonrpc "2.0" :method "$/cancelRequest" :params (:id 45)))
  lsp--send-no-wait((:jsonrpc "2.0" :method "$/cancelRequest" :params (:id 45)) #<process lsp-haskell>)
  #f(compiled-function (it) #<bytecode -0x1b141d6c1beff8af>)(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 21/21 0x18eee560b415> :registered-server-capabilities nil :root "/home/brent/projects/swarm" :client #s(lsp--client :language-id "haskell" :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x21d182a32f08a07>) :test? #f(compiled-function () #<bytecode 0x18182831b02c6d09>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x18eee52170f1> :request-handlers #<hash-table equal 0/65 0x18eee521731f> :response-handlers #<hash-table eql 3/65 0x18eee5218a9b> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x18eee5218abb> :action-handlers #<hash-table equal 0/65 0x18eee5218f0d> :action-filter lsp-haskell--action-filter :major-modes (haskell-mode haskell-literate-mode haskell-tng-mode haskell-cabal-mode haskell-ts-mode) :activation-fn nil :priority 0 :server-id lsp-haskell :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x18eee5219323> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections ("haskell")) :host-root nil :proc #<process lsp-haskell> :cmd-proc #<process lsp-haskell> :buffers (#<buffer Types.hs> #<buffer Context.hs>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x18eee54ab767> :watches #<hash-table equal 0/65 0x18eee54ab995> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x18eee54ab9b5> :work-done-tokens #<hash-table equal 0/65 0x18eee550586b>))
  lsp--send-notification((:jsonrpc "2.0" :method "$/cancelRequest" :params (:id 45)))
  lsp-notify("$/cancelRequest" (:id 45))
  #f(compiled-function (it) #<bytecode 0x8a1908cc2553771>)(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 21/21 0x18eee560b415> :registered-server-capabilities nil :root "/home/brent/projects/swarm" :client #s(lsp--client :language-id "haskell" :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x21d182a32f08a07>) :test? #f(compiled-function () #<bytecode 0x18182831b02c6d09>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x18eee52170f1> :request-handlers #<hash-table equal 0/65 0x18eee521731f> :response-handlers #<hash-table eql 3/65 0x18eee5218a9b> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x18eee5218abb> :action-handlers #<hash-table equal 0/65 0x18eee5218f0d> :action-filter lsp-haskell--action-filter :major-modes (haskell-mode haskell-literate-mode haskell-tng-mode haskell-cabal-mode haskell-ts-mode) :activation-fn nil :priority 0 :server-id lsp-haskell :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x18eee5219323> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections ("haskell")) :host-root nil :proc #<process lsp-haskell> :cmd-proc #<process lsp-haskell> :buffers (#<buffer Types.hs> #<buffer Context.hs>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x18eee54ab767> :watches #<hash-table equal 0/65 0x18eee54ab995> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x18eee54ab9b5> :work-done-tokens #<hash-table equal 0/65 0x18eee550586b>))
  lsp--cancel-request(45)
  lsp-cancel-request-by-token(:eldoc-hover)
  lsp--send-request-async((:jsonrpc "2.0" :method "textDocument/hover" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4))) #f(compiled-function (input0) #<bytecode 0x12baa7473c34bcf9>) tick ignore nil nil :eldoc-hover)
  lsp-request-async("textDocument/hover" (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) #f(compiled-function (input0) #<bytecode 0x12baa7473c34bcf9>) :error-handler ignore :mode tick :cancel-token :eldoc-hover)
  lsp-eldoc-function(#f(compiled-function (string &rest plist) #<bytecode 0x138508dae21a79a6>))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>()
  apply(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> nil)
  timer-event-handler([t 0 0 500000 nil #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> nil idle 0 nil])
  process-send-string(#<process lsp-haskell> "Content-Length: 214\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"...")
  #f(compiled-function (process message) #<bytecode 0x1fd20b4909e61763>)(#<process lsp-haskell> (:jsonrpc "2.0" :method "textDocument/documentHighlight" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) :id 54))
  apply(#f(compiled-function (process message) #<bytecode 0x1fd20b4909e61763>) #<process lsp-haskell> (:jsonrpc "2.0" :method "textDocument/documentHighlight" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) :id 54))
  lsp-process-send(#<process lsp-haskell> (:jsonrpc "2.0" :method "textDocument/documentHighlight" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) :id 54))
  lsp--send-no-wait((:jsonrpc "2.0" :method "textDocument/documentHighlight" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) :id 54) #<process lsp-haskell>)
  #f(compiled-function (workspace) #<bytecode 0x6987de46e58b218>)(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 21/21 0x18eee560b415> :registered-server-capabilities nil :root "/home/brent/projects/swarm" :client #s(lsp--client :language-id "haskell" :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x21d182a32f08a07>) :test? #f(compiled-function () #<bytecode 0x18182831b02c6d09>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x18eee52170f1> :request-handlers #<hash-table equal 0/65 0x18eee521731f> :response-handlers #<hash-table eql 3/65 0x18eee5218a9b> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x18eee5218abb> :action-handlers #<hash-table equal 0/65 0x18eee5218f0d> :action-filter lsp-haskell--action-filter :major-modes (haskell-mode haskell-literate-mode haskell-tng-mode haskell-cabal-mode haskell-ts-mode) :activation-fn nil :priority 0 :server-id lsp-haskell :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x18eee5219323> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections ("haskell")) :host-root nil :proc #<process lsp-haskell> :cmd-proc #<process lsp-haskell> :buffers (#<buffer Types.hs> #<buffer Context.hs>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x18eee54ab767> :watches #<hash-table equal 0/65 0x18eee54ab995> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x18eee54ab9b5> :work-done-tokens #<hash-table equal 0/65 0x18eee550586b>))
  mapc(#f(compiled-function (workspace) #<bytecode 0x6987de46e58b218>) (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 21/21 0x18eee560b415> :registered-server-capabilities nil :root "/home/brent/projects/swarm" :client #s(lsp--client :language-id "haskell" :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x21d182a32f08a07>) :test? #f(compiled-function () #<bytecode 0x18182831b02c6d09>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x18eee52170f1> :request-handlers #<hash-table equal 0/65 0x18eee521731f> :response-handlers #<hash-table eql 3/65 0x18eee5218a9b> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x18eee5218abb> :action-handlers #<hash-table equal 0/65 0x18eee5218f0d> :action-filter lsp-haskell--action-filter :major-modes (haskell-mode haskell-literate-mode haskell-tng-mode haskell-cabal-mode haskell-ts-mode) :activation-fn nil :priority 0 :server-id lsp-haskell :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x18eee5219323> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections ("haskell")) :host-root nil :proc #<process lsp-haskell> :cmd-proc #<process lsp-haskell> :buffers (#<buffer Types.hs> #<buffer Context.hs>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x18eee54ab767> :watches #<hash-table equal 0/65 0x18eee54ab995> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x18eee54ab9b5> :work-done-tokens #<hash-table equal 0/65 0x18eee550586b>)))
  seq-do(#f(compiled-function (workspace) #<bytecode 0x6987de46e58b218>) (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 21/21 0x18eee560b415> :registered-server-capabilities nil :root "/home/brent/projects/swarm" :client #s(lsp--client :language-id "haskell" :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x21d182a32f08a07>) :test? #f(compiled-function () #<bytecode 0x18182831b02c6d09>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x18eee52170f1> :request-handlers #<hash-table equal 0/65 0x18eee521731f> :response-handlers #<hash-table eql 3/65 0x18eee5218a9b> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x18eee5218abb> :action-handlers #<hash-table equal 0/65 0x18eee5218f0d> :action-filter lsp-haskell--action-filter :major-modes (haskell-mode haskell-literate-mode haskell-tng-mode haskell-cabal-mode haskell-ts-mode) :activation-fn nil :priority 0 :server-id lsp-haskell :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x18eee5219323> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections ("haskell")) :host-root nil :proc #<process lsp-haskell> :cmd-proc #<process lsp-haskell> :buffers (#<buffer Types.hs> #<buffer Context.hs>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x18eee54ab767> :watches #<hash-table equal 0/65 0x18eee54ab995> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x18eee54ab9b5> :work-done-tokens #<hash-table equal 0/65 0x18eee550586b>)))
  lsp--send-request-async((:jsonrpc "2.0" :method "textDocument/documentHighlight" :params (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) :id 54) lsp--document-highlight-callback tick nil nil nil :highlights)
  lsp-request-async("textDocument/documentHighlight" (:textDocument (:uri "file:///home/brent/projects/swarm/src/swarm-lang/S...") :position (:line 80 :character 4)) lsp--document-highlight-callback :mode tick :cancel-token :highlights)
  lsp--document-highlight()
  lsp--on-idle(#<buffer Types.hs>)
  apply(lsp--on-idle #<buffer Types.hs>)
  timer-event-handler([t 0 0 500000 nil lsp--on-idle (#<buffer Types.hs>) idle 0 nil])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant