[BUG] Private realm preparation requires an ordinary launch manifest #4

Closed
opened 2026-09-24 19:29:58 +02:00 by erikinkinen · 0 comments
Owner

Summary

Private realm preparation wrongly requires an ordinary executable launch manifest before selecting the realm-specific Loaderd path. The actual Posixd package deliberately has no ordinary launch sidecar or public launch row, so the first PREPARE for the actual mediator returns NOT_FOUND even though the exact executable exists in the image. This prevents the native startup scenario from reaching Posixd startup or readiness.

Reproduction

With Integration ffedb3630895b2bc547ab58e4900f750d84cd64b, Launchd 0bb56cc229fe4563da6c77ebe6ce9c178b903f26, Procd d04311abff67e7355bd92bb2e48fb6161e0ec674 and the selected component graph, run:

bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-startup-positive.toml components.toml

The original local native scenario reaches the existing admission/preparation markers, then attempts PREPARE for the actual Posixd executable. This failure has been observed once; no unchanged-input retry or deadline change was performed. The associated source path provides the smaller deterministic policy trigger: prepare a private realm executable with its valid exact source present and no ordinary .lmf sidecar.

Expected and actual behavior

Private realm preparation should resolve and authenticate the exact executable within the supplied scope, submit the realm-specific Loaderd request, and retain all original source and cleanup owners. It must not grant ordinary client authority or require an ordinary launch manifest for a private mediator. Ordinary executable preparation must continue enforcing its own manifest contract.

The selected native receipt reports:

ERIX_EXSH:REALM_ADMISSION:VERIFIED
ERIX_EXSH:REALM_PREPARATION:VERIFIED
ERIX_EXSH:REALM_ADMISSION:FAILED request=00000012 kind=0000000b first=000006d1 second=00000003

Request 0x12, operation 0x6D1 (PREPARE), receives a valid typed rejected reply with NOT_FOUND (3); kind 0x0B denotes application rejection, not transport loss. The recorded exit status 0xE5 is also used by Exsh. Its endpoint 0x520 differs from Launchd's bound endpoint 0x280, so this receipt must not be attributed to a Launchd process-event exit. Rootd later exits 0xDC, and the original 45-second progress watchdog terminates QEMU. The scenario returns 1 before the required REALM_STARTUP:VERIFIED marker; no actual mediator start, readiness or retirement is accepted.

Environment and identity

  • Integration scenario driver: ffedb3630895b2bc547ab58e4900f750d84cd64b; Launchd: 0bb56cc229fe4563da6c77ebe6ce9c178b903f26; Procd: d04311abff67e7355bd92bb2e48fb6161e0ec674; Posixd: 809647d60544c4c6121868c99133f30d054965c9.
  • Release native x86-64 QEMU/OVMF image, development runtime configuration, one virtual CPU, Rust 1.97.1. Original scenario hard limit: 120 seconds; progress watchdog: 45 seconds.
  • Retained disk SHA-256: e9a66bf5887f1d0fdb746080e0b6b10e5bd7923b02c8e2306e0d0586acf937b0. Read-only image inspection leaves those bytes unchanged.
  • /bin/posixd and its packaged object-store executable refer to inode 51 and the same 264,000 bytes, SHA-256 120e2f7e65f8ca8c4c1c72f7e1cf9deb9fb74428424b156f5a92afc76d976f23. The runtime graph identifies the Posixd executable; the image has no ordinary Posixd launch row or /bin/posixd.lmf sidecar.
  • The supplied cwd scope and original launch route remain the only preparation authority. No ordinary sidecar, new client grant, root capability or global fallback was added to bypass this failure. Last known working revision is unestablished.

Evidence and prior checks

Read-only image inspection confirms that this is not a missing executable alias. Source inspection at the exact revision establishes the mismatched path:

  1. RealmTable preparation calls the common ProgramPreparation::resolve.
  2. ProgramPreparation::resolve unconditionally requests an ordinary manifest before selecting the private Loaderd operation. The manifest lookup appends .lmf; its absence becomes ManifestRejected with the original NOT_FOUND.
  3. The realm reply encoder preserves that result code. The private Loaderd request is selected only after the mandatory sidecar step, which this package cannot pass.

