[all-commits] [llvm/llvm-project] 009b9f: [lit] Fix lit hang on pool join when exception is ...
David Garcia Orozco via All-commits
all-commits at lists.llvm.org
Tue May 6 10:05:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 009b9f4fb8f029f98767b5cb2c1f939119953503
https://github.com/llvm/llvm-project/commit/009b9f4fb8f029f98767b5cb2c1f939119953503
Author: David Garcia Orozco <david.garcia.orozco at intel.com>
Date: 2025-05-06 (Tue, 06 May 2025)
Changed paths:
M llvm/utils/lit/lit/TestRunner.py
A llvm/utils/lit/tests/Inputs/timeout-hang/lit.cfg
A llvm/utils/lit/tests/Inputs/timeout-hang/run-nonexistent.txt
A llvm/utils/lit/tests/timeout-hang.py
Log Message:
-----------
[lit] Fix lit hang on pool join when exception is thrown (#131881)
Fixes #133914
When using the internal shell with a timeout set lit will hang on the
following call if an exception is thrown and not immediately caught
https://github.com/llvm/llvm-project/blob/19970535f92c0f2dcda01b7fc60f95945166e424/llvm/utils/lit/lit/run.py#L93
This can occur when using the internal lit shell and trying to run a
program that does not exist. In this case `_executeShCmd` will throw an
internal shell error, which will not be caught by the function directly
calling it, `executeShCmd`, rather it is caught one function higher in
the call stack in `executeScriptInternal`. Because that exception is
percolated up the call stack instead of being immediately caught lit
will hang until the test timeout expires. This patch changes the
location where we catch this exception to `executeShCmd` instead to
avoid this.
For more background on what causes this hang see:
https://stackoverflow.com/questions/15314189/python-multiprocessing-pool-hangs-at-join
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list