Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

x/tools/gopls: automated issue report (crash) #40449

Closed
matthewmueller opened this issue Jul 28, 2020 · 2 comments
Closed

x/tools/gopls: automated issue report (crash) #40449

matthewmueller opened this issue Jul 28, 2020 · 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

@matthewmueller
Copy link

Describe what you observed.

I had another script delete and regenerate this Go project. When the contents of the directory refreshed, gopls crashed.

Stack Trace

[Info  - 11:39:52 AM] 2020/07/28 11:39:52 go/packages.Load
	snapshot=9
	package_path="github.com/test/test"
	files=[/Users/m/Go/src/github.com/test/test/main.go]

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

goroutine 8258 [running]:
golang.org/x/tools/internal/lsp/cache.tempModFile.func2(0xc0091a4d18, 0xc0091a4d10)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/cache/view.go:208 +0x37
golang.org/x/tools/internal/lsp/cache.tempModFile(0x1a6c180, 0xc00718bea0, 0x1a6c180, 0xc00718bef0, 0x1fe0598, 0x0, 0x0, 0x1a560e0, 0xc0052bf800)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/cache/view.go:217 +0x59b
golang.org/x/tools/internal/lsp/cache.(*View).populateProcessEnv(0xc000159080, 0x1a683c0, 0xc0052bec90, 0x1a6c180, 0xc00718bea0, 0x1a6c180, 0xc00718bef0, 0x0, 0xc00cc3b9e0, 0x203001)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/cache/view.go:478 +0x148
golang.org/x/tools/internal/lsp/cache.(*View).RunProcessEnvFunc(0xc000159080, 0x1a683c0, 0xc0052bec90, 0xc00718be50, 0x0, 0x0)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/cache/view.go:391 +0xf4
golang.org/x/tools/internal/lsp/source.AllImportsFixes(0x1a683c0, 0xc0052bec90, 0x1a7b400, 0xc0074cc900, 0x1a6c1c0, 0xc0076efc20, 0xc0002d4f00, 0xc000298640, 0x5, 0x5, ...)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/source/format.go:83 +0x2d5
golang.org/x/tools/internal/lsp.(*Server).codeAction(0xc000294e00, 0x1a68300, 0xc007224c80, 0xc0084bc100, 0xc0084bc100, 0x0, 0x0, 0x0, 0xc0072bca50)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/code_action.go:82 +0x158b
golang.org/x/tools/internal/lsp.(*Server).CodeAction(0xc000294e00, 0x1a68300, 0xc007224c80, 0xc0084bc100, 0xc0084bc100, 0x0, 0x0, 0x1a66980, 0xc000130140)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/server_gen.go:12 +0x4d
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1a68300, 0xc007224c80, 0x1a82780, 0xc000294e00, 0xc0052beba0, 0x1a68540, 0xc007224b40, 0x0, 0x0, 0xbfc01a971741a4d0)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/protocol/tsserver.go:311 +0x1c8a
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1a68300, 0xc007224c80, 0xc0052beba0, 0x1a68540, 0xc007224b40, 0x0, 0x0)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1a68300, 0xc007224c80, 0xc0052beba0, 0x1a68540, 0xc007224b40, 0x0, 0x0)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/lsp/lsprpc/lsprpc.go:509 +0x40e
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1a68300, 0xc007224c80, 0xc0077b7880, 0x1a68540, 0xc007224b40, 0xc00031c000, 0xc0019ad7b8)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/jsonrpc2/handler.go:35 +0xd3
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc00cb749c0, 0xc005605140, 0xc000281770, 0x1a68300, 0xc007224c80, 0xc0077b7880, 0x1a68540, 0xc007224b40)
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/m/Go/pkg/mod/golang.org/x/tools@v0.0.0-20200708181441-6004c8539734/internal/jsonrpc2/handler.go:100 +0x171
[Error - 11:41:48 AM] Connection to server got closed. Server will not be restarted.
[Error - 11:41:48 AM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/main.js:904:25)
	at Object.dispose (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-languageclient/lib/client.js:74:35)
	at LanguageClient.handleConnectionClosed (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-languageclient/lib/client.js:2309:42)
	at LanguageClient.handleConnectionClosed (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-languageclient/lib/main.js:155:15)
	at closeHandler (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-languageclient/lib/client.js:2296:18)
	at CallbackList.invoke (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/events.js:121:36)
	at closeHandler (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/main.js:240:26)
	at CallbackList.invoke (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/events.js:121:36)
	at StreamMessageReader.fireClose (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
	at Socket.<anonymous> (/Users/m/.vscode/extensions/golang.go-0.15.2/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
	at Socket.emit (events.js:208:15)
	at Pipe.<anonymous> (net.js:588:12)
@stamblerre stamblerre transferred this issue from golang/vscode-go Jul 28, 2020
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jul 28, 2020
@stamblerre stamblerre changed the title gopls: automated issue report (crash) x/tools/gopls: automated issue report (crash) Jul 28, 2020
@stamblerre
Copy link
Contributor

Thanks for the report! https://golang.org/cl/244637 will fix this issue.

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jul 28, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jul 28, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Jul 28, 2020
@stamblerre
Copy link
Contributor

The above CL is now merged, closing.

@golang golang locked and limited conversation to collaborators Jul 29, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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

3 participants