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: 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
Milestone

Comments

@matthewmueller
Copy link

@matthewmueller matthewmueller commented Jul 28, 2020

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 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

@stamblerre stamblerre commented Jul 28, 2020

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

@gopherbot gopherbot added the Tools 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

@stamblerre stamblerre commented Jul 29, 2020

The above CL is now merged, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.