Go adds a profile for leaked goroutines
Go 1.27 can identify some goroutines that are permanently blocked, helping separate leaks from workers that are simply busy. The new profile is available through pprof. It can expose abandoned channel sends and synchronization waits, but does not catch every leak: network and file I/O waits remain outside its scope.
The Go Blog · Sep 2, 2026
Why it matters
A concrete diagnostic to evaluate for long-running Go agents, worker pools, and services with cancellation paths.
More context
The article demonstrates a worker loop that returns early while other goroutines remain blocked sending results. The new profile identifies the blocked send. Pair production profiling with tests that exercise cancellation and error paths; choose a profiling frequency appropriate to the service.
Keep in mind
It does not detect every leak. Network or file I/O blocking is outside its scope, and reachable synchronization objects can hide logical leaks. Profiling has overhead.
Original read