# fatal error: all goroutines are asleep - deadlock!
goroutine 1 [select (no cases)]:

- **ID:** `go/select-no-case-ready-blocks-forever`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A select statement has no ready cases and no default, blocking forever. If it's the only runnable goroutine, the runtime reports deadlock.

## Version Compatibility

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

## Workarounds

1. **** (92% success)
   ```
   select {
case v := <-ch:
    return v
case <-time.After(5 * time.Second):
    return errors.New("timeout")
}
   ```
2. **** (95% success)
   ```
   select {
case v := <-ch:
    return v, nil
case <-ctx.Done():
    return nil, ctx.Err()
}
   ```

## Dead Ends

- **** — Turns a blocking wait into a busy loop that spins CPU at 100%. (85% fail)
- **** — Polling with sleeps adds latency and still misses events under load. (80% fail)
