Skip to content

[release/1.3 backport] Fix some signal forwarder issues#4543

Merged
fuweid merged 2 commits intocontainerd:release/1.3from
thaJeztah:1.3_backport_forward_signal_not_found
Sep 9, 2020
Merged

[release/1.3 backport] Fix some signal forwarder issues#4543
fuweid merged 2 commits intocontainerd:release/1.3from
thaJeztah:1.3_backport_forward_signal_not_found

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

backport of #4532

Exit signal forward if process not found

Previously the signal loop can end up racing with the process exiting.
Intead of logging and continuing the loop, exit early.

Ignore SIGURG signals in signal forwarder

Starting with go1.14, the go runtime hijacks SIGURG but with no way to
not send to other signal handlers.

In practice, we get this signal frequently.
I found this while testing out go1.15 with ctr and multiple execs with
only echo hello. When the process exits quickly, if the previous
commit is not applied, you end up with an error message that it couldn't
forward SIGURG to the container (due to the process being gone).

Previously the signal loop can end up racing with the process exiting.
Intead of logging and continuing the loop, exit early.

Signed-off-by: Brian Goff <[email protected]>
(cherry picked from commit 6650510)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Starting with go1.14, the go runtime hijacks SIGURG but with no way to
not send to other signal handlers.

In practice, we get this signal frequently.
I found this while testing out go1.15 with ctr and multiple execs with
only `echo hello`. When the process exits quickly, if the previous
commit is not applied, you end up with an error message that it couldn't
forward SIGURG to the container (due to the process being gone).

Signed-off-by: Brian Goff <[email protected]>
(cherry picked from commit 899b4e3)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

@cpuguy83 PTAL

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 8, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 8d67174 into containerd:release/1.3 Sep 9, 2020
@thaJeztah thaJeztah deleted the 1.3_backport_forward_signal_not_found branch September 9, 2020 08:15
zmrow added a commit to zmrow/bottlerocket that referenced this pull request Nov 16, 2020
Backport the patch from
containerd/containerd#4543 which fixes SIGURG
issues with go 1.14+.
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