[BUG] Resolver registration stops at an occupied VFS record #21
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/launchd#21
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Launchd stops searching for a redirection-resolver slot when Vfsd reports that the selected record is busy, even when later records are free. Vfsd shares its record table between endpoint roles, so an empty capability slot alone does not establish a free record.
Reproduction
At Launchd
dcbb1cc8b8be9540867cf1dab6fc1e1b70388fca, giveprepare_job_redirection_resolvera valid first registration reply withIPC_RESULT_BUSYandIPC_VFS_REDIRECTION_FAILURE_STORAGE_V1, followed by a free candidate. The current implementation returns the first rejection without trying the next candidate.Vfsd
fe7b078a13126691d59179889b6c3993e9056dc5produces that reply whenvacant_retained_slot_atfinds an unavailable record. Its registration handler drops the incoming receiver before replying.Expected and actual behavior
Launchd should search its existing receiver interval after an authenticated, fully cleaned busy-record rejection. It currently continues only after a kernel capability-slot conflict; a typed busy-record reply ends the launch.
Malformed or mismatched replies, other failure classes and uncertain cleanup must retain their existing reconciliation and refusal behavior. Exhausting the interval must retire local authority before reporting exhaustion.
Environment and identity
647f53943eea9c2a55c1fb1d1532f895a4c5370a.Evidence and prior checks
The current resolver test explicitly expects one attempt for a typed busy rejection. The Vfsd allocator and registration handler establish the distinct record-occupancy path.
A fresh nested-script guest also reports a COMMIT storage rejection. Kernel serial records split its result field; the resumed fragments suggest BUSY, but this does not yet prove which Vfsd record caused that guest failure.
Tracking
Launchd PR, nested-script guest failure, earlier error-classification repair.
Pushed 25efde7a for the resolver slot search. An exact, correlated
BUSY/STORAGEreply now advances within the existing interval. Local cleanup is recorded before endpoint creation and stays recorded until every alias is absent; unknown occupied slots are preserved.All 14 focused regressions and both 672-test suites pass. Formatting, strict Clippy, rustdoc, doctests and both native checks are clean. The original nested-script guest still needs to run against the repaired runtime, so the last criterion remains open.
Integration now selects the resolver repair in both source catalogs: 179801c. The nested-script guest check is still pending, so the remaining acceptance criterion stays open.
The original nested-script exit-status guest now passes with Launchd
25efde7aand Integrationb950621d. Launchd and Rootd become ready, then the expected completion marker appears exactly once; the original 120-second VM and 45-second silence limits remain unchanged. The full build and capture streams contain no warnings.The selected raw Launchd ELF is tied through the capacity/strip transformations to the packaged executable and image manifest. All three acceptance items are complete. The stale packaged revision receipt is a separate metadata defect.