# fatal error: concurrent map read and map write

- **ID:** `go/map-concurrent-read-write`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

One goroutine reads a map while another writes it, without synchronization. The runtime detects the conflict and aborts.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.0+ | active | — | — |

## Workarounds

1. **** (94% success)
   ```
   mu.RLock()
v := m[key]
mu.RUnlock()
   ```
2. **** (88% success)
   ```
   type req struct{ key string; resp chan int }
for r := range reqs {
    r.resp <- m[r.key]
}
   ```

## Dead Ends

- **** — Copying itself iterates the map and races with concurrent writes, triggering the same fatal error. (75% fail)
- **** — Unlocked reads still race with locked writes; the detector fires on read/write overlap. (85% fail)
