[Lldb-commits] [PATCH] D13555: Cap test threads on Windows to avoid open file limit

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 9 14:28:56 PDT 2015


amccarth updated this revision to Diff 36993.
amccarth added a comment.

Using the multiprocessing-pool mode seems more reliable than capping num_threads.  I'm doing it only when the number of threads is high because of the loss of Ctrl+C support.


http://reviews.llvm.org/D13555

Files:
  test/dosep.py

Index: test/dosep.py
===================================================================
--- test/dosep.py
+++ test/dosep.py
@@ -1254,10 +1254,13 @@
         # Use the serial runner.
         test_runner_name = "serial"
     elif os.name == "nt":
-        # Currently the multiprocessing test runner with ctrl-c
-        # support isn't running correctly on nt.  Use the pool
-        # support without ctrl-c.
-        test_runner_name = "threading-pool"
+        # On Windows, Python uses CRT with a low limit on the number of open
+        # files.  If you have a lot of cores, the threading-pool runner will
+        # often fail because it exceeds that limit.
+        if num_threads > 32:
+            test_runner_name = "multiprocessing-pool"
+        else:
+            test_runner_name = "threading-pool"
     elif is_darwin_version_lower_than(
             distutils.version.StrictVersion("10.10.0")):
         # OS X versions before 10.10 appear to have an issue using


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13555.36993.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151009/1450af8b/attachment.bin>


More information about the lldb-commits mailing list