[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x
STINNER Victor
report at bugs.python.org
Tue Jun 21 03:05:35 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Oh, I think that I found a deadlock (or something like that):
----------------------------
import concurrent.futures
import faulthandler
import os
import signal
import time
def work(n):
time.sleep(0.1)
def main():
faulthandler.register(signal.SIGUSR1)
print("pid: %s" % os.getpid())
with concurrent.futures.ProcessPoolExecutor() as executor:
for number, prime in executor.map(work, range(100)):
print("shutdown")
executor.shutdown()
print("shutdown--")
if __name__ == '__main__':
main()
----------------------------
Trace:
----------------------------
Thread 0x00007fbfc83bd700:
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 237 in wait
File "/home/haypo/prog/HG/cpython/Lib/multiprocessing/queues.py", line 252 in _feed
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 690 in run
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 737 in _bootstrap_inner
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 710 in _bootstrap
Thread 0x00007fbfc8bbe700:
File "/home/haypo/prog/HG/cpython/Lib/multiprocessing/queues.py", line 101 in put
File "/home/haypo/prog/HG/cpython/Lib/concurrent/futures/process.py", line 268 in _queue_management_worker
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 690 in run
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 737 in _bootstrap_inner
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 710 in _bootstrap
Current thread 0x00007fbfcc2e3700:
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 237 in wait
File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 851 in join
File "/home/haypo/prog/HG/cpython/Lib/concurrent/futures/process.py", line 395 in shutdown
File "/home/haypo/prog/HG/cpython/Lib/concurrent/futures/_base.py", line 570 in __exit__
File "y.py", line 17 in main
File "y.py", line 20 in <module>
----------------------------
There are two child processes, but both are zombies (displayed as "<defunct>" by ps). Send SIGUSR1 signal to the frozen process to display the traceback (thanks to faulthandler).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12364>
_______________________________________
More information about the Python-bugs-list
mailing list