-
Notifications
You must be signed in to change notification settings - Fork 273
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
Fails to recover from lsp server dying; only "broken pipe" errors #320
Comments
It looks like this prevents even |
Thanks for the fix, seems to have made things a lot better. |
I think I am seeing the same issue
|
Might be due to rust-lang/rls#783 (though I have seen these errors in LanguageClient.log without seeing the error in rust-lang/rls#783 LanguageServer.log) |
I think I have a backtrace for this issue. LanguageClient.log
The LanguageServer.log
|
What's the current status of this ticket? My best guess is that automatic reconnection is still a feature request?
I read the latest LanguageClient.txt help text and didn't see anything about automatic restarts. (I'm asking in case I missed a setting) The most recent commit (f494...) looks like it just fixes a bug in stopping the language server
Never mind, I saw " Hackish fix to hide QuickFix errors immediately after language server dies
" (Limitation: This will also hide quickFix errors from other sources)
augroup LanguageClient_config
autocmd!
" other commands can go here
" Discard all errors in the QuickFix window if the language server stops or crashes
autocmd User LanguageClientStopped call setqflist([])
augroup end |
I would like to help implement this. @autozimu can you maybe guide me to the places I should modify to have the client restart the server automatically? |
You can check LanguageClient-neovim/src/languageclient.rs Lines 2871 to 2890 in f736b52
The tricky parts are two fold
|
Thanks! I'll take a look at it during the week |
Closing via #1113 |
It looks like if the LSP that the plugin has connected to dies for any reason, then
LanguageClient-neovim
does not detect this error case, and just spews "broken pipe" errors until the language support is restarted. I would instead expect the plugin to detect this error case and automatically connect to a new LSP.I was able to reproduce this across a couple of different environments/languages. I first noticed it with an in-house language/LSP at work (which for reasons I won't go into loves to restart itself). Sadly this one is not public right now so I can't link that one, but I was able to reproduce exactly the same behaviour with rls using
kilall rls
to simulate a crash.I've gone ahead and filled out the below for the nvim/rls case, though this is quite easy to reproduce.
nvim main.rs
K
(hover), no error.killall rls
to simulate an LSP crash.K
again (or any other LSP action), get onlyBroken pipe (os error 32)
which the plugin fails to recover from./tmp/LanguageServer.log
: empty/tmp/LanguageClient.log
: quite long, here's the relevant bit at the end (can include the whole thing if you want, though again this is quite easy to reproduce):The text was updated successfully, but these errors were encountered: