Skip to content

gopls: automated issue report (crash) #3456

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
feldgendler opened this issue Jul 17, 2024 · 2 comments
Closed

gopls: automated issue report (crash) #3456

feldgendler opened this issue Jul 17, 2024 · 2 comments
Milestone

Comments

@feldgendler
Copy link

feldgendler commented Jul 17, 2024

gopls version: v0.16.1/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Wed, 17 Jul 2024 14:01:22 GMT
restart history:
Wed, 17 Jul 2024 13:58:52 GMT: activation (enabled: true)

gopls crashes repeatably while the editor is idle.

panic: runtime error: slice bounds out of range [73:72]

goroutine 8394 [running]:
golang.org/x/tools/internal/imports.(*ModuleResolver).scanDirForPackage(0xc001576370, {{0xc000016000%3F, 0xc000081008%3F}, 0x9c136ac15b2de0c3%3F}, {0xc001f8bbc0, 0x48})
	  mod.go:744  0x6ff
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func3({{0xc000016000%3F, 0xe9b560%3F}, 0xc004e6a1d0%3F}, {0xc001f8bbc0%3F, 0x196f368%3F})
	  mod.go:618  0x50
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc002d19200, {0xc001f8bbc0, 0x58}, 0x0, {0x131ab98, 0xc002f58d40})
	  walk.go:268  0x3f7
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc002d19200, {0xc000522140, 0x48}, 0x0, {0x131ab98, 0xc002f58c80})
	  walk.go:334  0x886
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc002d19200, {0xc00590e280, 0x39}, 0x0, {0x131ab98, 0xc001fb6d40})
	  walk.go:334  0x886
golang.org/x/tools/internal/gopathwalk.(*walker).walk.func1()
	  walk.go:325  0x65
created by golang.org/x/tools/internal/gopathwalk.(*walker).walk in goroutine 8122
	  walk.go:320  0x945
gopls stats -anon { "DirStats": { "Files": 58198, "TestdataFiles": 8053, "GoFiles": 25142, "ModFiles": 285, "Dirs": 9672 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.5", "GoplsVersion": "v0.16.1", "InitialWorkspaceLoadDuration": "1.017607264s", "MemStats": { "HeapAlloc": 24842568, "HeapInUse": 40026112, "TotalAlloc": 374969176 }, "WorkspaceStats": { "Files": { "Total": 1552, "Largest": 395026, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.5", "AllPackages": { "Packages": 233, "LargestPackage": 161, "CompiledGoFiles": 1560, "Modules": 30 }, "WorkspacePackages": { "Packages": 7, "LargestPackage": 19, "CompiledGoFiles": 37, "Modules": 1 }, "Diagnostics": 0 } ] } }

This happens after a period of UI inactivity. This precedes the crash in the log:

[Info  - 5:06:46 PM] 2024/07/17 17:06:46 background imports cache refresh starting
@gopherbot gopherbot added this to the Untriaged milestone Jul 17, 2024
@hyangah
Copy link
Contributor

hyangah commented Jul 17, 2024

Thanks for the report @feldgendler

Duplicate of golang/go#67156
but this case does not involve Windows (and, thus hopefully not modified GOROOT)

@findleyr
Copy link
Member

Let's close as a duplicate. With @feldgendler's help I believe we understand this crash now.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants