Skip to content

[release/1.6] runc.v1/v2: return init pid when clean dead shim#6572

Merged
mxpv merged 2 commits intocontainerd:release/1.6from
fuweid:cp-1.6-6452-6571
Feb 21, 2022
Merged

[release/1.6] runc.v1/v2: return init pid when clean dead shim#6572
mxpv merged 2 commits intocontainerd:release/1.6from
fuweid:cp-1.6-6452-6571

Conversation

@fuweid
Copy link
Copy Markdown
Member

@fuweid fuweid commented Feb 20, 2022

If containerd-shim-runc-v1/v2 process dead abnormally, such as received
kill 9 signal, panic or other unkown reasons, the containerd-shim-runc-v1/v2
server can not reap runc container and forward init process exit event.
This will lead the container leaked in dockerd. When shim dead, containerd
will clean dead shim, here read init process pid and forward exit event
with pid at the same time.

cherry-pick #6452 and #6571

zvier and others added 2 commits February 20, 2022 15:15
If containerd-shim-runc-v2 process dead abnormally, such as received
kill 9 signal, panic or other unkown reasons, the containerd-shim-runc-v2
server can not reap runc container and forward init process exit event.
This will lead the container leaked in dockerd. When shim dead, containerd
will clean dead shim, here read init process pid and forward exit event
with pid at the same time.

Signed-off-by: Jeff Zvier <[email protected]>
(cherry picked from commit 356ca75)
Signed-off-by: Wei Fu <[email protected]>
If containerd-shim-runc-v1 process dead abnormally, such as received
kill -s 9 signal, panic or other unkown reasons, the containerd-shim-runc-v1
server can not reap runc container and forward init process exit event.
This will lead the container leaked in dockerd. When shim dead, containerd
will clean dead shim, here read init process pid and forward exit event
with pid at the same time.

Related to: containerd#6402

Signed-off-by: Jeff Zvier <[email protected]>
Signed-off-by: Wei Fu <[email protected]>
(cherry picked from commit 7901f4b)
Signed-off-by: Wei Fu <[email protected]>
@AkihiroSuda
Copy link
Copy Markdown
Member

Marking as a draft, as #6571 is not merged yet

@AkihiroSuda AkihiroSuda marked this pull request as draft February 21, 2022 02:38
@fuweid fuweid marked this pull request as ready for review February 21, 2022 05:39
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxpv mxpv merged commit 7078e50 into containerd:release/1.6 Feb 21, 2022
@fuweid fuweid deleted the cp-1.6-6452-6571 branch February 21, 2022 22:50
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.

6 participants