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: crashes when built with Go at tip due to go/types.Sizes change #62191

Closed
babinin opened this issue Aug 19, 2023 · 2 comments
Closed
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@babinin
Copy link

babinin commented Aug 19, 2023

gopls version: v0.13.2 (devel go1.22-d63652b7c6 Thu Aug 17 16:48:35 2023 0000)
gopls flags:
update flags: proxy
extension version: 2023.8.1617
go version: devel 1.22-d63652b7c6
environment: Visual Studio Code - Insiders darwin
initialization error: undefined
issue timestamp: Sat, 19 Aug 2023 11:37:36 GMT
restart history:
Sat, 19 Aug 2023 11:37:20 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

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

goroutine 1490 [running]:
golang.org/x/tools/gopls/internal/lsp/cache.localPackageKey({{0x14000508cba, 0x6}, {0x14000508cba, 0x6}, {0x14000509270, 0x6}, {0x14000c86540, 0x1, 0x1}, {0x1037719a0, ...}, ...})
	  check.go:1402  0x528
golang.org/x/tools/gopls/internal/lsp/cache.(*packageHandleBuilder).buildPackageHandle(0x14001b1e810, {0x10319a900, 0x14001b32d70}, 0x140003a3360)
	  check.go:1090  0x234
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).getPackageHandles.func2.1()
	  check.go:891  0xb0
golang.org/x/sync/errgroup.(*Group).Go.func1()
	  errgroup.go:75  0x5c
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1456
	  errgroup.go:72  0x98
[Error - 14:37:21] 

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>

@findleyr
Copy link
Contributor

findleyr commented Aug 21, 2023

Hi, the current tip version of Go is incompatible with gopls@v0.13.2, due to #61035.

Can you please build gopls using Go 1.21.0?

In the meantime, I think we should perhaps consider releasing a gopls version that works with go@tip.

@findleyr findleyr changed the title gopls: automated issue report (crash) x/tools/gopls: crashes when built with Go at tip Aug 21, 2023
@findleyr findleyr transferred this issue from golang/vscode-go Aug 21, 2023
@findleyr findleyr changed the title x/tools/gopls: crashes when built with Go at tip x/tools/gopls: crashes when built with Go at tip due to StdSizes change Aug 21, 2023
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Aug 21, 2023
@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2023
@findleyr findleyr changed the title x/tools/gopls: crashes when built with Go at tip due to StdSizes change x/tools/gopls: crashes when built with Go at tip due to go/types.Sizes change Aug 21, 2023
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.14.0 Aug 21, 2023
@findleyr
Copy link
Contributor

findleyr commented Oct 9, 2023

This is fixed in gopls@tip, and so cutting the next release will resolve the problem when installing latest gopls.

@findleyr findleyr closed this as completed Oct 9, 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.
Projects
None yet
Development

No branches or pull requests

3 participants