New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forkserver process isn't re-launched if it died #75489
Comments
It may happen that the forkserver process dies (for example if SIGINT is received because the user pressed Ctrl-C) while the parent process is still alive. In that case, if the parent tries to create a new Process instance, an exception is received. The exception looks like this: File "/xxx/lib/python3.5/multiprocessing/popen_forkserver.py", line 52, in _launch |
I have two concerns with this:
I do appreciate the use cases that would be addressed by having a convenient way to detect that a forkserver has died and then restart it. If the forkserver dies, I doubt we really want it to try to restart a potentially infinite number of times. Maybe a better path would be if we had a way to explicitly request that the Process trigger a restart of the forkserver, if necessary, but this setting/request defaults to False? |
Well, the forkserver process really is an implementation detail. It already is started on-demand, so restarting it if needed sounded like a natural evolution. Another example: in a multiprocessing Pool, if a worker process crashes, another will be restarted transparently (same in concurrent.futures.ProcessPoolExecutor, incidentally).
That's possible. I've never seen the Manager used in the wild. Though if some fundamental difference justifies the inconsistency, the inconsistency is not really a problem. |
Looks like this will not make into 3.6.3. I'd like to sum up the discussion a bit:
Also, bpo-31310 is a similar issue for the semaphore tracker. |
From a user's perspective I would definitely appreciate forkserver being protected from SIGINT. This bug affects me in practice. If the forkserver goes down I personally have no objection to it restarting automatically, though I appreciate that I have a narrow view of this topic. Davin, at your last comment it seemed like you had reservations about this going in. Did Antoine's recent comments resolve these concerns or no? Do you have any suggestions on what might be done to protect users from SIGINT crashing the forkserver? |
Davin, I think I'm going to merge the PR for this. If you object it, it can still be reverted later. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: