Skip to content

[WIP] bpo-33966, multiprocessing: Fix another handle leak #7965

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

Closed
wants to merge 1 commit into from
Closed

[WIP] bpo-33966, multiprocessing: Fix another handle leak #7965

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 27, 2018

When using a pool of processes on Windows, if the worker is
terminated quickly, handles created by DupHandle() on
reduction.dump() can remain open in the parent process causing a
handles leak.

Use a different strategy in the case: keep the handle open in the
parent process for the lifetime of the worker, and the parent becomes
responsible to close the handle when the worker completes.

https://bugs.python.org/issue33966

When using a pool of processes on Windows, if the worker is
terminated quickly, handles created by DupHandle() on
reduction.dump() can remain open in the parent process causing a
handles leak.

Use a different strategy in the case: keep the handle open in the
parent process for the lifetime of the worker, and the parent becomes
responsible to close the handle when the worker completes.
@vstinner
Copy link
Member Author

This change tries to fix https://bugs.python.org/issue33966 but test_wait() hangs with the change. I'm working on a different approach.

@vstinner
Copy link
Member Author

I abandon this change because it changes the semantics: PR #7966 is a simpler and safer approach.

@vstinner vstinner closed this Jun 27, 2018
@vstinner vstinner deleted the spawn_close_source branch June 27, 2018 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants