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.11]: Fix process handle leak when launching a job container #2187

Merged

Conversation

yyatmsft
Copy link
Contributor

@yyatmsft yyatmsft commented Jun 26, 2024

Cherry-picking this PR into release/0.11

#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 26, 2024 23:30
@kiashok
Copy link
Contributor

kiashok commented Jun 26, 2024

nit: could you fix the title with "[release/0.11]" instead of "cherry-pick" ? Also would be good to have the commit hash of the original PR that you are using to cherry-pick in the PR description

@yyatmsft yyatmsft changed the title cherry-pick: Fix process handle leak when launching a job container [release/0.11]: Fix process handle leak when launching a job container Jun 26, 2024
@kiashok
Copy link
Contributor

kiashok commented Jun 26, 2024

@kiashok
Copy link
Contributor

kiashok commented Jun 26, 2024

image

unrelated test failure

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