Repository navigation
fix(minimald,sandbox): a task that ends during its network attach reports its own exit status, not a - #3365
Conversation
minimald holds its task process behind its own type, so it needs the ended-aware attach without a hakoniwa::Child in hand.
A task that exited while its network was being attached took its namespace with it, and the refused attach killed the task and showed "connecting the task's network failed". attach_or_reap now asks whether the process ended, keeps it unreaped, and owes no guard.
…t-ends-during-its-network-attach-repor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
/revise make Evidence: the PR body says Do:
|
|
/revise make This repeats the Evidence: the PR body says Do:
|
Defect
Fixes #3350
crates/sandbox/src/lib.rscrates/minimald/src/exec/process.rscrates/minimald/src/exec/tests.rsTask marker
Proof
A min task run whose process exits before its network attach completes now ends with the process's own exit status. minimald does not kill the process and does not print "connecting the task's network failed". A refused attach of a process that still runs stays an error and stops the task.
Notes from the agent: sandbox: PlannedLaunch::attach_unless_ended is now pub, and it has a new test whose name the test line matches. minimald: Reapable gains has_ended (try_wait on hakoniwa::Child). attach_or_reap calls attach_unless_ended and returns Option. HakoniwaProcess::new and NetRelease::new take Option. The new minimald test uses a fake child, so it proves that attach_or_reap does not reap the ended process and owes no guard. No test here runs a real container to read the exit status end to end. cargo clippy -p minimald --all-targets gave no warnings. I did not run just clippy-strict.
Tests
cargo test -p sandbox attach_unless_endedcargo test -p minimald a_task_that_ended_during_its_attach_reports_its_exitcargo test -p minimald a_refused_task_attach_stops_the_taskVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.Base
The base branch moved while the coder worked; it was merged in before the tests ran.