# fatal error: all goroutines are asleep - deadlock!

- **ID:** `go/goroutine-leak-on-channel-send`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A goroutine is blocked trying to send on an unbuffered channel with no receiver, causing a deadlock when the main goroutine also blocks.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   go func() { ch := make(chan int); go func() { <-ch }(); ch <- 42 }()
   ```
2. **** (85% success)
   ```
   select { case ch <- 42: default: }
   ```

## Dead Ends

- **** — Sleep doesn't create a receiver; the channel send still blocks indefinitely. (95% fail)
- **** — If the buffer is full and no receiver, send still blocks after filling buffer. (70% fail)
- **** — Sending on a closed channel causes a panic, not a deadlock. (90% fail)
