Repository navigation
bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary - #3246
Conversation
|
TODO: investigate what happens with previously-launched processes. Edit: done. |
…race condition in test_many_processes.
…nto detect_forkserver_death
|
@applio, I'm planning to merge this soon. |
|
|
||
| proc.join() | ||
| self.assertTrue(evt.is_set()) | ||
| self.assertIn(proc.exitcode, (0, 255)) |
There was a problem hiding this comment.
Hi,
I don't see/get where you assert that a new process is started.. something like :
new_pid = _forkserver._forkserver_pid # EDIT removed typo assert
assert new_pid is not None and pid != new_pid
or did I miss something ?
Regards.
There was a problem hiding this comment.
Indeed I don't. I'm not sure it's important, though, since what matters is that the Process API continues working properly.
There was a problem hiding this comment.
True. self.Process(..) does that indeed.
|
Added comments on the issue tracker (at https://bugs.python.org/issue31308). In short, I like the idea but I think we need to be more explicit about what we ask the forkserver to do. |
…n when necessary (pythonGH-3246) * bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary. * Fix test on Windows * Add NEWS entry * Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker. * Fix comment * Make sure the test doesn't muck with process state * Also test previously-started processes * Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst * Avoid masking SIGTERM in forkserver. It's not necessary and causes a race condition in test_many_processes.. (cherry picked from commit fc6b348)
…n when necessary (GH-3246) (#4252) * bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary. * Fix test on Windows * Add NEWS entry * Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker. * Fix comment * Make sure the test doesn't muck with process state * Also test previously-started processes * Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst * Avoid masking SIGTERM in forkserver. It's not necessary and causes a race condition in test_many_processes.. (cherry picked from commit fc6b348)
… necessary (python#3246) * bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary. * Fix test on Windows * Add NEWS entry * Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker. * Fix comment * Make sure the test doesn't muck with process state * Also test previously-started processes * Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst * Avoid masking SIGTERM in forkserver. It's not necessary and causes a race condition in test_many_processes.
https://bugs.python.org/issue31308