-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: gopls crashes neovim #51643
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
Comments
neovim version? plugin version(s)? |
neovim version
I'm using latest nvim-lspconfig and nvim-lsp-installer to install
The lspinstaller is installing
If I run
|
Hi, I am not sure why (or how) gopls could cause neovim to crash, but perhaps we can eliminate some possibilities. Let's try switching to a daemonized gopls. This will both allow you to see any gopls crashes in your terminal, and eliminate memory pressure on the neovim subprocess. From a terminal, run:
And then configure neovim to invoke gopls with Now try your repro again. Does neovim crash? Do you see the connection at your gopls daemon? |
Thanks for the reply @findleyr!
So I added
|
That sounds to me like the gopls process is being OOM-killed. Does this particular computer have any settings that would lead to OOM-killing? How much memory does gopls use before it is terminated? |
No, my memory is 16GB and gopls consume like 0.2% memory the entire time according to |
I think this is related to #51383 |
Hmm, I am not sure. Looking at that bug, I believe I know where the error message is coming from, and it shouldn't cause a crash. In general, gopls crashes will have an associated stack trace, which is why I guessed that it is being killed. Can you use |
Very weird, |
This is really strange. I'm not sure how to proceed. Without more information on why the process crashed, there's not much to go on. What is the process exit code? |
The exitcode is 130 Edit: Sorry I'm not quite sure about the exit code, neovim shows: |
That's strange, as that's (apparently) SIGINT. Gopls doesn't SIGINT itself (and even if it did this wouldn't cause neovim to crash). Since we can't reproduce, and don't know why the process is existing, I'm not sure what we can do on our end. If you can figure out what is causing the process to exit, please let us know. |
@findleyr Hello, I managed to find the root cause of this problem. It's because I installed go using
I also want to add that If only you can try out installing |
Here is the
|
Whenever I type
package main
and press enter on neovim, it will just crash to command line. It happens only on one of my machine though so it's very weird. I tried reinstalling go but it's still happening. Here's the log when I rungopls -rpc.trace -v check main.go
:Also I'm using aqua to install go.
Build info
The text was updated successfully, but these errors were encountered: