[BUG] Resolver registration stops at an occupied VFS record #21

Closed
opened 2026-10-16 15:12:51 +02:00 by erikinkinen · 3 comments
Owner

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, give prepare_job_redirection_resolver a valid first registration reply with IPC_RESULT_BUSY and IPC_VFS_REDIRECTION_FAILURE_STORAGE_V1, followed by a free candidate. The current implementation returns the first rejection without trying the next candidate.

Vfsd fe7b078a13126691d59179889b6c3993e9056dc5 produces that reply when vacant_retained_slot_at finds 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

  • Launchd and Vfsd revisions above; LibIPC 647f53943eea9c2a55c1fb1d1532f895a4c5370a.
  • Existing job-bound resolver endpoint and receive/grant transfer; no additional authority is needed.
  • No last known working revision is established.

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.

  • Search past exact typed busy-record replies within the existing interval.
  • Cover success, exhaustion, reply identity and cleanup failures without widening authority.
  • Publish the repair and check the original nested-script guest against it.
## 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`, give `prepare_job_redirection_resolver` a valid first registration reply with `IPC_RESULT_BUSY` and `IPC_VFS_REDIRECTION_FAILURE_STORAGE_V1`, followed by a free candidate. The current implementation returns the first rejection without trying the next candidate. Vfsd `fe7b078a13126691d59179889b6c3993e9056dc5` produces that reply when `vacant_retained_slot_at` finds 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 - Launchd and Vfsd revisions above; LibIPC `647f53943eea9c2a55c1fb1d1532f895a4c5370a`. - Existing job-bound resolver endpoint and receive/grant transfer; no additional authority is needed. - No last known working revision is established. ## 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](https://git.erikinkinen.fi/erix/launchd/pulls/2), [nested-script guest failure](https://git.erikinkinen.fi/erix/integration/issues/135), [earlier error-classification repair](https://git.erikinkinen.fi/erix/launchd/issues/20). - [x] Search past exact typed busy-record replies within the existing interval. - [x] Cover success, exhaustion, reply identity and cleanup failures without widening authority. - [x] Publish the repair and check the original nested-script guest against it.
Author
Owner

Pushed 25efde7a for the resolver slot search. An exact, correlated BUSY/STORAGE reply 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.

Pushed [25efde7a](https://git.erikinkinen.fi/erix/launchd/commit/25efde7aab9ddd6b1bc324ee7a2c3ed1a2fe2d8e) for the resolver slot search. An exact, correlated `BUSY/STORAGE` reply 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.
Author
Owner

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.

Integration now selects the resolver repair in both source catalogs: [179801c](https://git.erikinkinen.fi/erix/integration/commit/179801c0e927c3fbf6ee386df2bd87348d7b58c8). The nested-script guest check is still pending, so the remaining acceptance criterion stays open.
Author
Owner

The original nested-script exit-status guest now passes with Launchd 25efde7a and Integration b950621d. 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.

The original nested-script exit-status guest now passes with Launchd `25efde7a` and Integration `b950621d`. 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](https://git.erikinkinen.fi/erix/integration/issues/144) is a separate metadata defect.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/launchd#21
No description provided.