Skip to content

[3.7] bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)#7960

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-2cc9d21-3.7
Jun 27, 2018
Merged

[3.7] bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)#7960
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-2cc9d21-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 27, 2018

Copy link
Copy Markdown
Contributor

Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates
the read end of pipe instead of "stealing" it.

Previously, the read end of pipe was "stolen" by the child process,
but it leaked a handle if the child process had been terminated
before it could steal the handle from the parent process.
(cherry picked from commit 2cc9d21)

Co-authored-by: Victor Stinner [email protected]

https://bugs.python.org/issue33929

…GH-7921)

Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates
the read end of pipe instead of "stealing" it.

Previously, the read end of pipe was "stolen" by the child process,
but it leaked a handle if the child process had been terminated
before it could steal the handle from the parent process.
(cherry picked from commit 2cc9d21)

Co-authored-by: Victor Stinner <[email protected]>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot 🤖!

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitrou doens't want to backport the fix:
#7921 (comment)

@bedevere-bot

Copy link
Copy Markdown

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 have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Backport status check is done, and it's a success ✅ .

@vstinner

Copy link
Copy Markdown
Member

Oh. I approved the PR, but then I blocked it by voting -1 and... the bot merged the PR anyway :-( I reported the bot bug: python/miss-islington#111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants