runtime/sema: incorrect mutex contention time #73760
Labels
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
Go version
go1.23.9
Output of
go env
in your module/workspace:What did you do?
I tried a simple snippet to evaluate the mutex profile:
What did you see happen?
The order in which goroutines acquire the lock is:
gowrap1
→gowrap5
→gowrap2
→gowrap3
→gowrap4
. However, the result shows an overshoot ingowrap3
's contention time and underestimatesgowrap2
:What did you expect to see?
The expected contention time for
gowrap2
should be 4 seconds. The contention time forgowrap3
should be 3 seconds. Not sure if this behavior is intentional.The text was updated successfully, but these errors were encountered: