{
  "id": "python/pytest-timeout-hung-test",
  "signature": "Failed: Timeout (>60.0s) from pytest-timeout.",
  "signature_zh": "失败：来自 pytest-timeout 的超时（>60.0s）。",
  "regex": "Failed:\\ Timeout\\ \\(>60\\.0s\\)\\ from\\ pytest\\-timeout\\.",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A test blocked on network I/O, an unclosed socket, a deadlock, or an infinite loop; pytest-timeout killed it after the configured threshold.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试阻塞在网络 I/O、未关闭的套接字、死锁或无限循环上；pytest-timeout 在配置的阈值后终止了它。",
  "versions": [
    {
      "version": "2.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Extends CI time without fixing the underlying hang.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "CI hangs indefinitely; hides the bug.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "A hang is not flakiness.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pytest --timeout=60 --timeout-method=thread -o faulthandler_timeout=55 tests/test_net.py",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "from unittest import mock\n\n@mock.patch('app.client.requests.get')\ndef test_fetch(mock_get):\n    mock_get.return_value.json.return_value = {\"ok\": True}\n    ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "@pytest.mark.timeout(5)\ndef test_quick(): ...",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}