The original 107-file evidence inventory and 56,013-byte serial log are retained. Serial SHA-256: a1132d376e101c370f06f7522f45139d34703e8d385847e848f6d4f84c43ae72. Image construction has no recorded warnings; stderr preserves the expected watchdog failure. The image inspection and source correlation do not constitute a corrected VM pass. Earlier admission/preparation checks used other executable fixtures and do not establish actual Posixd readiness.

Tracking

Native private-path acceptance — 25 September 2026: signed Launchd 3d39c7413a9c35a051323fceb7f895f0b18402e0 in Integration 66ddc78da31dd03dd554d0677cdc2af86588d525 passes the maintained actual two-mediator startup witness. Exact /bin/posixd preparation succeeds without an ordinary launch sidecar; both mediators reach PrivateReady, retire independently and reject stale handles under unchanged120/45-second limits. This closes the private-path defect; configuration, seal and four-client I/O remain separate acceptance work.

The first START, request 0x13 / operation 0x6d4, returns a typed NOT_FOUND rejection before the startup marker. No startup acceptance or checklist increase is awarded.

Source review and fail-before controls identify empty registered-CLAIM handling defects in Launchd issue 5 and Posixd issue 7: Kernel empty intake returns NOT_FOUND with no delivery owner. A separate Procd first-challenge registration race can also reject an unaccepted call before the new child registers. The public START code alone does not distinguish internal failure locations. Corrections retain nonzero owners, exact origins and accepted-call ownership; the next native attempt must adopt the reviewed fixes together.

The independently reviewed explicit retirement event gap, linked to Launchd issue 6, must transfer only the exact terminal observation into the retained Retire acknowledgment after actual child/capability disposal. Spontaneous WAIT and other generations stay independently visible. It is not attributed as this START failure's cause. Configuration/seal, four real clients, byte I/O and all toolchain/EriX guest builds remain open.

Docs 95921234c64d7cc11f9f9ed19d49a5d73c95357c publishes the preceding private preparation/event-contract correction: 45 tests and the full 2,497-page manual pass, all 464,159 word bounds pass and six affected pages were visually reviewed. Original Docs CI 1065/1066 passes with zero final warnings; intermediate TeX reference convergence remains recorded. Further intake/retirement contract prose is a separate pending change. Launchd's original 151/152 CI passes with four complete warning-free logs; Integration 1787/1788 awaits runner assignment. Weighted progress remains 15.16%.

The same checkpoint fixes the independently reproduced WAIT decoder defect by accepting exactly ordinary-child and realm-mediator terminal roles before matching the retained process generation. Invalid identity, framing, state and authority remain rejected. All six default/all-feature/production development/release configurations pass 329 library and 66 runtime tests each, strict host/native Clippy, native builds, private rustdoc, formatting and documentation checks, with zero warnings. Authored Rust files remain below 1,000 lines. Final documentation corrections preserve the tested Rust behavior.

The original failed VM remains retained. A newly selected image must pass the unchanged actual startup/readiness/retirement scenario before native acceptance; configuration/seal, four clients, byte I/O and guest toolchain/EriX builds remain open. Private preparation issue 4 and independent event issue 3 remain distinct. WIP PR 2 and Phase 6 completion track the remaining acceptance.

Track the correction in Launchd PR 2, Launchd lifecycle audit, Integration validation and Phase 6 completion. The separate realm-event decoder defect is independently valid and is not assigned as this PREPARE failure's cause.

  • Cover private preparation without an ordinary sidecar, exact executable identity, hostile or missing sources, and retained owner cleanup; keep ordinary manifest enforcement intact.
  • Complete formatting, strict Clippy, unit tests, warning-denied host/native builds and documentation checks for the correction.
  • Pass the unchanged actual Posixd startup/readiness/retirement scenario after adopting the attributed correction before closing this report.
