Skip to content

gopls: automated issue report (crash) #3719

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

Open
peder1981 opened this issue Mar 15, 2025 · 3 comments
Open

gopls: automated issue report (crash) #3719

peder1981 opened this issue Mar 15, 2025 · 3 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@peder1981
Copy link

gopls version: v0.18.1/go1.23.6
gopls flags:
update flags: proxy
extension version: 0.46.1
environment: Windsurf linux
initialization error: undefined
issue timestamp: Sat, 15 Mar 2025 13:27:17 GMT
restart history:
Sat, 15 Mar 2025 10:11:29 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: LoadImport called with empty package path

goroutine 1 [running]:
cmd/go/internal/load.(*preload).flush(0xc00081db20)
	  pkg.go:1132  0x74
panic({0x9cef60%3F, 0xba00f0%3F})
	  panic.go:770  0x132
cmd/go/internal/load.loadImport({0xba6e70, 0xf8d140}, {0x0, 0x1, 0x0, 0x1, 0x1, 0x0}, 0x0, {0x7703e62bc5f1, ...}, ...)
	  pkg.go:731  0x1412
cmd/go/internal/load.LoadImport(...)
	  pkg.go:714
cmd/go/internal/load.(*Package).load(0xc00072e608, {0xba6e70, 0xf8d140}, {0x0, 0x1, 0x0, 0x1, 0x1, 0x0}, {0xc00066c580, ...}, ...)
	  pkg.go:2017  0x1a93
cmd/go/internal/load.loadImport({0xba6e70, 0xf8d140}, {0x0, 0x1, 0x0, 0x1, 0x1, 0x0}, 0xc00081db20, {0xc00066c580, ...}, ...)
	  pkg.go:794  0x546
cmd/go/internal/load.PackagesAndErrors({0xba6e70%3F, 0xf8d140%3F}, {0x0, 0x1, 0x0, 0x1, 0x1, 0x0}, {0xc00012a3f0, 0x2, ...})
	  pkg.go:2882  0xa2b
cmd/go/internal/list.runList({0xba6e70, 0xf8d140}, 0xf1e7a0%3F, {0xc00012a3f0, 0x2, 0x2})
	  list.go:613  0xc76
main.invoke(0xf1e7a0, {0xc00012a350, 0xc, 0xc})
	  main.go:257  0x5c4
main.main()
	  main.go:175  0x6d5

	view_id="1"
	snapshot=4
	directory=/home/peder/CascadeProjects

gopls stats -anon { "DirStats": { "Files": 39757, "TestdataFiles": 0, "GoFiles": 95, "ModFiles": 1, "Dirs": 5103 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.23.6", "GoplsVersion": "v0.18.1", "InitialWorkspaceLoadDuration": "24.595571396s", "MemStats": { "HeapAlloc": 101698632, "HeapInUse": 103890944, "TotalAlloc": 108979608 }, "WorkspaceStats": { "Files": { "Total": 1, "Largest": 291, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.5", "AllPackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "WorkspacePackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "Diagnostics": 0 } ] } }

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>

@gopherbot gopherbot added this to the Untriaged milestone Mar 15, 2025
@findleyr
Copy link
Member

Is this crash reproducible for you?

The panic message is coming from the go command; presumably due to some sort of degenerate input from gopls. I don't think this is what's crashing gopls, as it looks like it is the content of a gopls log message (the view_id="1" annotation is an attribute of gopls logs).

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 19, 2025
@peder1981
Copy link
Author

Thank you the answer! I'll try. But what I can say is, every time VSCode is opened with .go files, gopls consumes closer the CPU limits.

@findleyr
Copy link
Member

Is gopls actually crashing? If so, we need to see the crashing trace from gopls itself.

Is your workspace large? Initially gopls may consume a lot of CPU computing indexes of workspace information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants