# fatal error: all goroutines are asleep - deadlock! (goroutine 1 [semacquire])

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

## Root Cause

A goroutine is blocked trying to acquire a mutex that is already locked by another goroutine that is also blocked, causing a deadlock.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   mu1.Lock(); mu2.Lock(); defer mu1.Unlock(); defer mu2.Unlock()
   ```
2. **** (85% success)
   ```
   if mu.TryLock(time.Second) { defer mu.Unlock() } else { handleTimeout() }
   ```

## Dead Ends

- **** — If logic requires same mutex, deadlock persists. (70% fail)
- **** — Sleep doesn't resolve circular wait. (90% fail)
