[BUG] Empty control CLAIM permanently fails the native bootstrap #7

Open
opened 2026-09-24 20:00:11 +02:00 by erikinkinen · 0 comments
Owner

Summary

Posixd treats normal empty control intake as an irrecoverable native error. The Kernel returns (IPC_RESULT_NOT_FOUND, 0) when a registered receiver has no queued invocation; Bootstrap::advance_control recognizes only (IPC_RESULT_RETRY, 0) as idle. The resulting sticky failure causes the native runtime to exit even though no control delivery exists to process.

This is a source-confirmed defect identified while diagnosing the corresponding Launchd failure. The original native scenario failed before Posixd startup acceptance; it does not establish that this Posixd branch executed in the guest.

Reproduction

At Posixd 809647d60544c4c6121868c99133f30d054965c9, use a valid counted startup and explicitly supplied packet workspace. Advance control intake with a registered receiver whose native CLAIM returns (IPC_RESULT_NOT_FOUND, 0), either while readiness is pending or after private readiness. No capabilities or delivery handles are returned. That source converts this normal idle result into a permanent Operation::Claim failure.

The existing actual-image scenario is:

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

The original run stopped earlier at Launchd's corresponding empty-CLAIM defect; it is not a reproduction receipt for Posixd's own control branch.

Expected and actual behavior

An empty zero-owner CLAIM should make a bounded idle turn, preserving the independent readiness caller and allowing a later authenticated challenge. After readiness it should continue serving the supplied control receiver normally. Every nonzero owner must still be retained before status interpretation; wrong callers, malformed context, draining deliveries and other failures must retain their existing rejection and cleanup rules.

At the failing revision, control intake passes native NOT_FOUND into native_status. Bootstrap::advance preserves that error permanently, and the actual executable terminates on an engine error. An idle queue therefore prevents reliable startup or continued service. No native Posixd exit caused by this branch has yet been observed.

Environment and identity

  • Posixd 809647d60544c4c6121868c99133f30d054965c9; Kernel 5e285aa91a1423523b2a094d4ce0449ada39b16c; Integration fa857c0964774def6777142afeb7a3c16440abee; Launchd eb2a1eedabe66e01ab0eb8c630d2f06ecb67b68d; Procd d04311abff67e7355bd92bb2e48fb6161e0ec674.
  • Source contract applies to the native x86-64 executable and host transport fixtures. The selected release QEMU/OVMF image uses development runtime configuration, one virtual CPU and Rust 1.97.1.
  • Only the counted control RECV and configuration SEND routes are supplied. The defect requires no additional authority, malformed startup or hostile caller.
  • Last known working revision is unestablished. No Posixd runtime reproduction, successful corrected native execution or internal guest stage trace is claimed.

Evidence and prior checks

Kernel queued lookup returns NOT_FOUND for an empty registered queue. Server CLAIM and its wire adapter preserve that result with owner zero. Posixd instead tests only RETRY/zero before treating the status as failure. Procd's existing owned receiver already handles both idle outcomes.

The associated original native run reports typed START NOT_FOUND and is retained under the separate Launchd report. It keeps its original 120-second hard limit and 45-second progress watchdog. That evidence does not prove this Posixd branch ran. The source-bound regression and strict validation described below are complete. Changed-source native acceptance remains pending.

Signed correction 5f54a55a5f189559352c7d0e6a2af55aaa37c44f admits only zero-owner NOT_FOUND or RETRY as idle. All three focused CLAIM controls pass, covering pending readiness, continued service after readiness, and retained nonzero owners on both erroneous statuses. The complete default/all-feature development/release matrix passes 15 tests in each of four configurations. Formatting, strict host/native Clippy, warning-denied native builds, host/native rustdoc and documentation/dependency checks pass with zero warnings. Both native executable profiles retain an executable entry and the final 64 KiB read/write, non-executable stack.

