{
  "id": 5152674,
  "title": "Goroutine Leak Profiles",
  "url": "https://urgent.news/2026/09/02/goroutine-leak-profiles",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-02T18:50:17.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://go.dev/blog/goroutine-leak-profiles"
  },
  "original_language": "en",
  "account": "Go's concurrency features provide powerful and straightforward use, yet can sometimes result in errors. The Go ecosystem offers useful debugging tools, such as the race detector, but may overlook some concurrency bugs, like goroutine leaks. Goroutines synchronise or exchange information via shared concurrency primitives like channels, locks, and wait groups. While communicating, they often block on these primitives, waiting for conditions to be met, similar to waiting for a mutex or receiving a message over a channel. A goroutine is considered leaked if it is blocked, but the conditions for unblocking never occur. Accumulated leaked goroutines degrade performance through excessive memory and CPU usage, especially with GOMEMLIMIT in place. Detecting goroutine leaks is challenging, with open-source library goleak and Go 1.25's synctest package being useful in unit testing. However, they cannot check for leaks in production systems, particularly at large scales. Goroutine profiles offer a rudimentary way to detect blocked operations or growth trends, but cannot distinguish between leaked and temporarily blocked goroutines. Go 1.27 introduces the goroutine leak profiler, a flexible and lightweight mechanism to find goroutine leaks in running Go programs, including production systems. It generates little-to-no false positives but is limited to goroutines blocked on channels or primitives in the sync package. This covers a large subset of goroutine leaks. The article showcases how to use the feature, provides more examples of detectable leaks, and describes the underlying implementation and trade-offs.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}