Skip to content

[RFC] should we forward SIGURG? #3364

@kolyshkin

Description

@kolyshkin

Foreground runc exec and runc run forwards all the signals (that it can) to the process being run.

Since Go 1.14, go runtime uses SIGURG for async preemptive scheduling. This means that runc regularly receives SIGURG and, in case of foreground runc run/exec, it gets forwarded to the container process.

For example:

[kir@kir-rhat runc]$ sudo ./runc --debug exec xx67 sleep 1m
...
DEBU[0000] child process in init()                      
DEBU[0000] setns_init: about to exec    
DEBU[0000]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition 
DEBU[0000]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition 
DEBU[0000]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition 
...

Or, with slightly better debug messages from PR #3363,

DEBU[0000]signals.go:102 main.(*signalHandler).forward() forwarding SIGURG to 819784
DEBU[0000]signals.go:102 main.(*signalHandler).forward() forwarding SIGURG to 819784

The question is -- should we forward SIGURG? Ideally, we should forward signals sent by a user, but ignore the ones generated by go runtime. Alas, there is no way to distinguish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions