{
  "id": "go/panic-concurrent-map-read-write",
  "signature": "fatal error: concurrent map read and map write",
  "signature_zh": "致命错误：并发读取和写入 map",
  "regex": "fatal\\ error:\\ concurrent\\ map\\ read\\ and\\ map\\ write",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "One goroutine reads a map while another writes to it without synchronization.",
  "root_cause_type": "generic",
  "root_cause_zh": "一个 goroutine 读取 map 的同时另一个 goroutine 在写入，且没有同步保护。",
  "versions": [
    {
      "version": "1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Copy itself races with the writer; the fatal error still fires during copy.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Go does not serialize concurrent map access; runtime deliberately aborts.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "mu.RLock()\nv := m[k]\nmu.RUnlock()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "var m sync.Map\nif v, ok := m.Load(k); ok { _ = v }",
      "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-06-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}