# fatal error: all goroutines are asleep - deadlock!

- **ID:** `go/fatal-error-all-goroutines-asleep-deadlock`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

All goroutines are blocked waiting on channels/locks with no possibility of progress; the Go runtime deadlock detector fires.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.0+ | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   ch := make(chan int, 1)
ch <- 1 // no receiver needed for buffered channel
   ```
2. **** (90% success)
   ```
   select {
case v := <-ch:
    _ = v
case <-time.After(time.Second):
    return errors.New("timeout")
}
   ```

## Dead Ends

- **** — Sleep does not unblock the sender; the deadlock detector still fires once all goroutines park. (90% fail)
- **** — fatal error from the runtime is not recoverable via recover(); it calls exit directly. (95% fail)
