{
  "id": "go/goroutine-leak-blocked-channel",
  "signature": "goroutine leak: N goroutines blocked in chan send (runtime.gopark)",
  "signature_zh": "goroutine 泄漏：N 个 goroutine 阻塞在通道发送 (runtime.gopark)",
  "regex": "goroutine\\ leak:\\ N\\ goroutines\\ blocked\\ in\\ chan\\ send\\ \\(runtime\\.gopark\\)",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Goroutines send to an unbuffered channel whose receiver has exited or never runs, so they block forever. Memory and goroutine count grow unbounded over time.",
  "root_cause_type": "generic",
  "root_cause_zh": "goroutine 向无缓冲通道发送数据，但接收方已退出或从未运行，导致永久阻塞。内存和 goroutine 数量随时间无限增长。",
  "versions": [
    {
      "version": "1.7+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "GOMAXPROCS controls scheduler parallelism, not goroutine blocking; blocked goroutines remain blocked.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Blocked goroutines are reachable from the scheduler and are not collected; GC cannot free them.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "select {\ncase out <- v:\ncase <-ctx.Done():\n    return ctx.Err()\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.82,
      "how": "ch := make(chan int, len(producers))\n// producers can always send without blocking",
      "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-05-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}