# fatal error: concurrent map writes

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

## Root Cause

Two or more goroutines write to the same map without synchronization. The runtime detects overlapping writes and aborts the program.

## Version Compatibility

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

## Workarounds

1. **** (94% success)
   ```
   var mu sync.RWMutex
mu.Lock()
m[key] = value
mu.Unlock()
   ```
2. **** (90% success)
   ```
   var m sync.Map
m.Store(key, value)
v, ok := m.Load(key)
   ```

## Dead Ends

- **** — The runtime detector may still fire and the race is not eliminated, only made less frequent. (80% fail)
- **** — Atomic values do not protect the map's internal buckets; the map itself is still raced. (70% fail)
