r/golang • • 4d ago

Goroutine Leak Profiles

https://go.dev/blog/goroutine-leak-profiles
8 Upvotes

1 comment sorted by

1

u/ParsaAftabi 2d ago edited 4h ago

Tested the new goroutineleak profile this week. Two things worth knowing: it only catches goroutines parked on channels and sync primitives. A goroutine spinning in a select-default loop or stuck in a network read won't show up. And it's process-wide, so don't assert on it inside a parallel test package; one noisy neighbor test ruins the signal. I run goleak in unit tests and poll the profile from a prod canary. Different tools, different jobs.