llvm-project
009b9f4f - [lit] Fix lit hang on pool join when exception is thrown (#131881)

Commit
282 days ago
[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
Author
David Garcia Orozco
Parents
Loading