bpo-38707: Fix for multiprocessing.Process MainThread.native_id#17088
bpo-38707: Fix for multiprocessing.Process MainThread.native_id#17088miss-islington merged 9 commits intopython:masterfrom
Conversation
3816eee to
9bca1c8
Compare
|
Tests passed – ready to merge! @brandtbucher |
|
CC @pitrou |
|
cc @vstinner |
pitrou
left a comment
There was a problem hiding this comment.
LGTM except for one minor comment.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I didn't expect the Spanish Inquisition :) |
|
Nobody expects the Spanish Inquisition! @pitrou: please review the changes made to this pull request. |
|
@jaketesler: Status check is done, and it's a success ✅ . |
|
Thanks @jaketesler for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…onGH-17088) This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou (cherry picked from commit c6b20be) Co-authored-by: Jake Tesler <[email protected]>
|
GH-17261 is a backport of this pull request to the 3.8 branch. |
…7088) This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou (cherry picked from commit c6b20be) Co-authored-by: Jake Tesler <[email protected]>
…onGH-17088) This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou
…onGH-17088) This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou
This PR implements a fix for
multiprocessing.Processobjects; the error occurs when Processes are created using eitherforkorforkserveras thestart_method.In these instances, the
MainThreadof the newly createdProcessobject retains all attributes from its parent'sMainThreadobject, including thenative_idattribute. The resulting behavior is such that the new process'MainThreadcaptures an incorrect/outdatednative_id(the parent's instead of its own).This change forces the Process object to update its
native_idattribute during the bootstrap process.cc @vstinner
https://bugs.python.org/issue38707
Automerge-Triggered-By: @pitrou