classification
Title: multiprocessing should log a warning when forking multithreaded process
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: davin, sbt, trcarden
Priority: normal Keywords:

Created on 2015-06-25 18:19 by trcarden, last changed 2015-06-28 01:08 by ned.deily.

Messages (1)
msg245825 - (view) Author: Timothy Cardenas (trcarden) Date: 2015-06-25 18:19
We were tracking down a bug the other day that was rather hard to find involving a forking a process that had both a primary thread and a logging thread. The docs clearly state that forking a multithreaded process is "problematic" https://docs.python.org/3.4/library/multiprocessing.html#contexts-and-start-methods

However given that it is very simple to check if the process currently has multiple threads at the time of the forking operation and that its almost never safe to do so with multiple running threads I was wondering if it made sense to add a message that warned that a unsafe operation (forking a multithreaded process without the forkserver option) was occurring.
History
Date User Action Args
2015-06-28 01:08:09ned.deilysetnosy: + sbt, davin

versions: + Python 3.5, Python 3.6, - Python 3.2, Python 3.3
2015-06-25 18:19:54trcardencreate