# goroutine blocked in select with no ready case (deadlock or long stall)

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

## Root Cause

A select statement with no default blocks until one of its cases can proceed. If none of the channels ever become ready, the goroutine stalls indefinitely.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   select {
case v := <-ch:
	use(v)
case <-time.After(5 * time.Second):
	return errors.New("timeout waiting for value")
}
   ```
2. **** (90% success)
   ```
   select {
case v := <-ch:
	use(v)
case <-ctx.Done():
	return ctx.Err()
}
   ```

## Dead Ends

- **** — A default with a loop spins the CPU at 100% and does not make any channel ready. (90% fail)
- **** — If the channels are never written to, more cases do not help; the goroutine still blocks. (80% fail)
