runtime: crash during generating CPU profile #66194
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version 1.20.13 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Program ran for some time with CPU profile being generated in the background before crashing.
Unfortunately, could not reproduce the issue so far. Seen only once in a customer environment.
What did you see happen?
Program crashes with stack trace:
Based on the stack trace, the runtime crashes while creating the CPU profile. More specifically, the
gp
used insigprof
seems to be nil. Based on the code, I suppose this can happen -sigprof
explicitly has a comment that states this:Note: it can happen on Windows that we interrupted a system thread with no g, so gp could nil.
go1.22 still seems to be have the same issue from what I can tell (
initAt
assumes thatgp
is nevernil
, andsigprof
never checks this).What did you expect to see?
CPU profile should be collected without crash
The text was updated successfully, but these errors were encountered: