# WARNING: DATA RACE
Read at 0x... by goroutine N:
  main.main.func1()
Previous write at 0x... by goroutine M:

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

## Root Cause

Multiple goroutines read and write a shared variable without synchronization. The race detector reports the conflicting accesses.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   var counter int64
atomic.AddInt64(&counter, 1)
   ```
2. **** (93% success)
   ```
   var mu sync.Mutex
mu.Lock()
counter++
mu.Unlock()
   ```

## Dead Ends

- **** — Hides the symptom but the underlying race still corrupts data and can crash in production. (90% fail)
- **** — unsafe does not provide synchronization; the race remains. (85% fail)
