Skip to content

[release/1.3] Make killing shims more resilient#4307

Merged
dmcgowan merged 1 commit into
containerd:release/1.3from
fuweid:cp-1_3-4204
Jun 16, 2020
Merged

[release/1.3] Make killing shims more resilient#4307
dmcgowan merged 1 commit into
containerd:release/1.3from
fuweid:cp-1_3-4204

Conversation

@fuweid

@fuweid fuweid commented Jun 5, 2020

Copy link
Copy Markdown
Member

Currently, we send a single SIGKILL to the shim process
once and then we spin in a loop where we use kill(pid, 0)
to detect when the pid has disappeared completely.

Unfortunately, this has a race condition since pids can be reused causing us
to spin in an infinite loop when that happens.

This adds a timeout to this loop which logs a warning and exits the
infinite loop.

Signed-off-by: Ashray Jain [email protected]
(cherry picked from commit 3e95727)
Signed-off-by: Wei Fu [email protected]


cherry-pick: #4204

Not sure that it is good to do cherry-pick 4204. If not and we recommend user to use shim v2, I will close it. :)

cc @ashrayjain

Currently, we send a single SIGKILL to the shim process
once and then we spin in a loop where we use kill(pid, 0)
to detect when the pid has disappeared completely.

Unfortunately, this has a race condition since pids can be reused causing us
to spin in an infinite loop when that happens.

This adds a timeout to this loop which logs a warning and exits the
infinite loop.

Signed-off-by: Ashray Jain <[email protected]>
(cherry picked from commit 3e95727)
Signed-off-by: Wei Fu <[email protected]>
@theopenlab-ci

theopenlab-ci Bot commented Jun 5, 2020

Copy link
Copy Markdown

Build succeeded.

@crosbymichael

Copy link
Copy Markdown
Member

LGTM

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@dmcgowan
dmcgowan merged commit cc54652 into containerd:release/1.3 Jun 16, 2020
@fuweid
fuweid deleted the cp-1_3-4204 branch June 18, 2020 02:43
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.

5 participants