New submission from Florian Finkernagel: If you import a module that creates a multiprocessing.Queue, puts a value, and then waits for to be received again from the queue, you run into a deadlock.
The issue is that Queue._feed does 'from .util import is_existing' - which needs the import lock, but is still being held by the main thread. Attached a script that illustrates this. Patch is a two line change, import is_exiting in line 49, remove the import inside the thread: 49c49 < from multiprocessing.util import debug, info, Finalize, register_after_fork --- > from multiprocessing.util import debug, info, Finalize, register_after_fork, > is_exiting 232d231 < from .util import is_exiting ---------- files: show_queue_import_bug.py messages: 231073 nosy: ffinkernagel priority: normal severity: normal status: open title: Multiprocessing.Queue._feed deadlocks on import versions: Python 2.7 Added file: http://bugs.python.org/file37185/show_queue_import_bug.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22853> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com