lsp-mode icon indicating copy to clipboard operation
lsp-mode copied to clipboard

rust-analyzer crashes from tramp lsp-mode

Open buzmeg opened this issue 2 years ago • 2 comments

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [X] You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

When attempting to open a file via tramp, the remote rust-analyzer crashes with error:

% cat rust-analyzer-remote-1-stderr
[ERROR rust_analyzer] Unexpected error: expected initialize request, got error: receiving on an empty and disconnected channel
expected initialize request, got error: receiving on an empty and disconnected channel

Steps to reproduce

$ emacs -q -l lsp-start-rust-analyzer.txt /ssh:[email protected]:rust/rs-daplink/src/main.rs

lsp-start-rust-analyzer.txt included below: lsp-start-rust-analyzer.txt

Expected behavior

rust-analyzer not crashing

Which Language Server did you use?

rust-analyzer

OS

Linux

Error callstack

No response

Anything else?

No response

buzmeg avatar Apr 26 '22 03:04 buzmeg

I get the same issue. When I try to troubleshoot by setting lsp-log-io to t, the server does not immediately crash. Instead, I get an error LSP :: Error from the Language Server: waiting for cargo metadata or cargo check (Unknown error) and then it hangs.

patmryan avatar May 09 '22 23:05 patmryan

Me either with exactly same log reported by @patmryan, and it succeed to connect from time to time. Strange. :thinking:

ileixe avatar Jun 09 '22 08:06 ileixe

i'm also having this problem. is there a way around, perhaps running rust-analyzer locally rather than remotely?

gcohara avatar Sep 28 '22 12:09 gcohara

@gcohara, which Emacs version are you on? Also do you use the latest Tramp from elpa as well?

kiennq avatar Sep 28 '22 12:09 kiennq

Emacs version 28.1, TRAMP version 2.5.2.28.1

gcohara avatar Sep 28 '22 13:09 gcohara

I met the exact same problem.

GNU Emacs 28.1 (build 1, x86_64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2022-08-29 TRAMP version 2.5.2.28.1

cosven avatar Oct 14 '22 06:10 cosven

i'm also having this problem.

Meigumikato avatar Dec 13 '22 03:12 Meigumikato

Same here... intermittently.

GNU Emacs 30.0.50 (built from source), tramp 2.7.0-pre. Arch Linux x86_64

sp1ff avatar May 13 '23 19:05 sp1ff