#!stacks
"sigpanic" &&
("persistent.union:+0,+0x0" ||/* union */
"persistent.(*mapNode).forEach:+0,+0x0")
Issue created by stacks.
TEXT golang.org/x/tools/gopls/internal/util/persistent.union(SB) /Users/adonovan/go/pkg/mod/golang.org/x/tools/gopls@v0.19.1/internal/util/persistent/map.go
map.go:222 0x100762760 f9400b90 MOVD 16(R28), R16 <---- panic
map.go:222 0x100762764 eb3063ff CMP R16, RSP
map.go:222 0x100762768 540017e9 BLS 191(PC)
...
TEXT golang.org/x/tools/gopls/internal/util/persistent.(*mapNode).forEach(SB) /Users/adonovan/go/pkg/
mod/golang.org/x/tools/gopls@v0.19.1/internal/util/persistent/map.go
map.go:171 0x1007626c0 f9400b90 MOVD 16(R28), R16 <--- panic
map.go:171 0x1007626c4 eb3063ff CMP R16, RSP
map.go:171 0x1007626c8 54000429 BLS 33(PC)
...
This stack C2gvcQ
was reported by telemetry:
crash/crash
runtime.throw:+9,+0x37
runtime.sigpanic:+33,+0x223
golang.org/x/tools/gopls/internal/util/persistent.union:+0,+0x0
golang.org/x/tools/gopls/internal/util/persistent.(*Map[...]).Set:+3,+0x14b
golang.org/x/tools/gopls/internal/cache.(*fileMap).set:+1,+0x4f
golang.org/x/tools/gopls/internal/cache.(*fileMap).clone:+26,+0x34b
golang.org/x/tools/gopls/internal/cache.(*Snapshot).clone:+27,+0x33b
golang.org/x/tools/gopls/internal/cache.(*Session).invalidateViewLocked:+25,+0x1c7
golang.org/x/tools/gopls/internal/cache.(*Session).DidModifyFiles:+158,+0xd7f
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles:+36,+0x317
golang.org/x/tools/gopls/internal/server.(*server).DidChangeWatchedFiles:+13,+0x1fb
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+634,+0x5437
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
golang.org/x/tools/gopls@v0.19.1 go1.24.4 darwin/arm64 other (1)
Dups: q291Zg
Comment From: adonovan
This stack q291Zg
was reported by telemetry:
crash/crash
runtime.throw:+9,+0x37
runtime.sigpanic:+33,+0x223
golang.org/x/tools/gopls/internal/util/persistent.(*mapNode).forEach:+0,+0x0
golang.org/x/tools/gopls/internal/cache.(*Snapshot).reloadWorkspace.(*Map[...]).All.func1:=165,+0x117
golang.org/x/tools/gopls/internal/cache.(*Snapshot).reloadWorkspace:+8,+0xb8
golang.org/x/tools/gopls/internal/cache.(*Snapshot).awaitLoaded:+3,+0x37
golang.org/x/tools/gopls/internal/cache.(*Snapshot).WorkspaceMetadata:+1,+0x43
golang.org/x/tools/gopls/internal/server.(*server).diagnose:+68,+0x2ef
golang.org/x/tools/gopls/internal/server.(*server).diagnoseSnapshot:+31,+0x1d7
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.4 darwin/arm64 other (1)
Comment From: gabyhelp
Related Issues
- x/tools/gopls: sigpanic in persistent.(*mapNode).forEach (bad SP) #71115
- x/tools/gopls: impossible crash in persistent.Map decref #72931
- x/tools/gopls: nil deref in x/telemetry/internal/counter.(*Counter).add #73890
- x/tools/gopls: Implementation (by signatures): nil panic in dynamicFuncCallType #74305 (closed)
- x/tools/gopls: Definition: crash on [unsafe.Pointer] doc link #74434 (closed)
- x/tools/gopls: SEGV in HasSuffix (corrupt string) #74348
- x/tools/gopls: template.SemanticTokens: panic in template.(*Parsed).RuneCount #74776 (closed)
- x/tools/gopls: SIGBUS incrementing telemetry counter #74651
- x/tools/gopls: DidCreateFiles: panic in Files[i].URI.Clean() #74652
- x/tools/gopls: CodeActions: "end \< start" panic #74394 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)