# fatal error: all goroutines are asleep - deadlock! (mutex locked)

- **ID:** `go/deadlock-on-mutex`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

一个goroutine持有互斥锁但未释放，其他goroutine等待锁，导致死锁。

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   mu.Lock(); defer mu.Unlock(); /* ... */
   ```
2. **** (80% success)
   ```
   mu.RLock(); defer mu.RUnlock(); /* 读操作 */
   ```

## Dead Ends

- **** — 同一goroutine重复锁定同一互斥锁会导致死锁（非重入锁）。 (90% fail)
- **** — 锁未释放，其他goroutine永远等待。 (80% fail)
