{
  "id": "go/goroutine-leak-on-missed-channel",
  "signature": "fatal error: all goroutines are asleep - deadlock!",
  "signature_zh": "致命错误：所有协程都在休眠 - 死锁！",
  "regex": "fatal\\ error:\\ all\\ goroutines\\ are\\ asleep\\ \\-\\ deadlock!",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A goroutine sends to an unbuffered channel but no receiver ever reads, causing the goroutine to block forever. The main goroutine also waits on another operation, leading to a deadlock.",
  "root_cause_type": "generic",
  "root_cause_zh": "一个协程向无缓冲通道发送数据，但没有接收者读取，导致协程永久阻塞。主协程也在等待其他操作，引发死锁。",
  "versions": [
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "缓冲只能容纳一个值，如果接收者仍然缺失，发送第二个值时会再次阻塞。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "sleep只是暂时缓解，如果接收者一直不出现，最终仍会死锁。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.7,
      "how": "select { case ch <- v: default: /* 处理超时 */ }",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "ch := make(chan int, 10); go func(){ v := <-ch; /* 处理 */ }(); ch <- 42",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}