Skip to content

Helios 3 probe - #105

Closed
plotnick wants to merge 6 commits into
illumos-fixesfrom
helios-3-probe
Closed

plotnick wants to merge 6 commits into
illumos-fixesfrom
helios-3-probe

Conversation

@plotnick

@plotnick plotnick commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

See if the helios-3 image includes the fix for illumos 18395. See #104 and oxidecomputer/meta#1148.

plotnick and others added 6 commits October 25, 2026 09:35
Before illumos 18395[1], files in ctfs fail open(2) with `EINVAL` when
`O_CLOEXEC` is set, and Rust's `std::fs` always sets it. So instead
we open the contract files with `rustix` and set `FD_CLOEXEC` after.

To be reverted once we're up to date with [2].

[1] https://www.illumos.org/issues/18395
[2] oxidecomputer/illumos-gate@460f7917fa4f

Co-Authored-By: Claude <noreply@anthropic.com>
Forking sled-agent to start a job copies its large address space and
stops all of its threads. On illumos, posix_spawn builds the child in
the kernel instead, and does neither.

posix_spawn runs none of our code in the child, so a small bash shim
sets the job's limits before it execs the job. JobLimits::clamp now
also lowers each limit to our own hard limit, which a job cannot
exceed. JobChild replaces tokio's Child, and reaps the job when
SIGCHLD arrives. Errors from libcontract and posix_spawn now go
through one check_errno, which names the call that failed.

Co-Authored-By: Claude <noreply@anthropic.com>
A stop used to signal the job's process group, so a descendant that
started its own process group escaped it. Signalling the job's
contract reaches every process in the job.

Co-Authored-By: Claude <noreply@anthropic.com>
On illumos, after a pty's subsidiary closes, polling the master for
both reading and writing can report nothing but a write error, even
though an EOF is ready to read. The job's pty reader was previously
registered for both directions, so it never saw the EOF, and the drain
timeout expired instead.

Co-authored-by: Claude <noreply@anthropic.com>
This reverts commit f13d246.

Co-Authored-By: Claude <noreply@anthropic.com>
Scratch commit to learn whether the helios-3.0 image includes illumos
18395, so the ctfs workaround above can go.

Co-authored-by: Claude <noreply@anthropic.com>
@plotnick

plotnick commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Resolved with new buildomat images.

@plotnick plotnick closed this Nov 4, 2026
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.

1 participant