# 致命错误: 所有 goroutine 都处于休眠状态 - 死锁！（select 无就绪分支）

- **ID:** `go/select-no-case-ready-timeout`
- **领域:** go
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

select 语句没有 default 分支，且其 channel 分支都未就绪，也没有其他 goroutine 能使它们就绪，导致全局死锁。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.0+ | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Add a timeout case with time.After and return an error on expiry.
   ```
2. **** (85% 成功率)
   ```
   Ensure at least one case is a send that can always proceed, or restructure so the producer runs before the select.
   ```

## 无效尝试

- **** — Busy-looping burns CPU and may still never see data if the producer is also blocked. (70% 失败率)
