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
x/tools/gopls: v0.4.4 stops working after some period of time #40567
Comments
You should provide some more detail. What Go version? What were you doing? How can the developers reproduce this issue? |
Not the OP, but here are some of my measurements. Opening
Same things with
I'm opening
UPD: Here are the numbers from the
|
@ainar-g: What is your workspace root when you open these files? Is it the module root or a subdirectory? |
@stamblerre That doesn't seem to matter much. Using the same
$ ps -opid,cmd,rss,vsize -p $(pgrep gopls) PID CMD RSS VSZ 234017 gopls serve 225928 1519328 Launching Vim from project root: $ ps -opid,cmd,rss,vsize -p $(pgrep gopls) PID CMD RSS VSZ 234276 gopls serve 228060 1445404 |
The reason I ask is that |
Can confirm, opening from the module root with |
Glad that resolved it! @404CN: Please follow the steps in the troubleshooting guide and provide the relevant information so we can investigate. |
we have mono repo and single module. I had to revert to gopls/v0.4.3 due to excessive memory usage. It went up 16 GB from 1,5GB UPDATE: quick test again. It is ( gopls/v0.4.3) 781MB vs. (gopls@v0.4.4) 3.80 GB ( Real Mem 2,50 GB) Any suggestion for mono repo? |
@ilkeraksu: Thanks for the report. This is something we didn't really consider when making this change. I think for v0.4.5, we will add a setting that users working in larger modules can configure to limit their workspace scope. |
Change https://golang.org/cl/247617 mentions this issue: |
@ilkeraksu: You should now be able to update to "gopls": {
"expandWorkspaceToModule": false
} |
@stamblerre Thank you for quick fix. this setting prevented execessive usage ( otherwise computer went crazy ) Maybe another issue, I would like to elaborate our usage for understanding,
Usually we work on 2-3 services at once so Of course we have 5-6 utility kind, supporting packages always used (imported) in almost every where ( like errors, logging etc) |
Thanks for the clarification - that makes sense. This new configuration should work for your use case. I'm not sure what would've changed to cause features to stop working. Can you please attach your |
Hi @stamblerre , These are logs when I typed dev.P expecting complete methods . Typed 1 seconds apart each key. |
@ilkeraksu: Do you mind providing a log that starts at the time that |
Hi @stamblerre , most of the time I tried e.E and dev.P . These packages were already imported. Hope this helps, |
Change https://golang.org/cl/248400 mentions this issue: |
I did find one issue, which will be fixed in https://golang.org/cl/248400, but I didn't notice anything that stood out to me in your logs. Do you have a repro case possibly? When completion stops working, is it in all cases or only some? Do other features stop working too? |
Noticed this as part of investigating golang/go#40567. Change-Id: I977b1b0a6ceb139e35e087c16b6ab88d66af69a9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/248400 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Looks like problem arise under stress, with 0.4.3, I don't have this issue with 0.4.4, Under CPU and Memory stress. (zooom open) I have problem with 0.4.4 no CPU stress, zoom closed, no problem. When problem happens other features seem to work, like going definition or hover can show func signature we may have some kind of timeout problem ( my two cents) |
To clarify, when you say |
With 0.4.4 I mean master with expandWorkspaceToModule set to false. |
Thanks for clarifying. It might be easier to understand if you can produce a smaller log that demonstrates the issue. @heschik also mentioned that the issue may be related to your Dropbox workspace folder, but if the issue doesn't reproduce with v0.4.3 that might not be a likely explanation. Still, it may be worth checking if you can link the issue back to a specific one of your workspace folders, since there are many. |
Closing as this is in the WaitingForInfo state and |
gopls 0.4.4 consumes tons of memory!
And it killed my computer.
The text was updated successfully, but these errors were encountered: