{
  "id": "go/deadlock-all-goroutines-asleep",
  "signature": "fatal error: all goroutines are asleep - deadlock!",
  "signature_zh": "致命错误：所有goroutine都处于休眠状态 - 死锁！",
  "regex": "fatal\\ error:\\ all\\ goroutines\\ are\\ asleep\\ \\-\\ deadlock!",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "All goroutines are blocked waiting on channels or locks with no way to proceed, causing a program deadlock.",
  "root_cause_type": "generic",
  "root_cause_zh": "所有goroutine都阻塞在通道或锁上，无法继续执行，导致程序死锁。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.23",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the existing goroutines are waiting on each other, adding more will not resolve the circular wait.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Sleep does not resolve the underlying synchronization issue; it only delays the deadlock detection.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This breaks the program's logic and may introduce data races.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use buffered channels or select with default to avoid blocking indefinitely. Ensure there is a way for goroutines to exit.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Implement a timeout using context.WithTimeout to break deadlocks.",
      "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-01-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}