Both original exact-head CI runs, 25 and 26, passed. Their complete Rust and Markdown logs were reviewed with no warning or failure candidates. Integration 8f9b7d752c4769e3017aa4116ad0a542f54f488b selects the signed correction. Actual changed-image execution, readiness and continued control handling remain pending; this issue remains open.

Tracking

Posixd realm lifecycle, Posixd authority and quality audit, Posixd PR 5, Launchd empty intake, Integration validation, and Phase 6 completion.

  • Reproduce native zero-owner NOT_FOUND against the failing engine while readiness is pending and after private readiness.
  • Admit only zero-owner RETRY or NOT_FOUND as idle; verify that a nonzero owner on an erroneous status remains retained and rejected.
  • Complete formatting, strict Clippy, unit tests and warning-denied host/native build and documentation checks.
  • Demonstrate corrected actual Posixd execution, readiness and continued control handling in the coherent native image before closing native acceptance.

Baseline regression reproduced against unchanged production: cargo test --locked --offline --all-targets empty_control_claims_preserve_readiness_and_live_service -- --nocapture returns 101 with one failing control, Native { operation: Claim, status: 3 }. This directly confirms the empty-control mismatch in the host engine; it does not assert this branch executed in the earlier guest. Corrected strict validation and actual native acceptance remain separate. Original failure output and source identity remain retained.

