[llvm] ddff81f - Revert "lit: revert 134b103fc0f3a995d76398bf4b029d72bebe8162"

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 18:02:03 PDT 2021


Author: Arthur Eubanks
Date: 2021-05-07T18:00:11-07:00
New Revision: ddff81f6925655ac82fc70ebeb6edc511a62b3b5

URL: https://github.com/llvm/llvm-project/commit/ddff81f6925655ac82fc70ebeb6edc511a62b3b5
DIFF: https://github.com/llvm/llvm-project/commit/ddff81f6925655ac82fc70ebeb6edc511a62b3b5.diff

LOG: Revert "lit: revert 134b103fc0f3a995d76398bf4b029d72bebe8162"

This reverts commit d319005a3746a7661c8c9a3302266b6ff7cf61be.

Causing messages like:

  File "...\Python\Python39\lib\multiprocessing\connection.py", line 816, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 74

Added: 
    

Modified: 
    llvm/utils/lit/lit/util.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py
index fb96b2238b89..0d8f0040f41c 100644
--- a/llvm/utils/lit/lit/util.py
+++ b/llvm/utils/lit/lit/util.py
@@ -119,6 +119,12 @@ def usable_core_count():
         n = len(os.sched_getaffinity(0))
     except AttributeError:
         n = os.cpu_count() or 1
+
+    # On Windows, with more than 32 processes, process creation often fails with
+    # "Too many open files".  FIXME: Check if there's a better fix.
+    if platform.system() == 'Windows':
+        return min(n, 32)
+
     return n
 
 


        


More information about the llvm-commits mailing list