Skip to content
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

[release/0.9] Fix process handle leak when launching a job container #2188

Merged

Conversation

yyatmsft
Copy link
Contributor

Cherry-picking this PR into release/0.9

#2020

commit: 976716e

CreateProcess gives us back a handle to the newly created process. Previously, we ignored this handle, which meant it was leaking every time we created a new job container (or anything else that uses internal/exec in the future).

Process handle leaks can be bad as an exited process is left as a "zombie" until all handles to it have closed, continuing to use memory.

Fix this by closing the handle from CreateProcess.

CreateProcess gives us back a handle to the newly created process.
Previously, we ignored this handle, which meant it was leaking every
time we created a new job container (or anything else that uses
internal/exec in the future).

Process handle leaks can be bad as an exited process is left as a
"zombie" until all handles to it have closed, continuing to use memory.

Fix this by closing the handle from CreateProcess.

Signed-off-by: Kevin Parsons <[email protected]>
@yyatmsft yyatmsft requested a review from a team as a code owner June 27, 2024 00:02
@kiashok
Copy link
Contributor

kiashok commented Jun 27, 2024

image

test failure is not related to this change.

LGTM!

@yyatmsft yyatmsft merged commit 03a825b into microsoft:release/0.9 Jun 27, 2024
13 of 14 checks passed
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