[BUG] Losing one request reply destroys a surviving recipient stream view #12

Closed
opened 2026-09-29 11:36:03 +02:00 by erikinkinen · 0 comments
Owner

Summary

The inherited-stream runtime cancels an entire dedicated recipient view whenever reply delivery returns native NOT_FOUND, including a lost status/read/write reply. Request abandonment therefore destroys the descriptor's provider while its client and realm remain live.

Reproduction

Source-level reproduction; no VM or test was run. Prepare a dedicated recipient view, issue a status or data operation, then abandon that invocation before its reply is accepted. In src/runtime/stream_proxy.rs, the NOT_FOUND branch calls cancel_recipient_stream_view and then finishes receiver disposal. A subsequent request through the original still-open descriptor has lost its provider endpoint.

Expected and actual behavior

Expected: loss of a status/data reply retires only that request. Keep the originally delegated view available until explicit Close or owning-client/realm teardown. A Close that already disposed backend custody must still finish receiver retirement after its reply is delivered or abandoned. Do not replay committed data or manufacture rollback.

Actual: every lost reply on a recipient view initiates cancellation, drops its backend and receiver, and releases its provider reservation. Ordinary inherited-proxy loss semantics and explicit view Close have separate ownership contracts and must remain intact.

Environment and identity

  • Component: Launchd 2d403bfe, src/runtime/stream_proxy.rs and src/stream_recipient_view.rs.
  • Integration source graph: 2842f5d5.
  • Runtime: native x86-64 dedicated recipient view; no image execution or digest produced for this finding.
  • Authority: existing view-local backend SEND and original receiver; original lender stays independently owned.
  • Last known working revision: none established for per-request cancellation.

Evidence and prior checks

Implemented in the signed original correction, with three authored, unrun controls and updated component/manual contracts. The runtime now preserves a live recipient view after request loss and completes receiver retirement only when view cancellation already committed. The independent owned-intake defect remains open.

The runtime's NOT_FOUND branch unconditionally cancels recipient views. The existing finish_recipient_stream_reply already distinguishes an explicitly cancelled view awaiting its reply from a still-live view. Use that original state at the actual reply boundary, with controls for preserved subsequent I/O, lost Close replies, ordinary proxies and failed/stale evidence. Tests, builds and CI observation remain deferred; no executed result is claimed.

Tracking

Related stream consumer, provider review, native scenario and phase completion. This is a request-versus-descriptor lifetime defect; no extra capability or broader access is required to fix it.

## Summary The inherited-stream runtime cancels an entire dedicated recipient view whenever reply delivery returns native NOT_FOUND, including a lost status/read/write reply. Request abandonment therefore destroys the descriptor's provider while its client and realm remain live. ## Reproduction Source-level reproduction; no VM or test was run. Prepare a dedicated recipient view, issue a status or data operation, then abandon that invocation before its reply is accepted. In `src/runtime/stream_proxy.rs`, the NOT_FOUND branch calls `cancel_recipient_stream_view` and then finishes receiver disposal. A subsequent request through the original still-open descriptor has lost its provider endpoint. ## Expected and actual behavior Expected: loss of a status/data reply retires only that request. Keep the originally delegated view available until explicit Close or owning-client/realm teardown. A Close that already disposed backend custody must still finish receiver retirement after its reply is delivered or abandoned. Do not replay committed data or manufacture rollback. Actual: every lost reply on a recipient view initiates cancellation, drops its backend and receiver, and releases its provider reservation. Ordinary inherited-proxy loss semantics and explicit view Close have separate ownership contracts and must remain intact. ## Environment and identity - Component: [Launchd 2d403bfe](https://git.erikinkinen.fi/erix/launchd/commit/2d403bfe9ade76fecfb33ff9b5bfa2657f34bde5), `src/runtime/stream_proxy.rs` and `src/stream_recipient_view.rs`. - Integration source graph: [2842f5d5](https://git.erikinkinen.fi/erix/integration/commit/2842f5d54a83a0794f4b085a345eb358a9ec353a). - Runtime: native x86-64 dedicated recipient view; no image execution or digest produced for this finding. - Authority: existing view-local backend SEND and original receiver; original lender stays independently owned. - Last known working revision: none established for per-request cancellation. ## Evidence and prior checks Implemented in [the signed original correction](https://git.erikinkinen.fi/erix/launchd/commit/24e398b9e34f36ec72f11d132870e0ee9af905a7), with three authored, unrun controls and updated component/manual contracts. The runtime now preserves a live recipient view after request loss and completes receiver retirement only when view cancellation already committed. The independent owned-intake defect remains open. The runtime's NOT_FOUND branch unconditionally cancels recipient views. The existing `finish_recipient_stream_reply` already distinguishes an explicitly cancelled view awaiting its reply from a still-live view. Use that original state at the actual reply boundary, with controls for preserved subsequent I/O, lost Close replies, ordinary proxies and failed/stale evidence. Tests, builds and CI observation remain deferred; no executed result is claimed. ## Tracking Related [stream consumer](https://git.erikinkinen.fi/erix/posixd/issues/11), [provider review](https://git.erikinkinen.fi/erix/launchd/pulls/2), [native scenario](https://git.erikinkinen.fi/erix/integration/pulls/12) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). This is a request-versus-descriptor lifetime defect; no extra capability or broader access is required to fix it.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:32 +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#12
No description provided.