# fatal error: all goroutines are asleep - deadlock!

- **ID:** `go/goroutine-leak-on-missed-channel`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A goroutine sends to an unbuffered channel but no receiver ever reads, causing the goroutine to block forever. The main goroutine also waits on another operation, leading to a deadlock.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.21 | active | — | — |

## Workarounds

1. **** (70% success)
   ```
   select { case ch <- v: default: /* 处理超时 */ }
   ```
2. **** (90% success)
   ```
   ch := make(chan int, 10); go func(){ v := <-ch; /* 处理 */ }(); ch <- 42
   ```

## Dead Ends

- **** — 缓冲只能容纳一个值，如果接收者仍然缺失，发送第二个值时会再次阻塞。 (80% fail)
- **** — sleep只是暂时缓解，如果接收者一直不出现，最终仍会死锁。 (90% fail)
