Skip to content

Block SIGCHLD before booting LKL#59

Merged
jserv merged 1 commit intosysprog21:mainfrom
RinHizakura:main
Apr 18, 2026
Merged

Block SIGCHLD before booting LKL#59
jserv merged 1 commit intosysprog21:mainfrom
RinHizakura:main

Conversation

@RinHizakura
Copy link
Copy Markdown
Collaborator

@RinHizakura RinHizakura commented Apr 18, 2026

Before all kernel threads are created, we have to block SIGCHLD and let all childs inherit the blocked mask. Without this, SIGCHLD (from the supervised child process exiting) may be delivered to an LKL thread where the default ignore action silently discards it, causing the signalfd in the supervisor poll loop to never become readable.

This will lead to kbox hanging in the poll and never exit intermitently.

Change-Id: Ib3256f044c5b8ce9c34c223beb294c207a1f47ab

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/seccomp-supervisor.c">

<violation number="1" location="src/seccomp-supervisor.c:502">
P1: SIGCHLD is no longer blocked before fork, reintroducing the race that can drop the child-exit signal before signalfd setup.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/seccomp-supervisor.c
Before all kernel threads are created, we have to block
SIGCHLD and let all childs inherit the blocked mask.
Without this, SIGCHLD (from the supervised child process
exiting) may be delivered to an LKL thread where the default
ignore action silently discards it, causing the signalfd in
the supervisor poll loop to never become readable.

Change-Id: Ib3256f044c5b8ce9c34c223beb294c207a1f47ab
@jserv jserv merged commit 9a318a4 into sysprog21:main Apr 18, 2026
5 checks passed
@jserv
Copy link
Copy Markdown
Contributor

jserv commented Apr 18, 2026

Thank @RinHizakura for contributing!

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.

2 participants