[BUG] Clean resolver storage rejections terminate Launchd #20

Closed
opened 2026-10-16 00:58:43 +02:00 by erikinkinen · 2 comments
Owner

Summary

Launchd classifies a redirection-resolver storage rejection as an internal
failure even after the original launch rollback and transaction abort have
completed. A normal resource rejection can therefore terminate the service
instead of returning an ordinary launch failure.

Reproduction

On Launchd 3eb4b959755438fba403146139f4bf5b39464bea, let Vfsd reject a
resolver registration with its storage failure class and one of its actual
producer results: INVALID_ARGUMENT, BUSY, or RESOURCE_EXHAUSTED.
Allow all original rollback and abort steps to finish successfully, then map
the retained resolver error through runtime::error_map::launch_error.

The same classification problem affects local resolver-slot exhaustion after
the original local capability cleanup succeeds. The repair's focused mapper
and resolver-wire controls exercise these cases without running a guest.

Expected and actual behavior

Expected: preserve the exact recognized Vfsd result with the launch storage
failure class. Report local exhaustion as RESOURCE_EXHAUSTED with that class.

Actual: the missing resolver case produces INTERNAL with the materialization
failure class, selecting the existing service fail-stop path.

Unknown results, mismatched classes, malformed replies, transport failures,
and incomplete or uncertain cleanup must keep their existing internal,
pending, or fail-stop behavior. This repair adds no authority and does not
change cleanup order.

Environment and identity

  • Component: Launchd, base revision above, feature/posix-compat.
  • Selected Vfsd producer: fe7b078a13126691d59179889b6c3993e9056dc5.
  • Host validation: x86-64 Linux, Rust 1.97.1; native compile target
    x86_64-unknown-none.
  • Last known working revision: not established.

Evidence and prior checks

The repair passed four mapper controls, seven resolver-wire/lifetime controls,
and the full 445 library plus 216 binary tests. Formatting, strict Clippy,
private Rustdoc, both native compile checks, Markdown, whitespace, and the
actual candidate-tree source-size check passed.

These establish the scoped classification repair. They do not attribute an
existing guest or CI failure to a particular inner resolver error. The
published fix's current-source CI result remains to be observed.

Tracking

Related work: Launchd PR #2.

  • Preserve only the exact producer-supported storage result/class pairs
    and the completely cleaned local exhaustion result.
  • Keep unknown, malformed, transport, and uncertain-cleanup cases on their
    original refusal paths, with meaningful mapper and lifetime controls.
  • Publish the repair and verify its current-source CI checks.
## Summary Launchd classifies a redirection-resolver storage rejection as an internal failure even after the original launch rollback and transaction abort have completed. A normal resource rejection can therefore terminate the service instead of returning an ordinary launch failure. ## Reproduction On Launchd `3eb4b959755438fba403146139f4bf5b39464bea`, let Vfsd reject a resolver registration with its storage failure class and one of its actual producer results: `INVALID_ARGUMENT`, `BUSY`, or `RESOURCE_EXHAUSTED`. Allow all original rollback and abort steps to finish successfully, then map the retained resolver error through `runtime::error_map::launch_error`. The same classification problem affects local resolver-slot exhaustion after the original local capability cleanup succeeds. The repair's focused mapper and resolver-wire controls exercise these cases without running a guest. ## Expected and actual behavior Expected: preserve the exact recognized Vfsd result with the launch storage failure class. Report local exhaustion as `RESOURCE_EXHAUSTED` with that class. Actual: the missing resolver case produces `INTERNAL` with the materialization failure class, selecting the existing service fail-stop path. Unknown results, mismatched classes, malformed replies, transport failures, and incomplete or uncertain cleanup must keep their existing internal, pending, or fail-stop behavior. This repair adds no authority and does not change cleanup order. ## Environment and identity - Component: Launchd, base revision above, `feature/posix-compat`. - Selected Vfsd producer: `fe7b078a13126691d59179889b6c3993e9056dc5`. - Host validation: x86-64 Linux, Rust 1.97.1; native compile target `x86_64-unknown-none`. - Last known working revision: not established. ## Evidence and prior checks The repair passed four mapper controls, seven resolver-wire/lifetime controls, and the full 445 library plus 216 binary tests. Formatting, strict Clippy, private Rustdoc, both native compile checks, Markdown, whitespace, and the actual candidate-tree source-size check passed. These establish the scoped classification repair. They do not attribute an existing guest or CI failure to a particular inner resolver error. The published fix's current-source CI result remains to be observed. ## Tracking Related work: [Launchd PR #2](https://git.erikinkinen.fi/erix/launchd/pulls/2). - [x] Preserve only the exact producer-supported storage result/class pairs and the completely cleaned local exhaustion result. - [x] Keep unknown, malformed, transport, and uncertain-cleanup cases on their original refusal paths, with meaningful mapper and lifetime controls. - [x] Publish the repair and verify its current-source CI checks.
Author
Owner

5d8cddb0 preserves the recognized storage rejection after successful rollback and transaction abort. Unknown replies and uncertain cleanup retain their original refusal paths. The runtime component catalog still selects the previous Launchd revision, so this does not yet establish a guest fix; current-source CI is pending.

`5d8cddb0` preserves the recognized storage rejection after successful rollback and transaction abort. Unknown replies and uncertain cleanup retain their original refusal paths. The runtime component catalog still selects the previous Launchd revision, so this does not yet establish a guest fix; current-source CI is pending.
Author
Owner

CI 398 is green for 5d8cddb0, including all 661 tests and the strict compile checks. All three acceptance items are complete, so I’m closing this classification issue. Selecting the updated Launchd in the runtime catalog remains separate.

CI 398 is green for `5d8cddb0`, including all 661 tests and the strict compile checks. All three acceptance items are complete, so I’m closing this classification issue. Selecting the updated Launchd in the runtime catalog remains separate.
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#20
No description provided.