{
  "id": "cmake/ctest-timeout-unexpected-exit",
  "signature": "CMake Error: The test 'test_network' exited with code 137 (SIGKILL). This may indicate a timeout or memory exhaustion.",
  "signature_zh": "CMake 错误：测试 'test_network' 以退出码 137 (SIGKILL) 退出。这可能表示超时或内存耗尽。",
  "regex": "CMake Error: The test '.*' exited with code 137 \\(SIGKILL\\). This may indicate a timeout or memory exhaustion\\.",
  "domain": "cmake",
  "category": "test_error",
  "subcategory": null,
  "root_cause": "A CTest test was killed by the operating system, typically due to exceeding the timeout limit set by CTest or running out of memory (OOM killer).",
  "root_cause_type": "generic",
  "root_cause_zh": "CTest 测试被操作系统杀死，通常是由于超过 CTest 设置的超时限制或内存不足（OOM 杀手）。",
  "versions": [
    {
      "version": "3.15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.19",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.23",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.27",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing system memory without adjusting CTest timeout",
      "why_fails": "If the test hangs or is slow, adding memory does not fix the timeout; the test still gets killed at the same wall-clock limit.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling the test entirely in CTest configuration",
      "why_fails": "This hides the problem but does not resolve the underlying issue (e.g., infinite loop or resource leak). The test may be critical for CI.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting CMAKE_CTEST_TIMEOUT to 0 (infinite) globally",
      "why_fails": "Infinite timeout can cause CI pipelines to hang indefinitely if the test never completes, leading to resource exhaustion.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the test timeout in CTest: ctest --timeout 600 or add set_tests_properties(test_network PROPERTIES TIMEOUT 600) in CMakeLists.txt.",
      "success_rate": 0.8,
      "how": "Increase the test timeout in CTest: ctest --timeout 600 or add set_tests_properties(test_network PROPERTIES TIMEOUT 600) in CMakeLists.txt.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize the test to use less memory: check for memory leaks with valgrind or address sanitizer, and reduce data structures.",
      "success_rate": 0.7,
      "how": "Optimize the test to use less memory: check for memory leaks with valgrind or address sanitizer, and reduce data structures.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Run the test with increased resource limits: ulimit -v 4194304 (4 GB virtual memory) before launching ctest.",
      "success_rate": 0.75,
      "how": "Run the test with increased resource limits: ulimit -v 4194304 (4 GB virtual memory) before launching ctest.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "增加 CTest 的测试超时时间：ctest --timeout 600 或在 CMakeLists.txt 中添加 set_tests_properties(test_network PROPERTIES TIMEOUT 600)。",
    "优化测试以减少内存使用：使用 valgrind 或地址清理器检查内存泄漏，并减少数据结构。",
    "在启动 ctest 之前使用更高的资源限制运行测试：ulimit -v 4194304（4 GB 虚拟内存）。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/manual/ctest.1.html#options",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2024-01-08",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}