# fatal error: concurrent map writes

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

## Root Cause

Two goroutines write to the same map without synchronization. The runtime detects concurrent writes and aborts the process.

## Version Compatibility

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

## Workarounds

1. **** (92% success)
   ```
   var m sync.Map
m.Store(k, v)
v, ok := m.Load(k)
   ```
2. **** (96% success)
   ```
   var mu sync.RWMutex
mu.Lock()
m[k] = v
mu.Unlock()
   ```

## Dead Ends

- **** — Other writes still race; the runtime aborts on the first detected concurrent pair. (90% fail)
- **** — Sleeps don't eliminate races under real load; the crash just becomes intermittent. (85% fail)
