Author vstinner
Recipients jkloth, nanjekyejoannah, vstinner
Date 2019-08-20.15:33:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566315184.75.0.692964470864.issue37531@roundup.psfhosted.org>
In-reply-to
Content
I just tested the 3.7 branch manually: regrtest works as expected.

I'm using this local changes:

diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runtest.py
index e7dce180cb..7d996d6918 100644
--- a/Lib/test/libregrtest/runtest.py
+++ b/Lib/test/libregrtest/runtest.py
@@ -119,7 +119,7 @@ def _runtest(ns, test_name):
 
     use_timeout = (ns.timeout is not None)
     if use_timeout:
-        faulthandler.dump_traceback_later(ns.timeout, exit=True)
+        pass #faulthandler.dump_traceback_later(ns.timeout, exit=True)
 
     start_time = time.perf_counter()
     try:
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 8032da0530..e21399c840 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -89,6 +89,7 @@ class FileTests(unittest.TestCase):
     tearDown = setUp
 
     def test_access(self):
+        import time; time.sleep(3600)
         f = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR)
         os.close(f)
         self.assertTrue(os.access(support.TESTFN, os.W_OK))


Then I ran:

vstinner@apu$ ./python -m test -j2 test_os -m test_access --timeout=3
Run tests in parallel using 2 child processes
0:00:04 load avg: 0.59 [1/1/1] test_os timed out (4 sec 512 ms)

== Tests result: FAILURE ==

1 test failed:
    test_os

Total duration: 4 sec 545 ms
Tests result: FAILURE

As you can see, test_os is killed after 4.5 seconds, as expected (it uses timeout x 1.5, since faulthandler is supposed to be first watchdog with timeout seconds).

--

Maybe something is wrong with test_concurrent_futures on Windows. Maybe subprocess.Popen.kill() is unable to kill the process immediately for an unknown reason?

Or maybe subprocess.Popen.communicate(timeout=self.timeout) didn't fail with TimeoutExpired?

Sadly, libregrtest is quite when it kills a worker process because of timeout, since the following output should be enough to understand what happened. But here the worker was not killed, or failed to be killed, or something else...
History
Date User Action Args
2019-08-20 15:33:04vstinnersetrecipients: + vstinner, jkloth, nanjekyejoannah
2019-08-20 15:33:04vstinnersetmessageid: <1566315184.75.0.692964470864.issue37531@roundup.psfhosted.org>
2019-08-20 15:33:04vstinnerlinkissue37531 messages
2019-08-20 15:33:04vstinnercreate