# Go 1.27's goroutine leak profiler pinpoints production leaks with zero false positives

Original title: Goroutine Leak Profiles

> Hacker News story 49726773 · language: en · submitted 2026-09-16
> Web version: https://zeli.app/story/49726773
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 76 · by [torutofu](<https://news.ycombinator.com/user?id=torutofu>) · 💬 6
[original](<https://go.dev/blog/goroutine-leak-profiles>) · [HN discussion](<https://news.ycombinator.com/item?id=49726773>)

## Summary

Go 1.27 introduces a goroutine leak profiler that detects goroutines permanently blocked on channels or sync primitives in running programs, including production. Unlike goleak and synctest, which are limited to tests, it uses a modified garbage collector to trace liveness from unblocked goroutines, reporting only true leaks. The trade-off: it misses leaks blocked on I/O or global variables, and can be slower than the regular GC.

## Key quote

> A goroutine is live if: 1. it is not blocked by a concurrency primitive, or 2. at least one concurrency primitive that blocks it is referenced by another live goroutine.

## HN discussion (6 comments)

### [sethammons](<https://news.ycombinator.com/item?id=49765098>)

> General rule: never call a goroutine without understanding how it will close.

### [deathanatos](<https://news.ycombinator.com/item?id=49763387>)

> I'm coming predominately from other languages, so it took me a hot minute to figure out what the various bug were.
>
> • channels are by default "unbuffered", in that a send needs a waiting recv to actually do the send, and blocks until such. The addition of the buffer prevents the block & permits the goroutine to progress (and eventually exit, and thus, not leak) … so long as the buffer is sufficiently large enough.
>
> • channels do not, AFAICT, realize when the receiver is gone, and will block indefinitely even when there is no receiver. (It is the same "chan" object, I think, in both sender/receiver / there is no distinction. So, the single object is never GC'd.)
>
> • goroutines are not GC'd. (& the code doesn't/can't hold like, a reference or a handle to a goroutine / there is no "join" primitive.)

---

## Cite

- Page: https://zeli.app/story/49726773
- Date: 2026-09-16
- Source: go.dev (https://go.dev/blog/goroutine-leak-profiles)
- Hacker News: https://news.ycombinator.com/item?id=49726773

## Other languages

- zh: https://zeli.app/zh/story/49726773 · markdown: https://zeli.app/zh/story/49726773.md
- ja: https://zeli.app/ja/story/49726773 · markdown: https://zeli.app/ja/story/49726773.md
- ko: https://zeli.app/ko/story/49726773 · markdown: https://zeli.app/ko/story/49726773.md
- de: https://zeli.app/de/story/49726773 · markdown: https://zeli.app/de/story/49726773.md
- es: https://zeli.app/es/story/49726773 · markdown: https://zeli.app/es/story/49726773.md
- ru: https://zeli.app/ru/story/49726773 · markdown: https://zeli.app/ru/story/49726773.md
