{
  "id": "go/goroutine-leak-no-sender",
  "signature": "fatal error: all goroutines are asleep - deadlock! (goroutine 1 [chan receive])",
  "signature_zh": "致命错误：所有 goroutine 都处于休眠状态 - 死锁！（goroutine 1 [通道接收]）",
  "regex": "fatal\\ error:\\ all\\ goroutines\\ are\\ asleep\\ \\-\\ deadlock!\\ \\(goroutine\\ 1\\ \\[chan\\ receive\\]\\)",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A goroutine is blocked receiving from a channel that never receives data, with no active sender.",
  "root_cause_type": "generic",
  "root_cause_zh": "一个 goroutine 在从一个永远不会接收数据的通道接收时阻塞，没有活动的发送者。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Receive from closed channel returns zero value immediately, not blocking, but may not be desired.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Sleep doesn't create a sender; still blocks forever.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "ch := make(chan int); go func() { ch <- 42 }(); val := <-ch",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "select { case val := <-ch: case <-time.After(time.Second): }",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}