{
  "id": "python/pytest-timeout-test-exceeded",
  "signature": "Failed: Timeout >300.0s\n\npytest-timeout: test_heavy_import timed out after 300 seconds",
  "signature_zh": "失败: 超时 >300.0s\n\npytest-timeout: test_heavy_import 在 300 秒后超时",
  "regex": "Failed:\\ Timeout\\ >300\\.0s\\\n\\\npytest\\-timeout:\\ test_heavy_import\\ timed\\ out\\ after\\ 300\\ seconds",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A test exceeded the configured timeout (global or per-test). Often caused by a blocking network call, an unclosed DB transaction waiting on a lock, or a subprocess that never terminates.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试超过了配置的超时时间（全局或单测试）。通常由阻塞的网络调用、等待锁的未关闭数据库事务，或永不终止的子进程引起。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Hides the real hang; CI now waits an hour per stuck test, and the underlying deadlock persists.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "CI will hang indefinitely on the same test, blocking the whole pipeline.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "# pyproject.toml\n[tool.pytest.ini_options]\naddopts = \"--timeout=60 --timeout-method=signal\"\n\n# per-test\n@pytest.mark.timeout(10)\ndef test_api():\n    ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pytest -o faulthandler_timeout=30 tests/test_heavy_import.py -s\n# or run with py-spy\npy-spy dump --pid <pid>",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-12-03",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}