STINNER Victor <vstin...@redhat.com> added the comment:

The issue can be reproduced with regrtest:
* Copy attached test_kill.py to Lib/test/
* Run: python -m test test_kill -v -j2 --timeout=5

I also applied the following changes to regrtest:

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/libregrtest/runtest_mp.py 
b/Lib/test/libregrtest/runtest_mp.py
index c22479b797..51352497ae 100644
--- a/Lib/test/libregrtest/runtest_mp.py
+++ b/Lib/test/libregrtest/runtest_mp.py
@@ -19,10 +19,10 @@ from test.libregrtest.utils import format_duration


 # Display the running tests if nothing happened last N seconds
-PROGRESS_UPDATE = 30.0   # seconds
+PROGRESS_UPDATE = 1.0   # seconds

 # Time to wait until a worker completes: should be immediate
-JOIN_TIMEOUT = 30.0   # seconds
+JOIN_TIMEOUT = 5.0   # seconds


 def must_stop(result, ns):
@@ -305,7 +305,7 @@ class MultiprocessRunner:
         self.pending = MultiprocessIterator(self.regrtest.tests)
         if self.ns.timeout is not None:
             self.worker_timeout = self.ns.timeout * 1.5
-            self.main_timeout = self.ns.timeout * 2.0
+            self.main_timeout = self.ns.timeout * 10.0
         else:
             self.worker_timeout = None
             self.main_timeout = None

----------
Added file: https://bugs.python.org/file48556/test_kill.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to