## Summary Posixd treats normal empty control intake as an irrecoverable native error. The Kernel returns `(IPC_RESULT_NOT_FOUND, 0)` when a registered receiver has no queued invocation; `Bootstrap::advance_control` recognizes only `(IPC_RESULT_RETRY, 0)` as idle. The resulting sticky failure causes the native runtime to exit even though no control delivery exists to process. This is a source-confirmed defect identified while diagnosing the corresponding Launchd failure. The original native scenario failed before Posixd startup acceptance; it does not establish that this Posixd branch executed in the guest. ## Reproduction At Posixd `809647d60544c4c6121868c99133f30d054965c9`, use a valid counted startup and explicitly supplied packet workspace. Advance control intake with a registered receiver whose native CLAIM returns `(IPC_RESULT_NOT_FOUND, 0)`, either while readiness is pending or after private readiness. No capabilities or delivery handles are returned. That source converts this normal idle result into a permanent `Operation::Claim` failure. The existing actual-image scenario is: ```sh bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-startup-positive.toml components.toml ``` The original run stopped earlier at [Launchd's corresponding empty-CLAIM defect](https://git.erikinkinen.fi/erix/launchd/issues/5); it is not a reproduction receipt for Posixd's own control branch. ## Expected and actual behavior An empty zero-owner CLAIM should make a bounded idle turn, preserving the independent readiness caller and allowing a later authenticated challenge. After readiness it should continue serving the supplied control receiver normally. Every nonzero owner must still be retained before status interpretation; wrong callers, malformed context, draining deliveries and other failures must retain their existing rejection and cleanup rules. At the failing revision, [control intake](https://git.erikinkinen.fi/erix/posixd/src/commit/809647d60544c4c6121868c99133f30d054965c9/src/bootstrap.rs#L173) passes native `NOT_FOUND` into `native_status`. `Bootstrap::advance` preserves that error permanently, and the actual executable terminates on an engine error. An idle queue therefore prevents reliable startup or continued service. No native Posixd exit caused by this branch has yet been observed. ## Environment and identity - Posixd `809647d60544c4c6121868c99133f30d054965c9`; Kernel `5e285aa91a1423523b2a094d4ce0449ada39b16c`; Integration `fa857c0964774def6777142afeb7a3c16440abee`; Launchd `eb2a1eedabe66e01ab0eb8c630d2f06ecb67b68d`; Procd `d04311abff67e7355bd92bb2e48fb6161e0ec674`. - Source contract applies to the native x86-64 executable and host transport fixtures. The selected release QEMU/OVMF image uses development runtime configuration, one virtual CPU and Rust 1.97.1. - Only the counted control RECV and configuration SEND routes are supplied. The defect requires no additional authority, malformed startup or hostile caller. - Last known working revision is unestablished. No Posixd runtime reproduction, successful corrected native execution or internal guest stage trace is claimed. ## Evidence and prior checks [Kernel queued lookup](https://git.erikinkinen.fi/erix/kernel/src/commit/5e285aa91a1423523b2a094d4ce0449ada39b16c/src/kobj/endpoint/invocation/table.rs#L145) returns `NOT_FOUND` for an empty registered queue. [Server CLAIM](https://git.erikinkinen.fi/erix/kernel/src/commit/5e285aa91a1423523b2a094d4ce0449ada39b16c/src/kobj/endpoint/invocation/server.rs#L24) and its wire adapter preserve that result with owner zero. Posixd instead tests only `RETRY`/zero before treating the status as failure. Procd's existing owned receiver already handles both idle outcomes. The associated original native run reports typed START `NOT_FOUND` and is retained under the separate Launchd report. It keeps its original 120-second hard limit and 45-second progress watchdog. That evidence does not prove this Posixd branch ran. The source-bound regression and strict validation described below are complete. Changed-source native acceptance remains pending. Signed correction [5f54a55a5f189559352c7d0e6a2af55aaa37c44f](https://git.erikinkinen.fi/erix/posixd/commit/5f54a55a5f189559352c7d0e6a2af55aaa37c44f) admits only zero-owner `NOT_FOUND` or `RETRY` as idle. All three focused CLAIM controls pass, covering pending readiness, continued service after readiness, and retained nonzero owners on both erroneous statuses. The complete default/all-feature development/release matrix passes 15 tests in each of four configurations. Formatting, strict host/native Clippy, warning-denied native builds, host/native rustdoc and documentation/dependency checks pass with zero warnings. Both native executable profiles retain an executable entry and the final 64 KiB read/write, non-executable stack. Both original exact-head CI runs, [25](https://git.erikinkinen.fi/erix/posixd/actions/runs/25) and [26](https://git.erikinkinen.fi/erix/posixd/actions/runs/26), passed. Their complete Rust and Markdown logs were reviewed with no warning or failure candidates. Integration [8f9b7d752c4769e3017aa4116ad0a542f54f488b](https://git.erikinkinen.fi/erix/integration/commit/8f9b7d752c4769e3017aa4116ad0a542f54f488b) selects the signed correction. Actual changed-image execution, readiness and continued control handling remain pending; this issue remains open. ## Tracking [Posixd realm lifecycle](https://git.erikinkinen.fi/erix/posixd/issues/1), [Posixd authority and quality audit](https://git.erikinkinen.fi/erix/posixd/issues/4), [Posixd PR 5](https://git.erikinkinen.fi/erix/posixd/pulls/5), [Launchd empty intake](https://git.erikinkinen.fi/erix/launchd/issues/5), [Integration validation](https://git.erikinkinen.fi/erix/integration/issues/3), and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). - [x] Reproduce native zero-owner `NOT_FOUND` against the failing engine while readiness is pending and after private readiness. - [x] Admit only zero-owner `RETRY` or `NOT_FOUND` as idle; verify that a nonzero owner on an erroneous status remains retained and rejected. - [x] Complete formatting, strict Clippy, unit tests and warning-denied host/native build and documentation checks. - [ ] Demonstrate corrected actual Posixd execution, readiness and continued control handling in the coherent native image before closing native acceptance. Baseline regression reproduced against unchanged production: `cargo test --locked --offline --all-targets empty_control_claims_preserve_readiness_and_live_service -- --nocapture` returns 101 with one failing control, `Native { operation: Claim, status: 3 }`. This directly confirms the empty-control mismatch in the host engine; it does not assert this branch executed in the earlier guest. Corrected strict validation and actual native acceptance remain separate. Original failure output and source identity remain retained.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:04 +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/posixd#7
No description provided.