<div dir="ltr">For the record, this was fixed in r375264.<div><br></div><div>Thanks</div><div>Russ</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 18 Oct 2019 at 13:30, Russell Gallop <<a href="mailto:russell.gallop@gmail.com">russell.gallop@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Julian,<div><br></div><div>I see "timeout value is too large" errors with this version too, on Windows with python 3.6.8 (64bit):</div><div><br></div><div>Example:</div><div>>C:\Python36\python.exe --version<br>Python 3.6.8<br><br>>C:\Python36\python.exe bin/llvm-lit.py  ../llvm/test/Other<br>-- Testing: 107 tests, 12 workers --<br>Traceback (most recent call last):<br>  File "bin/llvm-lit.py", line 42, in <module><br>    main(builtin_parameters)<br>  File "<path...>/llvm-project/llvm\utils\lit\lit\main.py", line 97, in main<br>    testing_time = run_tests(tests, litConfig, opts, numTotalTests)<br>  File "<path...>/llvm-project/llvm\utils\lit\lit\main.py", line 222, in run_tests<br>    elapsed = run_tests_in_tmp_dir(run.execute, litConfig)<br>  File "<path...>/llvm-project/llvm\utils\lit\lit\main.py", line 256, in run_tests_in_tmp_dir<br>    return run_callback()<br>  File "<path...>/llvm-project/llvm\utils\lit\lit\run.py", line 54, in execute<br>    self._execute()<br>  File "<path...>/llvm-project/llvm\utils\lit\lit\run.py", line 149, in _execute<br>    a.wait(timeout)<br>  File "C:\Python36\lib\multiprocessing\pool.py", line 635, in wait<br>    self._event.wait(timeout)<br>  File "C:\Python36\lib\threading.py", line 551, in wait<br>    signaled = self._cond.wait(timeout)<br>  File "C:\Python36\lib\threading.py", line 299, in wait<br>    gotit = waiter.acquire(True, timeout)<br>OverflowError: timeout value is too large<br></div><div><br></div><div>Please can you take a look?</div><div><br></div><div>Thanks</div><div>Russ</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Oct 2019 at 21:19, Julian Lettner via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: yln<br>
Date: Thu Oct 17 13:22:32 2019<br>
New Revision: 375165<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=375165&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=375165&view=rev</a><br>
Log:<br>
Reland "[lit] Synthesize artificial deadline"<br>
<br>
We always want to use a deadline when calling `result.await`.  Let's<br>
synthesize an artificial deadline (now plus one year) to simplify code<br>
and do less busy waiting.<br>
<br>
Thanks to Reid Kleckner for diagnosing that a deadline for of "positive<br>
infinity" does not work with Python 3 anymore.  See commit:<br>
4ff1e34b606d9a9fcfd8b8b5449a558315af94e5<br>
<br>
I tested this patch with Python 2 and Python 3.<br>
<br>
Modified:<br>
    llvm/trunk/utils/lit/lit/run.py<br>
<br>
Modified: llvm/trunk/utils/lit/lit/run.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/run.py?rev=375165&r1=375164&r2=375165&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/run.py?rev=375165&r1=375164&r2=375165&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/lit/lit/run.py (original)<br>
+++ llvm/trunk/utils/lit/lit/run.py Thu Oct 17 13:22:32 2019<br>
@@ -12,6 +12,7 @@ class NopSemaphore(object):<br>
     def release(self): pass<br>
<br>
 def create_run(tests, lit_config, workers, progress_callback, max_time):<br>
+    # TODO(yln) assert workers > 0<br>
     if workers == 1:<br>
         return SerialRun(tests, lit_config, progress_callback, max_time)<br>
     return ParallelRun(tests, lit_config, progress_callback, max_time, workers)<br>
@@ -107,11 +108,9 @@ class ParallelRun(Run):<br>
         self.workers = workers<br>
<br>
     def _execute(self):<br>
-        # We need to issue many wait calls, so compute the final deadline and<br>
-        # subtract time.time() from that as we go along.<br>
-        deadline = None<br>
-        if self.max_time:<br>
-            deadline = time.time() + self.max_time<br>
+        one_year = 365 * 24 * 60 * 60  # days * hours * minutes * seconds<br>
+        max_time = self.max_time or one_year<br>
+        deadline = time.time() + max_time<br>
<br>
         semaphores = {<br>
             k: NopSemaphore() if v is None else<br>
@@ -146,15 +145,10 @@ class ParallelRun(Run):<br>
             # Wait for all results to come in. The callback that runs in the<br>
             # parent process will update the display.<br>
             for a in async_results:<br>
-                if deadline:<br>
-                    a.wait(deadline - time.time())<br>
-                else:<br>
-                    # Python condition variables cannot be interrupted unless<br>
-                    # they have a timeout. This can make lit unresponsive to<br>
-                    # KeyboardInterrupt, so do a busy wait with a timeout.<br>
-                    while not a.ready():<br>
-                        a.wait(1)<br>
+                timeout = deadline - time.time()<br>
+                a.wait(timeout)<br>
                 if not a.successful():<br>
+                    # TODO(yln): this also raises on a --max-time time<br>
                     a.get() # Exceptions raised here come from the worker.<br>
                 if self.hit_max_failures:<br>
                     break<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>