Kill processes in cgroup even if process Wait fails#2633
Merged
Conversation
de8d22a to
b246d26
Compare
Contributor
|
@chaitanyabandi thanks! I suppose you have a repro... care to add a test case? |
31ecc1a to
6be9179
Compare
Contributor
Author
Added a test in libcontainer/integration. Thanks for the feedback. |
Contributor
Author
|
@mrunalp , @kolyshkin PTAL, thank you. |
kolyshkin
reviewed
Oct 7, 2020
kolyshkin
reviewed
Oct 7, 2020
kolyshkin
reviewed
Oct 7, 2020
Contributor
|
Looks good except a few nits, and I have checked the test case works (i.e. fails without the fix). |
6be9179 to
d50cde7
Compare
kolyshkin
reviewed
Oct 8, 2020
If the cgroup's init process doesn't complete successfully, Wait returns a non-nil error. We should still kill all the process in the cgroup if process namespace is shared. Otherwise, it may result in process leak. Fixes opencontainers#2632 Signed-off-by: Chaitanya Bandi <kbandi@cs.stonybrook.edu>
d50cde7 to
0aa0fae
Compare
mrunalp
approved these changes
Oct 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the cgroup's init process doesn't complete successfully, Wait returns a
non-nil error. We should still kill all the processes in the cgroup in that
case, if process namespace is shared. Otherwise, it may result in process leak.
Fixes #2632
Signed-off-by: Chaitanya Bandi kbandi@cs.stonybrook.edu