[release/1.2] Fix process locking and state management#2803
Merged
dmcgowan merged 1 commit intocontainerd:release/1.2from Nov 20, 2018
Merged
[release/1.2] Fix process locking and state management#2803dmcgowan merged 1 commit intocontainerd:release/1.2from
dmcgowan merged 1 commit intocontainerd:release/1.2from
Conversation
There were races with the way process states. This displayed in ways, especially around pausing the container for atomic operations. Users would get errors like, cannnot delete container in paused state and such. This can be eaisly reproduced with `docker` and the following command: ```bash > (for i in `seq 1 25`; do id=$(docker create alpine usleep 50000);docker start $id;docker commit $id;docker wait $id;docker rm $id; done) ``` This two issues that this fixes are: * locks must be held by the owning process, not the state operations. * If a container ends up being paused but before the operation completes, the process exists, make sure we resume the container before setting the the process as exited. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Codecov Report
@@ Coverage Diff @@
## release/1.2 #2803 +/- ##
============================================
Coverage 43.74% 43.74%
============================================
Files 100 100
Lines 10728 10728
============================================
Hits 4693 4693
Misses 5305 5305
Partials 730 730
Continue to review full report at Codecov.
|
Member
|
backport of #2773 |
Member
|
LGTM |
Random-Liu
added a commit
to Random-Liu/gvisor-containerd-shim
that referenced
this pull request
Jan 28, 2019
Signed-off-by: Lantao Liu <lantaol@google.com>
Random-Liu
added a commit
to Random-Liu/gvisor-containerd-shim
that referenced
this pull request
Jan 30, 2019
Signed-off-by: Lantao Liu <lantaol@google.com>
Random-Liu
added a commit
to google/gvisor-containerd-shim
that referenced
this pull request
Jan 30, 2019
* Update containerd to 1.2.2 Signed-off-by: Lantao Liu <lantaol@google.com> * Port containerd/containerd#2803. Signed-off-by: Lantao Liu <lantaol@google.com>
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.
There were races with the way process states. This displayed in ways,
especially around pausing the container for atomic operations. Users
would get errors like, cannnot delete container in paused state and
such.
This can be eaisly reproduced with
dockerand the following command:This two issues that this fixes are:
completes, the process exists, make sure we resume the container before
setting the the process as exited.
Signed-off-by: Michael Crosby crosbymichael@gmail.com