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: panic in KnownPackages #35606

Closed
muirdm opened this issue Nov 15, 2019 · 2 comments
Closed

x/tools/gopls: panic in KnownPackages #35606

muirdm opened this issue Nov 15, 2019 · 2 comments
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.
Milestone

Comments

@muirdm
Copy link

muirdm commented Nov 15, 2019

I'm seeing the below panic sometimes.

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

goroutine 110092 [running]:
golang.org/x/tools/internal/lsp/cache.(*snapshot).KnownPackages(0xc0733632c0, 0x19b32c0, 0xc089a94c90, 0x18, 0xa0d9148a631f54a5, 0xc04688d360)
	/Users/muir/projects/tools/internal/lsp/cache/snapshot.go:147 +0x393
golang.org/x/tools/internal/lsp/source.(*IdentifierInfo).implementations(0xc07b0c9b00, 0x19b32c0, 0xc089a94c90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/muir/projects/tools/internal/lsp/source/implementation.go:113 +0x12b
golang.org/x/tools/internal/lsp/source.(*IdentifierInfo).Implementation(0xc07b0c9b00, 0x19b32c0, 0xc089a94c90, 0xc00037e000, 0x56f09f0, 0xc00066a080, 0x402c000000000000, 0x4014000000000000)
	/Users/muir/projects/tools/internal/lsp/source/implementation.go:23 +0x5d
golang.org/x/tools/internal/lsp.(*Server).implementation(0xc000287080, 0x19b32c0, 0xc089a94c90, 0xc089a94d50, 0xc089a94d50, 0x0, 0x0, 0x0, 0xc07b217600)
	/Users/muir/projects/tools/internal/lsp/implementation.go:26 +0x1a4
golang.org/x/tools/internal/lsp.(*Server).Implementation(0xc000287080, 0x19b32c0, 0xc089a94c90, 0xc089a94d50, 0xc089a94d50, 0x0, 0x0, 0xc07dd49bf8, 0x1046f6c)
	/Users/muir/projects/tools/internal/lsp/server.go:185 +0x4d
golang.org/x/tools/internal/lsp/protocol.serverHandler.Deliver(0x19cc840, 0xc000287080, 0x19b32c0, 0xc089a94c90, 0xc042edf340, 0xc089a94c00, 0xc07b2301e0)
	/Users/muir/projects/tools/internal/lsp/protocol/tsserver.go:201 +0x4b0e
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run.func1(0xc07a1c4a80, 0xc042edf340, 0xc0002870e0, 0x19b32c0, 0xc089a94c90, 0x0, 0x0, 0xc01bc1dda0)
	/Users/muir/projects/tools/internal/jsonrpc2/jsonrpc2.go:370 +0x170
created by golang.org/x/tools/internal/jsonrpc2.(*Conn).Run
	/Users/muir/projects/tools/internal/jsonrpc2/jsonrpc2.go:354 +0x877
@gopherbot gopherbot added this to the Unreleased milestone Nov 15, 2019
@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 Nov 15, 2019
@gopherbot
Copy link

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot
Copy link

Change https://golang.org/cl/207346 mentions this issue: internal/lsp: fix panic when logging errors in snapshot.KnownPackages

@golang golang locked and limited conversation to collaborators Nov 14, 2020
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

2 participants