Skip to content

gopls: automated issue report (crash) #63701

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

Closed
MrSutra opened this issue Oct 20, 2023 · 10 comments
Closed

gopls: automated issue report (crash) #63701

MrSutra opened this issue Oct 20, 2023 · 10 comments
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@MrSutra
Copy link

MrSutra commented Oct 20, 2023

gopls version: v0.13.2 (go1.21.0)
gopls flags: -logfile /home/user/gopls.log -rpc.trace
update flags: off
extension version: 0.39.1-upstream-0.1.9-uber
go version: 1.21.3
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Fri, 20 Oct 2023 19:58:27 GMT
restart history:
Fri, 20 Oct 2023 17:50:42 GMT: activation (enabled: true)
Fri, 20 Oct 2023 19:57:05 GMT: manual (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Error while running bazel run :e2eon eatscouriercppplcpluscardunauthorized integration test.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbe718b]

goroutine 1735 [running]:
golang.org/x/tools/gopls/internal/lsp/cache.localPackageKey({{0xc000dfc720, 0x26}, {0xc000d57425, 0xb}, {0xc000d57420, 0x5}, {0xc000b64b40, 0x2, 0x2}, {0xc000b64b60, ...}, ...})
	  check.go:1402  0x6eb
golang.org/x/tools/gopls/internal/lsp/cache.(*packageHandleBuilder).buildPackageHandle(0xc002c7d290, {0x1161940, 0xc0007d9540}, 0xc003839b80)
	  check.go:1090  0x2be
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).getPackageHandles.func2.1()
	  check.go:891  0xd7
golang.org/x/sync/errgroup.(*Group).Go.func1()
	  errgroup.go:75  0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1486
	  errgroup.go:72  0x96
[Error - 7:58:13 PM] 

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@ansaba ansaba added the gopls Issues related to the Go language server, gopls. label Oct 23, 2023
@ansaba ansaba transferred this issue from golang/vscode-go Oct 23, 2023
@ansaba ansaba added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 23, 2023
@adonovan adonovan reopened this Oct 23, 2023
@adonovan adonovan self-assigned this Oct 23, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/537118 mentions this issue: go/packages: ensure that types.Sizes is correct

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/537255 mentions this issue: go/types: fix (*T)(nil)-to-interface conversion bug

gopherbot pushed a commit that referenced this issue Oct 24, 2023
A nil *gcSizes pointer should be converted to a nil Sizes interface.

Updates #63701

Change-Id: I62e00fecf303ce0ae529f1a75c14c7ef2576a58f
Reviewed-on: https://go-review.googlesource.com/c/go/+/537255
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
@findleyr
Copy link
Member

findleyr commented Oct 26, 2023

Hi, we just realized that you are probably using a GOPACKAGESDRIVER provided by Uber. Can you please confirm that this is the case? If so, we understand the breakage, and can fix it properly.

echo $GOPACKAGESDRIVER

@adonovan
Copy link
Member

If that is indeed the cause, then it may also be a simple matter of updating your driver to avoid this issue. I assume you're using the Bazel driver, which was updated 2 months ago to set the necessary fields: bazel-contrib/rules_go@6e10f8c

@findleyr
Copy link
Member

BTW, if folks at Uber are willing to share more about their custom environment, it might help us support it better (CC @kchristi111, who also encountered this issue while using extension version 0.39.1-upstream-0.1.9-uber). We'd be happy to connect.

@findleyr
Copy link
Member

This should be fixed in v0.14.1-pre.1 (on v0.14.0 there is a workspace error message instead of a panic).

go install golang.org/x/tools/[email protected]

Could anyone here please try that out to confirm? With your confirmation, we will release v0.14.1 tomorrow.

@JamyDev
Copy link

JamyDev commented Dec 19, 2023

Hey @findleyr, I'd love to share more about our setup. In this case we did just manually add the old sizes fields back with some bash-fu in our external driver. At the time of the change from Sizes to Arch/Compiler we were still stuck on 0.11.

Additionally, feel free to tag me in any of the issues emitted by the -uber extension!

@findleyr
Copy link
Member

Thanks, @JamyDev. Am I understanding correctly that you are now off of v0.11? Are you on v0.14.2?

@JamyDev
Copy link

JamyDev commented Dec 19, 2023

@findleyr we're in the process of upgrading.

@findleyr
Copy link
Member

@JamyDev I'd hope that you experience significantly decreased memory usage in recent versions. Please let us know if that's not the case, or any other issues you encounter.

@golang golang locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants