[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor
STINNER Victor
report at bugs.python.org
Tue Apr 28 12:43:01 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
Thomas Moreau: "One solution would be to use the `self._shutdown_lock` from the executor to protect the call to `close` in `terminate_broken` and the call to `self._thread_wakeup.wakeup` in `shutdown`. That way, the lock is only acquired at critical points without being used all the time. This could also be done by adding `lock=True/False` to only lock the potentially dangerous calls."
I wrote a conservative PR 19760 which always lock ProcessPoolExecutor._shutdown_lock while accessing _ThreadWakeup.
PR 19760 fix test_killed_child(): it doesn't fail anymore, even with my msg367463 patch (add sleep).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39995>
_______________________________________
More information about the Python-bugs-list
mailing list