Skip to content
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.14.2 crashes with an Error #64267

Closed
raghvenders opened this issue Nov 19, 2023 · 5 comments
Closed

x/tools/gopls: v0.14.2 crashes with an Error #64267

raghvenders opened this issue Nov 19, 2023 · 5 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@raghvenders
Copy link
Contributor

gopls version

Build info
----------
golang.org/x/tools/gopls v0.14.2
    golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/mod@v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
    golang.org/x/sync@v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
    golang.org/x/sys@v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
    golang.org/x/telemetry@v0.0.0-20231114163143-69313e640400 h1:brbkEFfGwNGAEkykUOcryE/JiHUMMJouzE0fWWmz/QU=
    golang.org/x/text@v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
    golang.org/x/tools@v0.14.1-0.20231114185516-c9d3e7de13fd h1:Oku7E+OCrXHyst1dG1z10etCTxewCHXNFLRlyMPbh3w=
    golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
    honnef.co/go/tools@v0.4.5 h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: devel go1.22-d6ef98b8fa Thu Nov 16 05:53:55 2023 +0000

go env

GOVERSION=devel go1.22-d6ef98b8fa Thu Nov 16 05:53:55 2023 +0000
GOHOSTARCH=amd64
GOHOSTOS=windows

What did you do?

go install golang.org/x/tools/gopls@latest based on IDE extensions recommendation

What did you expect to see?

Gopls in a working condition.

What did you see instead?

[Error - 4:23:41 PM] Client gopls: connection to server is erroring. Shutting down server. [Error - 4:23:43 PM] Stopping server timed out [Error - 4:23:43 PM] Stopping server failed Error: Stopping the server timed out at c:\Users\R\.vscode\extensions\golang.go-0.40.0\dist\goMain.js:21721:19 [Error - 4:23:44 PM] Client gopls: connection to server is erroring. Shutting down server. [Error - 4:23:44 PM] Client gopls: connection to server is erroring. Shutting down server. [Error - 4:23:44 PM] Client gopls: connection to server is erroring. Shutting down server. [Error - 4:23:44 PM] Client gopls: connection to server is erroring. Shutting down server.

Editor and settings

No Custom Settings

Logs

@raghvenders raghvenders added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Nov 19, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 19, 2023
@raghvenders
Copy link
Contributor Author

I revert to v0.14.1, which is working fine.

@findleyr
Copy link
Contributor

Hi, very little code changed between gopls@v0.14.1 and v0.14.2 -- we just upgraded the x/telemetry dependency. Could you please help us investigate this failure on your end?

Since your error is not revealing, can you connect to a gopls daemon instance?

In your terminal:

go run golang.org/x/tools/gopls@latest -listen=localhost:8091

And then from your editor, start gopls with -remote=localhost:8091.

What do you see in your terminal? Does the gopls instance crash? Is the process busy?

@findleyr
Copy link
Contributor

@raghvenders since we can't reproduce and the error message does not include a stack trace from gopls, we don't have much to go on. Unless you or someone else experiencing a similar issue can help us debug, this will be difficult to figure out.

It is of course concerning that v0.14.2 is not working for you. If you could help us investigate, it would be greatly appreciated. Thanks.

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 20, 2023
@raghvenders
Copy link
Contributor Author

raghvenders commented Nov 20, 2023

THanks @findleyr. By the way, The above error message that I mentioned was from gopls(server) stack when Go extension for vscode recommends gopls v14.2. After update, I was not able to LSP operations like method navigation or so. Even after I restarted my IDE, I encountered the same error. Hence I downgraded it to v0.14.1

However when I tried to reproduce it now i tried to upgrade it to through Go for vs code , recommendations - v0.14.2 and did install, now I have not encountered the issue. I will keep monitoring it though.

Help to track more : By the way , I did half way in your thing, starting gopls server with go run. However I don't know how to start modify gopls client in editor like this - -remote=localhost:8091 as I don't find relevant gopls flag. Kindly help on this.

@findleyr
Copy link
Contributor

@raghvenders thanks so much for testing again! It's possible you may have hit a problem while upgrading.

To set the -remote flag, pass it to "go.languageServerFlags" in settings.json.
More info: https://github.com/golang/vscode-go/blob/master/docs/troubleshooting.md#collect-gopls-information

Let us know if you encounter this again.

@raghvenders raghvenders closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants