{
  "id": "go/condition-broadcast-without-lock",
  "signature": "panic: sync: Cond.Broadcast called without lock held",
  "signature_zh": "panic: 未持锁时调用 Cond.Broadcast",
  "regex": "panic:\\ sync:\\ Cond\\.Broadcast\\ called\\ without\\ lock\\ held",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "sync.Cond.Broadcast() or Signal() is called without holding the associated Locker, violating the documented contract.",
  "root_cause_type": "generic",
  "root_cause_zh": "在未持有相关联的 Locker 的情况下调用 sync.Cond.Broadcast() 或 Signal()，违反了文档约定。",
  "versions": [
    {
      "version": "1.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Still not holding the lock when Broadcast executes; panic persists.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Burns CPU and reintroduces races on the shared predicate.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.96,
      "how": "c.L.Lock()\n// mutate predicate\nc.Broadcast()\nc.L.Unlock()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "close(done) // wakes all waiters without a Cond",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}