#!stacks
"gopanic" && "errgroup.(*Group).Wait:+6"
Issue created by stacks.
The stack is very unhelpful here since the panic was raised by an errgroup.Group.Go goroutine and all that context is lost due to the errgroup change from proposal #53757. There are at least 7 existing issues that this is potentially a duplicate of--or it may be something new; we cannot tell.
This stack V8TD-Q
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x153
golang.org/x/sync/errgroup.(*Group).Wait:+6,+0x7b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).getPackageHandles:+86,+0x2df
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackage:+37,+0x523
golang.org/x/tools/gopls/internal/cache.(*Snapshot).PackageDiagnostics:+28,+0x19b
golang.org/x/tools/gopls/internal/server.(*server).diagnose.func5:+3,+0x19f
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.0-pre.3 go1.24.4 darwin/arm64 vscode (1)
Dups: fEn2Cg nHixSg VVj_rg
Comment From: gopherbot
Change https://go.dev/cl/682935 mentions this issue: errgroup: revert propagation of panics
Comment From: adonovan
I broadened this issue to cover the hold class of errgroup issues, which should have been fixed by the reversion of the change in errgroup (CL 682935). I'll update our dependency.
Comment From: adonovan
This stack fEn2Cg
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x153
golang.org/x/sync/errgroup.(*Group).Wait:+6,+0x7b
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).query:+16,+0x15b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackage:+71,+0x63b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).PackageDiagnostics:+28,+0x19b
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedFiles:+50,+0x343
golang.org/x/tools/gopls/internal/server.(*server).diagnoseSnapshot:+14,+0xb7
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews.func1:+3,+0xbb
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews.gowrap1:+16,+0x3b
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.1 go1.24.2 darwin/arm64 neovim,other,vscode (8)
This stack nHixSg
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x153
golang.org/x/sync/errgroup.(*Group).Wait:+6,+0x7b
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).query:+16,+0x15b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackage:+71,+0x63b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).PackageDiagnostics:+28,+0x19b
golang.org/x/tools/gopls/internal/server.(*server).diagnose.func5:+3,+0x19f
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.1 go1.24.2 darwin/arm64 neovim,other,vscode (21)
This stack VVj_rg
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x153
golang.org/x/sync/errgroup.(*Group).Wait:+6,+0x7b
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).query:+16,+0x15b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackage:+71,+0x63b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).TypeCheck:+5,+0xaf
golang.org/x/tools/gopls/internal/golang.selectPackageForFile:+10,+0x21f
golang.org/x/tools/gopls/internal/golang.NarrowestPackageForFile:+1,+0x2f
golang.org/x/tools/gopls/internal/golang.CodeActions:+30,+0x23f
golang.org/x/tools/gopls/internal/server.(*server).CodeAction:+154,+0x3ff
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+160,+0x1d9f
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func4:+5,+0x73
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func5:+52,+0x68f
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2,+0xbf
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3,+0x8f
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.1 go1.24.2 darwin/arm64 neovim,other,vscode (7)
Comment From: gopherbot
Change https://go.dev/cl/686837 mentions this issue: gopls: update to x/sync@master