[issue21009] Potential deadlock in concurrent futures when garbage collection occurs during Queue.get

Simon Jagoe report at bugs.python.org
Sun Sep 10 11:47:10 EDT 2017


Simon Jagoe added the comment:

In the script attached to the original issue, the weakref callback that causes the hang is the callback defined in ThreadPoolExecutor._adjust_thread_count

Attached is a faulthandler stack captured from Python 3.6.1. The script submitted here uses a patched queue.get() method to force garbage collection to reliably trigger the issue, but this deadlock was observed in a real application using threadpool executors.

----------
Added file: https://bugs.python.org/file47132/executor-hang-faulthandler.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21009>
_______________________________________


More information about the Python-bugs-list mailing list