# runtime: goroutine leak detected: N goroutines blocked on chan send

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

## Root Cause

Handler spawns goroutines writing to a channel that no one drains after client disconnects, or waits on a channel that is never closed. Goroutines accumulate over time.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.20 | active | — | — |
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   go func() {
    select {
    case ch <- result:
    case <-ctx.Done():
        return
    }
}()
   ```
2. **** (85% success)
   ```
   results := make(chan Result, len(tasks))
   ```

## Dead Ends

- **** — Leaked goroutines still hold stacks and channel references; memory grows regardless of scheduler tuning. (75% fail)
- **** — GC does not collect goroutines that are still runnable or blocked on a channel. (90% fail)
