runtime: concurrent map iter+write fatal doesn't respect GOTRACEBACK #68019
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 go1.22.4 linux/amd64
What did you do?
What did you see happen?
... we hit the race on the map in prod after an hour and 💣
The Go runtime then did its
fatal
:But then we got 3 GB of GOTRACEBACK stacks from the Go runtime for 1M+ stacks, about 3 GB more than we needed to find the bug, overwhelming our logging system in the process, causing a secondary outage.
GOTRACEBACK docs say:
And arguably a map race is internal to the run-time insofar as maps are implemented in the runtime.
But the Go runtime know it's the user's fault; note the "but is used when user code is expected to be at fault for the failure" bit here:
What did you expect to see?
I'd expect
fatalthrow(throwTypeUser)
to be treated as a normal panic withGOTRACEBACK=single
respected.Currently it's ignored:
(At least
none
works, but that's too quiet, hiding the actual problem).The text was updated successfully, but these errors were encountered: