Closed
Description
Reported by @cuonglm in #68311: it looks like counter.Open breaks runtime deadlock detection (the all goroutines are asleep...
), probably due to the timer to rotate the counter file. This is just a guess -- I'm not sure how that deadlock detection works.
https://go.googlesource.com/telemetry/+/refs/heads/master/internal/counter/file.go#192
CC @golang/telemetry
We should fix this for 1.23. The safest fix is probably to have a separate telemetry.Open call that does not rotate, since all cmd/go invocations should have a short lifespan and no rotation is necessary. @matloob what do you think?
@golang/runtime: is there a trick to set a timer that doesn't affect deadlock detection?
Metadata
Metadata
Assignees
Type
Projects
Status
Done
Relationships
Development
No branches or pull requests
Activity
findleyr commentedon Jul 17, 2024
Reproduced and confirmed that avoiding the timer fixes the symptoms.
gopherbot commentedon Jul 17, 2024
Change https://go.dev/cl/599075 mentions this issue:
counter: avoid the rotation timer in counter.Open
findleyr commentedon Jul 17, 2024
Will close this after revendoring telemetry.
Upon further consideration, I don't think this meets the threshold of a release blocker, since it only affects already-broken programs. I still think we should land the above fix for 1.23, however.
counter: avoid the rotation timer in counter.Open
gopherbot commentedon Jul 17, 2024
Change https://go.dev/cl/598957 mentions this issue:
cmd: vendor golang.org/x/telemetry@0b706e1
cmd: vendor golang.org/x/telemetry@0b706e1