{
  "id": "go/goroutine-leak-blocked-recv",
  "signature": "goroutine leak: goroutine blocked forever on <-ch with no sender",
  "signature_zh": "goroutine 泄漏：goroutine 永久阻塞在 <-ch 上且无发送方",
  "regex": "goroutine\\ leak:\\ goroutine\\ blocked\\ forever\\ on\\ <\\-ch\\ with\\ no\\ sender",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "A receive on a channel that will never be sent to or closed leaves the goroutine parked permanently.",
  "root_cause_type": "generic",
  "root_cause_zh": "对一个永远不会被发送或关闭的 channel 执行接收操作，使 goroutine 永久挂起。",
  "versions": [
    {
      "version": "1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Ignoring the timeout branch means the goroutine still leaks if it loops; also time.After leaks timers.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Closing from the receiver does not unblock the receive; the receive already returned zero value and panics on later sends.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.94,
      "how": "select {\ncase v := <-ch:\n    handle(v)\ncase <-ctx.Done():\n    return\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "defer close(ch)",
      "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-07-03",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}