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

https://github.com/golang/go/issues/68311#issuecomment-2233738835

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?

Comment From: findleyr

Reproduced and confirmed that avoiding the timer fixes the symptoms.

Comment From: gopherbot

Change https://go.dev/cl/599075 mentions this issue: counter: avoid the rotation timer in counter.Open

Comment From: findleyr

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.

Comment From: gopherbot

Change https://go.dev/cl/598957 mentions this issue: cmd: vendor golang.org/x/telemetry@0b706e1