Skip to content

pkg/signal.CatchAll: ignore SIGURG on Linux#42397

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:catch_almost_all
May 19, 2021
Merged

pkg/signal.CatchAll: ignore SIGURG on Linux#42397
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:catch_almost_all

Conversation

@thaJeztah
Copy link
Member

relates to #40353 #40353 (comment)

I copied the approach taken in docker/cli#2929 to be consistent

Do not handle SIGURG on Linux, as in go1.14+, the go runtime issues
SIGURG as an interrupt to support preemptable system calls on Linux.

This issue was caught in TestCatchAll, which could fail when updating to Go 1.14 or above;

=== Failed
=== FAIL: pkg/signal TestCatchAll (0.01s)
    signal_linux_test.go:32: assertion failed: urgent I/O condition (string) != continued (string)
    signal_linux_test.go:32: assertion failed: continued (string) != hangup (string)
    signal_linux_test.go:32: assertion failed: hangup (string) != child exited (string)
    signal_linux_test.go:32: assertion failed: child exited (string) != illegal instruction (string)
    signal_linux_test.go:32: assertion failed: illegal instruction (string) != floating point exception (string)

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Do not handle SIGURG on Linux, as in go1.14+, the go runtime issues
SIGURG as an interrupt to support preemptable system calls on Linux.

This issue was caught in TestCatchAll, which could fail when updating to Go 1.14 or above;

    === Failed
    === FAIL: pkg/signal TestCatchAll (0.01s)
        signal_linux_test.go:32: assertion failed: urgent I/O condition (string) != continued (string)
        signal_linux_test.go:32: assertion failed: continued (string) != hangup (string)
        signal_linux_test.go:32: assertion failed: hangup (string) != child exited (string)
        signal_linux_test.go:32: assertion failed: child exited (string) != illegal instruction (string)
        signal_linux_test.go:32: assertion failed: illegal instruction (string) != floating point exception (string)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

@cpuguy83 @tonistiigi ptal

@thaJeztah thaJeztah added this to the 21.xx milestone May 19, 2021
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants