# 致命错误：所有goroutine都处于休眠状态 - 死锁！（select没有可用的case）

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

## 根因

select语句没有任何case就绪，也没有default，导致goroutine永久阻塞。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   Ensure at least one channel in the select will eventually receive or send. Use context or done channels.
   ```
2. **** (85% 成功率)
   ```
   Include a default case to handle the situation when no channel is ready.
   ```

## 无效尝试

- **** — Adding default changes the semantics; it may cause busy looping. (60% 失败率)
- **** — Sleep does not guarantee that channels will become ready; it just delays. (80% 失败率)
- **** — This may break the logic and cause other issues. (70% 失败率)
