[Lldb-commits] [lldb] [lldb][Windows] Dump thread stacks before lit's timeout kills a test (PR #213239)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 3 08:26:49 PDT 2026
================
@@ -504,6 +504,19 @@ def registerFaulthandler():
if getattr(faulthandler, "register", None):
faulthandler.register(signal.SIGTERM, chain=True)
+ if sys.platform != "win32":
+ return
+
+ # lit kills a hung test with TerminateProcess on Windows, so the SIGTERM
+ # handler above never runs and a timeout is reported with no indication of
+ # where it hung. Dump every thread's stack while the process is still alive.
+ try:
+ secs = float(os.environ.get("LLDB_TEST_STACK_DUMP_SECS", 300))
+ except ValueError:
+ secs = 300
----------------
adrian-prantl wrote:
We should not hardcode any timeouts let alone in different places. Would it be possible to derive this from the per-test timeout setting?
https://github.com/llvm/llvm-project/pull/213239
More information about the lldb-commits
mailing list