-
Notifications
You must be signed in to change notification settings - Fork 271
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
Neovim hangs after LSP aborts mid-completion #1169
Comments
Yep, I could reproduce. Just a minor correction though, the server is not crashing, it just isn't replying. If you wait long enough (60 seconds) the request will time out and it will recover. But indeed, the client is looping here LanguageClient-neovim/autoload/LanguageClient.vim Line 1106 in 4037b1d
I'm looking into this to see if we can get rid of that runSync call and invoke completion in a more async way |
Thanks, removing that blocking call would indeed be a welcome change. I'll test that branch myself locally as well today, if I get the chance. |
Just a note that I have never witnessed neovim return to a usable state after an LS hang, even after waiting well past the specified sixty seconds (which imho is already too generous). |
:checkhealth LanguageClient
? yesDescribe the bug
Due to an upstream
rust-analyzer
bug, the language server was crashing in the middle of a call. Here is the LC log reporting the LSP output and confirming the abort:Of course, that isn't LanguageClient's problem at all. The problem is that this ultimately causes Neovim itself to hang, completely unresponsive (
killall -9 languageclient
does not help).I have LC installed and integrated into neovim via ncm2, and the completion was triggered by
<c-x><c-o>
. Attaching a debugger to neovim reveals that is hanging waiting on libuv to return from anepoll
call, after a call toLanguageClient_runSync(...)
:Environment
neovim/vim version (
nvim --version
orvim --version
): NVIM v0.5.0-dev+918-g4383c0f95This plugin version (
git rev-parse --short HEAD
): 4037b1dThis plugin's binary version (
bin/languageclient --version
): 0.1.160Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
reproduce the issue. Refer to an example [here][min-vimrc.vim]): n/a, dependent on upstream bug
Language server link and version: rust-analyzer 277488b
To Reproduce
Try completing rust code that triggers a panic in rust-analyzer:
Current behavior
rust-analyzer crashes and neovim hangs.
Expected behavior
Neovim should not hang.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: