{
  "id": "go/goroutine-leak-blocked-send",
  "signature": "goroutine leak: N goroutines blocked in chan send (detected via pprof)",
  "signature_zh": "goroutine 泄漏: N 个 goroutine 阻塞在 chan send（通过 pprof 检测）",
  "regex": "goroutine\\ leak:\\ N\\ goroutines\\ blocked\\ in\\ chan\\ send\\ \\(detected\\ via\\ pprof\\)",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Goroutines were spawned to send on an unbuffered or full channel whose receiver stopped reading, so they block forever and accumulate.",
  "root_cause_type": "generic",
  "root_cause_zh": "启动的 goroutine 向无缓冲或已满的 channel 发送数据，但接收方已停止读取，导致它们永久阻塞并不断累积。",
  "versions": [
    {
      "version": "1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Blocked goroutines are not CPU-bound; more CPUs do not unblock them and memory keeps growing.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "GC does not collect goroutines blocked on channels; they remain reachable from the scheduler.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "select {\ncase ch <- v:\ncase <-ctx.Done():\n    return\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "jobs := make(chan Job, 128)\nfor i := 0; i < runtime.NumCPU(); i++ {\n    go func() { for j := range jobs { process(j) } }()\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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}