{
  "id": "go/panic-concurrent-map-write",
  "signature": "fatal error: concurrent map writes",
  "signature_zh": "致命错误：并发写入 map",
  "regex": "fatal\\ error:\\ concurrent\\ map\\ writes",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Two goroutines mutate the same map without synchronization; the runtime detects the race and aborts.",
  "root_cause_type": "generic",
  "root_cause_zh": "两个 goroutine 在无同步的情况下同时修改同一个 map，运行时检测到竞态并中止。",
  "versions": [
    {
      "version": "1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Narrows the race window but does not eliminate it; still fatal under load.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "atomic.Value requires whole-value replacement; concurrent in-place writes still race.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "var m sync.Map\nm.Store(\"k\", 1)\nv, _ := m.Load(\"k\")",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "var mu sync.RWMutex\nmu.Lock()\nm[k] = v\nmu.Unlock()",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}