{
  "id": "go/channel-nil-block-forever",
  "signature": "fatal error: all goroutines are asleep - deadlock! (nil channel)",
  "signature_zh": "fatal error: 所有 goroutine 都休眠了 - 死锁！（nil channel）",
  "regex": "fatal\\ error:\\ all\\ goroutines\\ are\\ asleep\\ \\-\\ deadlock!\\ \\(nil\\ channel\\)",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Sending or receiving on a nil channel blocks forever, leading to deadlock if all goroutines are blocked.",
  "root_cause_type": "generic",
  "root_cause_zh": "在 nil channel 上发送或接收会永远阻塞，如果所有 goroutine 都阻塞，则导致死锁。",
  "versions": [
    {
      "version": "1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Timeout on nil channel still blocks; select with timeout won't trigger",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Default case may cause busy loop",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "ch := make(chan int)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "if ch != nil {\n    ch <- v\n}",
      "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-04-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}