{
  "id": "go/goroutine-leak-time-tick",
  "signature": "error: runtime: goroutine leak detected: time.Tick never stopped",
  "signature_zh": "错误：运行时检测到 goroutine 泄漏：time.Tick 从未停止",
  "regex": "error:\\ runtime:\\ goroutine\\ leak\\ detected:\\ time\\.Tick\\ never\\ stopped",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "time.Tick returns a channel that is never garbage collected; each call leaks a goroutine for the process lifetime.",
  "root_cause_type": "generic",
  "root_cause_zh": "time.Tick 返回的通道永远不会被垃圾回收；每次调用都会为进程生命周期泄漏一个 goroutine。",
  "versions": [
    {
      "version": "1.18",
      "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"
    },
    {
      "version": "1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Each new ticker adds a goroutine; long-running services leak unboundedly.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "time.Tick's underlying ticker is intentionally retained by the runtime.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "t := time.NewTicker(time.Second)\ndefer t.Stop()\nfor range t.C { /* ... */ }",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "timer := time.AfterFunc(time.Second, func() { /* ... */ })\ndefer timer.Stop()",
      "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-11-03",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}