# fatal error: concurrent map writes

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

## Root Cause

Two goroutines mutate the same map without synchronization; the runtime detects the race and aborts.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   var m sync.Map
m.Store("k", 1)
v, _ := m.Load("k")
   ```
2. **** (95% success)
   ```
   var mu sync.RWMutex
mu.Lock()
m[k] = v
mu.Unlock()
   ```

## Dead Ends

- **** — Narrows the race window but does not eliminate it; still fatal under load. (85% fail)
- **** — atomic.Value requires whole-value replacement; concurrent in-place writes still race. (80% fail)
