With some extra debugging I know that we're just not seeing any activity on the file descriptor associated with signalfd.
In the log below, signalfd is not marked as read-ready when SIGCHLD is intercepted (but passed to the process) by gdb. Still investigating further.
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Obtained: <plainbox.vendor.pyglibc.selectors.EpollSelector object at 0x7ffff026fcf0>
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Obtained: <signalfd fileno():11 signals:frozenset({17})>
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Obtained: <sigprocmask signals:frozenset({17}) mode:SIG_BLOCK active:no>
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Obtained: (12, 13)
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Obtained: (14, 15)
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Registered key with selector: SelectorKey(fileobj=12, fd=12, events=1, data='stdout')
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Registered key with selector: SelectorKey(fileobj=14, fd=14, events=1, data='stderr')
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Registered key with selector: SelectorKey(fileobj=<signalfd fileno():11 signals:frozenset({17})>, fd=11, events=1, data='sfd')
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.glibc: sigprocmask(0, struct sigset_t at 0x7ffff02694a8
__val: <plainbox.vendor.glibc.c_ulong_Array_16 object at 0x7ffff0269560>, None)
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Forked child process: 21264
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: waiting for, {'stdout', 'stderr', 'proc'}, sigmask is <sigprocmask signals:frozenset({17}) mode:SIG_BLOCK active:yes>
DEBUG[pid:21264, thread:Thread-1, plainbox.vendor.glibc: sigprocmask(1, struct sigset_t at 0x7ffff02694a8
__val: <plainbox.vendor.glibc.c_ulong_Array_16 object at 0x7ffff0269560>, None)
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: processing event list: [(SelectorKey(fileobj=12, fd=12, events=1, data='stdout'), EVENT_READ)]
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Reading at most 65536 bytes of data from stdout pipe
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Read 268 bytes of data from stdout
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: waiting for, {'stdout', 'stderr', 'proc'}, sigmask is <sigprocmask signals:frozenset({17}) mode:SIG_BLOCK active:yes>
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: processing event list: [(SelectorKey(fileobj=12, fd=12, events=1, data='stdout'), EVENT_READ)]
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Reading at most 65536 bytes of data from stdout pipe
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Read 0 bytes of data from stdout
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: pipe stdout depleted, unregistering and closing
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: waiting for, {'stderr', 'proc'}, sigmask is <sigprocmask signals:frozenset({17}) mode:SIG_BLOCK active:yes>
Program received signal SIGCHLD, Child status changed.
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: processing event list: [(SelectorKey(fileobj=14, fd=14, events=1, data='stderr'), EVENT_READ)]
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Reading at most 65536 bytes of data from stderr pipe
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: Read 0 bytes of data from stderr
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: pipe stderr depleted, unregistering and closing
DEBUG[pid:21246, thread:Thread-1, plainbox.vendor.extcmd: waiting for, {'proc'}, sigmask is <sigprocmask signals:frozenset({17}) mode:SIG_BLOCK active:yes>
With some extra debugging I know that we're just not seeing any activity on the file descriptor associated with signalfd.
In the log below, signalfd is not marked as read-ready when SIGCHLD is intercepted (but passed to the process) by gdb. Still investigating further.
DEBUG[pid:21246, thread:Thread-1, plainbox. vendor. extcmd: Obtained: <plainbox. vendor. pyglibc. selectors. EpollSelector object at 0x7ffff026fcf0> vendor. extcmd: Obtained: <signalfd fileno():11 signals: frozenset( {17})> vendor. extcmd: Obtained: <sigprocmask signals: frozenset( {17}) mode:SIG_BLOCK active:no> vendor. extcmd: Obtained: (12, 13) vendor. extcmd: Obtained: (14, 15) vendor. extcmd: Registered key with selector: SelectorKey( fileobj= 12, fd=12, events=1, data='stdout') vendor. extcmd: Registered key with selector: SelectorKey( fileobj= 14, fd=14, events=1, data='stderr') vendor. extcmd: Registered key with selector: SelectorKey( fileobj= <signalfd fileno():11 signals: frozenset( {17})>, fd=11, events=1, data='sfd') vendor. glibc: sigprocmask(0, struct sigset_t at 0x7ffff02694a8 vendor. glibc.c_ ulong_Array_ 16 object at 0x7ffff0269560>, None) vendor. extcmd: Forked child process: 21264 vendor. extcmd: waiting for, {'stdout', 'stderr', 'proc'}, sigmask is <sigprocmask signals: frozenset( {17}) mode:SIG_BLOCK active:yes> vendor. glibc: sigprocmask(1, struct sigset_t at 0x7ffff02694a8 vendor. glibc.c_ ulong_Array_ 16 object at 0x7ffff0269560>, None) vendor. extcmd: processing event list: [(SelectorKey( fileobj= 12, fd=12, events=1, data='stdout'), EVENT_READ)] vendor. extcmd: Reading at most 65536 bytes of data from stdout pipe vendor. extcmd: Read 268 bytes of data from stdout vendor. extcmd: waiting for, {'stdout', 'stderr', 'proc'}, sigmask is <sigprocmask signals: frozenset( {17}) mode:SIG_BLOCK active:yes> vendor. extcmd: processing event list: [(SelectorKey( fileobj= 12, fd=12, events=1, data='stdout'), EVENT_READ)] vendor. extcmd: Reading at most 65536 bytes of data from stdout pipe vendor. extcmd: Read 0 bytes of data from stdout vendor. extcmd: pipe stdout depleted, unregistering and closing vendor. extcmd: waiting for, {'stderr', 'proc'}, sigmask is <sigprocmask signals: frozenset( {17}) mode:SIG_BLOCK active:yes>
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
__val: <plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21264, thread:Thread-1, plainbox.
__val: <plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
Program received signal SIGCHLD, Child status changed. vendor. extcmd: processing event list: [(SelectorKey( fileobj= 14, fd=14, events=1, data='stderr'), EVENT_READ)] vendor. extcmd: Reading at most 65536 bytes of data from stderr pipe vendor. extcmd: Read 0 bytes of data from stderr vendor. extcmd: pipe stderr depleted, unregistering and closing vendor. extcmd: waiting for, {'proc'}, sigmask is <sigprocmask signals: frozenset( {17}) mode:SIG_BLOCK active:yes>
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.
DEBUG[pid:21246, thread:Thread-1, plainbox.