{
  "id": "go/context-deadline-exceeded-in-goroutine",
  "signature": "context deadline exceeded",
  "signature_zh": "上下文截止时间已超过",
  "regex": "context\\ deadline\\ exceeded",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A goroutine using a context with a deadline did not complete in time; the derived context returns DeadlineExceeded.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用带截止时间的上下文的 goroutine 未在规定时间内完成，派生上下文返回 DeadlineExceeded。",
  "versions": [
    {
      "version": "1.7+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Hides the underlying slowness; the deadline will eventually be hit again.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Downstream operations see a cancelled context and fail with different errors.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "for {\n    select {\n    case <-ctx.Done():\n        return ctx.Err()\n    default:\n        doChunk()\n    }\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.92,
      "how": "ctx, cancel := context.WithCancel(parent)\ndefer cancel()",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}