# runtime: goroutine count grows unbounded (observed via runtime.NumGoroutine())

- **ID:** `go/goroutine-leak-pprof`
- **Domain:** go
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Goroutines block forever on channel send/receive or wait on a context that is never cancelled, so they never exit.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   go func(ctx context.Context) {
    select {
    case <-ctx.Done():
        return
    case work <- job:
    }
}(ctx)
   ```
2. **** (88% success)
   ```
   import _ "net/http/pprof"
// go tool pprof http://localhost:6060/debug/pprof/goroutine
   ```

## Dead Ends

- **** — GC does not kill blocked goroutines. (95% fail)
- **** — Delays OOM but goroutines still accumulate. (85% fail)
