Go 1.27 adds a goroutine leak profile for finding leaks in running programs
The Go team describes a new profiler that reports goroutines permanently blocked on channels or sync primitives, usable in production.
The Go blog describes the goroutine leak profiler introduced in Go 1.27. A goroutine counts as leaked when it is blocked and the conditions that would unblock it can never be met, which slowly raises memory and garbage collection cost.
Existing tools such as goleak and the synctest package help in unit tests, but cannot check production systems. Ordinary goroutine profiles also cannot tell a leaked goroutine from one that is blocked in large numbers by design.
The new profile is exposed as the goroutineleak type in runtime/pprof, and services that already use net/http/pprof get it at the /debug/pprof/goroutineleak endpoint. It can be fetched with curl and read with go tool pprof.
The trade-off is coverage: it finds goroutines permanently blocked on channels or sync package primitives, not every kind of leak. The Go team says memory overhead is negligible but detection can be slower than a regular GC in some cases. Teams running Go services can try it once on 1.27.
Sources
- Goroutine Leak Profilesofficial
Verified Oct 26, 2026 (official source). goprofilingconcurrency