# WARNING: DATA RACE - Write at 0x00c000012345 by goroutine 6

- **ID:** `go/data-race-on-variable`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Concurrent reads and writes to a shared variable without synchronization.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   var mu sync.Mutex
var x int
// Write
mu.Lock()
x = 1
mu.Unlock()
// Read
mu.Lock()
_ = x
mu.Unlock()
   ```
2. **** (90% success)
   ```
   var x atomic.Int32
x.Store(1)
_ = x.Load()
   ```

## Dead Ends

- **** — Reads still race unless also atomic. (50% fail)
- **** — Go doesn't have volatile; no effect. (100% fail)
- **** — Sleep doesn't establish happens-before relationship. (90% fail)
