# fatal error: all goroutines are asleep - deadlock! (select with no ready case)

- **ID:** `go/select-blocked-forever-no-default`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A select with multiple channel cases blocks forever because no case is ever ready and there is no default or timeout. Often a producer/consumer wiring mistake where the expected channel is never written.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Add a context or timeout case to break the block and surface the bug:
select {
case v := <-ch:
    use(v)
case <-ctx.Done():
    return ctx.Err()
case <-time.After(30 * time.Second):
    return errors.New("select timeout")
}
   ```
2. **** (85% success)
   ```
   Verify the producer actually sends on the expected channel and that the channel is not nil (sending to a nil channel blocks forever).
   ```

## Dead Ends

- **** — Turns the blocking select into a busy spin that burns CPU and still never handles the missing event. (80% fail)
- **** — If the root wiring is wrong, extra cases don't become ready and the deadlock persists. (70% fail)
