STINNER Victor <vstin...@python.org> added the comment:

Example of the problem: sometimes, interrupting a multiprocessing test hangs. 
regrtest fails to interrupt a TestWorkerProcess thread.

$ ./python -m test test_multiprocessing_fork -j10 -F --timeout=60 --slowest
0:00:00 load avg: 1.09 Run tests in parallel using 10 child processes
^C
Kill <TestWorkerProcess #1 running test=test_multiprocessing_fork pid=4504 
time=2.3 sec>
Kill <TestWorkerProcess #2 running test=test_multiprocessing_fork pid=4503 
time=2.3 sec>
Kill <TestWorkerProcess #3 running test=test_multiprocessing_fork pid=4506 
time=2.3 sec>
Kill <TestWorkerProcess #4 running test=test_multiprocessing_fork pid=4505 
time=2.3 sec>
Kill <TestWorkerProcess #5 running test=test_multiprocessing_fork pid=4510 
time=2.3 sec>
Kill <TestWorkerProcess #6 running test=test_multiprocessing_fork pid=4509 
time=2.3 sec>
Kill <TestWorkerProcess #7 running test=test_multiprocessing_fork pid=4513 
time=2.3 sec>
Kill <TestWorkerProcess #8 running test=test_multiprocessing_fork pid=4514 
time=2.3 sec>
Kill <TestWorkerProcess #9 running test=test_multiprocessing_fork pid=4516 
time=2.3 sec>
Kill <TestWorkerProcess #10 running test=test_multiprocessing_fork pid=4517 
time=2.3 sec>
0:00:03 load avg: 1.88 Waiting for <TestWorkerProcess #1 running 
test=test_multiprocessing_fork pid=4504 time=3.3 sec> thread for 1.0 sec
0:00:04 load avg: 1.88 Waiting for <TestWorkerProcess #1 running 
test=test_multiprocessing_fork pid=4504 time=4.3 sec> thread for 2.0 sec
0:00:05 load avg: 1.73 Waiting for <TestWorkerProcess #1 running 
test=test_multiprocessing_fork pid=4504 time=5.3 sec> thread for 3.0 sec
(...)


With my PR, I cannot reproduce the "Waiting for ..." issue anymore.

----------

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

Reply via email to