# goroutine leak: goroutine blocked on channel receive

- **ID:** `go/goroutine-leak-blocked-on-channel-receive`
- **Domain:** go
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A goroutine waits to receive from a channel that is never sent to or closed, often due to a sender exiting without closing.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Use select with context:
select {
case v := <-ch:
    _ = v
case <-ctx.Done():
    return
}
   ```
2. **** (92% success)
   ```
   Ensure the sender closes the channel when done. Use defer close(ch) in the sender goroutine.
   ```

## Dead Ends

- **** — time.After allocates a timer each call and can leak timers; also doesn't fix the root cause. (60% fail)
- **** — Closing from receiver can cause panic if sender later sends; violates channel ownership. (80% fail)