## Summary Private realm preparation wrongly requires an ordinary executable launch manifest before selecting the realm-specific Loaderd path. The actual Posixd package deliberately has no ordinary launch sidecar or public launch row, so the first PREPARE for the actual mediator returns `NOT_FOUND` even though the exact executable exists in the image. This prevents the native startup scenario from reaching Posixd startup or readiness. ## Reproduction With Integration [`ffedb3630895b2bc547ab58e4900f750d84cd64b`](https://git.erikinkinen.fi/erix/integration/commit/ffedb3630895b2bc547ab58e4900f750d84cd64b), Launchd `0bb56cc229fe4563da6c77ebe6ce9c178b903f26`, Procd `d04311abff67e7355bd92bb2e48fb6161e0ec674` and the selected component graph, run: ```sh bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-startup-positive.toml components.toml ``` The original local native scenario reaches the existing admission/preparation markers, then attempts PREPARE for the actual Posixd executable. This failure has been observed once; no unchanged-input retry or deadline change was performed. The associated source path provides the smaller deterministic policy trigger: prepare a private realm executable with its valid exact source present and no ordinary `.lmf` sidecar. ## Expected and actual behavior Private realm preparation should resolve and authenticate the exact executable within the supplied scope, submit the realm-specific Loaderd request, and retain all original source and cleanup owners. It must not grant ordinary client authority or require an ordinary launch manifest for a private mediator. Ordinary executable preparation must continue enforcing its own manifest contract. The selected native receipt reports: ```text ERIX_EXSH:REALM_ADMISSION:VERIFIED ERIX_EXSH:REALM_PREPARATION:VERIFIED ERIX_EXSH:REALM_ADMISSION:FAILED request=00000012 kind=0000000b first=000006d1 second=00000003 ``` Request `0x12`, operation `0x6D1` (PREPARE), receives a valid typed rejected reply with `NOT_FOUND` (`3`); kind `0x0B` denotes application rejection, not transport loss. The recorded exit status `0xE5` is also used by Exsh. Its endpoint `0x520` differs from Launchd's bound endpoint `0x280`, so this receipt must not be attributed to a Launchd process-event exit. Rootd later exits `0xDC`, and the original 45-second progress watchdog terminates QEMU. The scenario returns 1 before the required `REALM_STARTUP:VERIFIED` marker; no actual mediator start, readiness or retirement is accepted. ## Environment and identity - Integration scenario driver: `ffedb3630895b2bc547ab58e4900f750d84cd64b`; Launchd: `0bb56cc229fe4563da6c77ebe6ce9c178b903f26`; Procd: `d04311abff67e7355bd92bb2e48fb6161e0ec674`; Posixd: `809647d60544c4c6121868c99133f30d054965c9`. - Release native x86-64 QEMU/OVMF image, development runtime configuration, one virtual CPU, Rust 1.97.1. Original scenario hard limit: 120 seconds; progress watchdog: 45 seconds. - Retained disk SHA-256: `e9a66bf5887f1d0fdb746080e0b6b10e5bd7923b02c8e2306e0d0586acf937b0`. Read-only image inspection leaves those bytes unchanged. - `/bin/posixd` and its packaged object-store executable refer to inode 51 and the same 264,000 bytes, SHA-256 `120e2f7e65f8ca8c4c1c72f7e1cf9deb9fb74428424b156f5a92afc76d976f23`. The runtime graph identifies the Posixd executable; the image has no ordinary Posixd launch row or `/bin/posixd.lmf` sidecar. - The supplied cwd scope and original launch route remain the only preparation authority. No ordinary sidecar, new client grant, root capability or global fallback was added to bypass this failure. Last known working revision is unestablished. ## Evidence and prior checks Read-only image inspection confirms that this is not a missing executable alias. Source inspection at the exact revision establishes the mismatched path: 1. [`RealmTable` preparation](https://git.erikinkinen.fi/erix/launchd/src/commit/0bb56cc229fe4563da6c77ebe6ce9c178b903f26/src/realm_admission_preparation.rs#L94) calls the common `ProgramPreparation::resolve`. 2. [`ProgramPreparation::resolve`](https://git.erikinkinen.fi/erix/launchd/src/commit/0bb56cc229fe4563da6c77ebe6ce9c178b903f26/src/program_preparation.rs#L205) unconditionally requests an ordinary manifest before selecting the private Loaderd operation. The manifest lookup appends `.lmf`; its absence becomes `ManifestRejected` with the original `NOT_FOUND`. 3. [The realm reply encoder](https://git.erikinkinen.fi/erix/launchd/src/commit/0bb56cc229fe4563da6c77ebe6ce9c178b903f26/src/runtime/realm_reply.rs#L92) preserves that result code. The private Loaderd request is selected only after the mandatory sidecar step, which this package cannot pass. The original 107-file evidence inventory and 56,013-byte serial log are retained. Serial SHA-256: `a1132d376e101c370f06f7522f45139d34703e8d385847e848f6d4f84c43ae72`. Image construction has no recorded warnings; stderr preserves the expected watchdog failure. The image inspection and source correlation do not constitute a corrected VM pass. Earlier admission/preparation checks used other executable fixtures and do not establish actual Posixd readiness. ## Tracking Native private-path acceptance — 25 September 2026: signed Launchd `3d39c7413a9c35a051323fceb7f895f0b18402e0` in Integration `66ddc78da31dd03dd554d0677cdc2af86588d525` passes the maintained actual two-mediator startup witness. Exact `/bin/posixd` preparation succeeds without an ordinary launch sidecar; both mediators reach PrivateReady, retire independently and reject stale handles under unchanged120/45-second limits. This closes the private-path defect; configuration, seal and four-client I/O remain separate acceptance work. The first START, request `0x13` / operation `0x6d4`, returns a typed NOT_FOUND rejection before the startup marker. No startup acceptance or checklist increase is awarded. Source review and fail-before controls identify empty registered-CLAIM handling defects in [Launchd issue 5](https://git.erikinkinen.fi/erix/launchd/issues/5) and [Posixd issue 7](https://git.erikinkinen.fi/erix/posixd/issues/7): Kernel empty intake returns NOT_FOUND with no delivery owner. A separate [Procd first-challenge registration race](https://git.erikinkinen.fi/erix/procd/issues/8) can also reject an unaccepted call before the new child registers. The public START code alone does not distinguish internal failure locations. Corrections retain nonzero owners, exact origins and accepted-call ownership; the next native attempt must adopt the reviewed fixes together. The independently reviewed [explicit retirement event gap](https://git.erikinkinen.fi/erix/procd/issues/7), linked to [Launchd issue 6](https://git.erikinkinen.fi/erix/launchd/issues/6), must transfer only the exact terminal observation into the retained Retire acknowledgment after actual child/capability disposal. Spontaneous WAIT and other generations stay independently visible. It is not attributed as this START failure's cause. Configuration/seal, four real clients, byte I/O and all toolchain/EriX guest builds remain open. Docs `95921234c64d7cc11f9f9ed19d49a5d73c95357c` publishes the preceding private preparation/event-contract correction: 45 tests and the full 2,497-page manual pass, all 464,159 word bounds pass and six affected pages were visually reviewed. Original Docs CI 1065/1066 passes with zero final warnings; intermediate TeX reference convergence remains recorded. Further intake/retirement contract prose is a separate pending change. Launchd's original 151/152 CI passes with four complete warning-free logs; Integration 1787/1788 awaits runner assignment. Weighted progress remains 15.16%. The same checkpoint fixes the independently reproduced WAIT decoder defect by accepting exactly ordinary-child and realm-mediator terminal roles before matching the retained process generation. Invalid identity, framing, state and authority remain rejected. All six default/all-feature/production development/release configurations pass 329 library and 66 runtime tests each, strict host/native Clippy, native builds, private rustdoc, formatting and documentation checks, with zero warnings. Authored Rust files remain below 1,000 lines. Final documentation corrections preserve the tested Rust behavior. The original failed VM remains retained. A newly selected image must pass the unchanged actual startup/readiness/retirement scenario before native acceptance; configuration/seal, four clients, byte I/O and guest toolchain/EriX builds remain open. [Private preparation issue 4](https://git.erikinkinen.fi/erix/launchd/issues/4) and [independent event issue 3](https://git.erikinkinen.fi/erix/launchd/issues/3) remain distinct. [WIP PR 2](https://git.erikinkinen.fi/erix/launchd/pulls/2) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65) track the remaining acceptance. Track the correction in [Launchd PR 2](https://git.erikinkinen.fi/erix/launchd/pulls/2), [Launchd lifecycle audit](https://git.erikinkinen.fi/erix/launchd/issues/1), [Integration validation](https://git.erikinkinen.fi/erix/integration/issues/3) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). [The separate realm-event decoder defect](https://git.erikinkinen.fi/erix/launchd/issues/3) is independently valid and is not assigned as this PREPARE failure's cause. - [x] Cover private preparation without an ordinary sidecar, exact executable identity, hostile or missing sources, and retained owner cleanup; keep ordinary manifest enforcement intact. - [x] Complete formatting, strict Clippy, unit tests, warning-denied host/native builds and documentation checks for the correction. - [ ] Pass the unchanged actual Posixd startup/readiness/retirement scenario after adopting the attributed correction before closing this report.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:31 +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#4
No description provided.