[BUG] Delayed candidate retirement repeats process-lock cleanup #26

Closed
opened 2026-10-03 01:26:10 +02:00 by erikinkinen · 0 comments
Owner

Summary

Delayed native candidate disposal repeats process-wide advisory-lock release after the original compatibility Close has already completed. This can remove later process locks or reservations held through another candidate for the same object. Candidate cleanup also leaves matching published intervals in retained rollback journals, allowing later cancellation to restore advisory records whose original pin has retired.

Reproduction

Source-derived sequences, not executed:

  1. Hold two admitted candidates A and B for one original object in one native scope.
  2. Release process locks for A through the explicit ReleaseProcess request; retain A while an earlier operation finishes.
  3. Acquire a process lock or prepare a Wait reservation through B.
  4. Retire A. Observe the resulting state from an independently admitted peer scope.

For rollback lifetime, hold a published process interval through A, prepare a conversion through B, retire A, and then cancel B's reservation. The journal must not restore A's retired custody.

Expected and actual behavior

Explicit Close releases process policy once. Delayed candidate disposal removes only lock records and reservations dependent on that original pin, including matching rollback contents. B's later records/reservations survive A's disposal, and cancellation cannot restore records held by A after its retirement.

Source inspection finds that retire_scoped_candidate calls retire_process_locks before narrow candidate cleanup; the broad helper clears every process record and reservation for the same object and scope. The narrow cleanup visits current intervals but does not remove matching journal.before intervals. No runtime reproduction or executed failure is claimed.

Environment and identity

  • Component: Vfsd 01081c24c321e7ed44bcf48c1a1cfb96a9040c53 on feature/posix-compat; Integration bdd4dc684906964b9dcdb966cc13334de85e99ed.
  • Image profile/digest/runtime: not built or executed for this report.
  • Hardware/VM/toolchain: no runtime or compiler execution; source inspection only.
  • Authority: already admitted original candidate pins and their existing native scope; no pathname, PID or caller-supplied inode selects another owner. Advisory state is the affected behavior.
  • Last known working revision: unknown.

Evidence and prior checks

Read-only inspection of src/handles/acquisition/native.rs, src/handles/locks/lifetime.rs, src/handles/locks.rs and the native lock dispatch. Tests, builds, lint and CI observation are currently deferred by request. Regression controls will be authored without execution, using independent peer observations and accepted/cancelled reservation outcomes.

Tracking

Supports retained local-stream and overlapping-call ownership and Phase 6 completion. Resolution requires removing repeated process-wide retirement, preserving separate process/description policies and preventing retired custody from surviving in rollback records.

Source resolution — 3 October 2026

No new native grant, provider route, allocation, wire operation or unsafe code is introduced.

This repair does not complete mediator admission coordination: uncertain explicit Close retries must not erase newly acquired process locks, and a blocking Wait must not hold a fence that deadlocks Close. Queued mutation admission, path-anchor/socket-path lifetime audit, invocation-owned masks, fair all-call intake/drain, native thread/TLS semantics, complete libc frontends and imported consumers remain unfinished. All eight whole socket criteria remain unchecked. Both full EriX guest generations AND external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

Related records and contracts
Repository Links
docs PR 4
integration PR 12
posixd PR 5
vfsd issue 26, PR 3
## Summary Delayed native candidate disposal repeats process-wide advisory-lock release after the original compatibility Close has already completed. This can remove later process locks or reservations held through another candidate for the same object. Candidate cleanup also leaves matching published intervals in retained rollback journals, allowing later cancellation to restore advisory records whose original pin has retired. ## Reproduction Source-derived sequences, not executed: 1. Hold two admitted candidates A and B for one original object in one native scope. 2. Release process locks for A through the explicit ReleaseProcess request; retain A while an earlier operation finishes. 3. Acquire a process lock or prepare a Wait reservation through B. 4. Retire A. Observe the resulting state from an independently admitted peer scope. For rollback lifetime, hold a published process interval through A, prepare a conversion through B, retire A, and then cancel B's reservation. The journal must not restore A's retired custody. ## Expected and actual behavior Explicit Close releases process policy once. Delayed candidate disposal removes only lock records and reservations dependent on that original pin, including matching rollback contents. B's later records/reservations survive A's disposal, and cancellation cannot restore records held by A after its retirement. Source inspection finds that retire_scoped_candidate calls retire_process_locks before narrow candidate cleanup; the broad helper clears every process record and reservation for the same object and scope. The narrow cleanup visits current intervals but does not remove matching journal.before intervals. No runtime reproduction or executed failure is claimed. ## Environment and identity - Component: Vfsd `01081c24c321e7ed44bcf48c1a1cfb96a9040c53` on `feature/posix-compat`; Integration `bdd4dc684906964b9dcdb966cc13334de85e99ed`. - Image profile/digest/runtime: not built or executed for this report. - Hardware/VM/toolchain: no runtime or compiler execution; source inspection only. - Authority: already admitted original candidate pins and their existing native scope; no pathname, PID or caller-supplied inode selects another owner. Advisory state is the affected behavior. - Last known working revision: unknown. ## Evidence and prior checks Read-only inspection of `src/handles/acquisition/native.rs`, `src/handles/locks/lifetime.rs`, `src/handles/locks.rs` and the native lock dispatch. Tests, builds, lint and CI observation are currently deferred by request. Regression controls will be authored without execution, using independent peer observations and accepted/cancelled reservation outcomes. ## Tracking Supports [retained local-stream and overlapping-call ownership](https://git.erikinkinen.fi/erix/posixd/issues/34) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). Resolution requires removing repeated process-wide retirement, preserving separate process/description policies and preventing retired custody from surviving in rollback records. ### Source resolution — 3 October 2026 No new native grant, provider route, allocation, wire operation or unsafe code is introduced. This repair does not complete mediator admission coordination: uncertain explicit Close retries must not erase newly acquired process locks, and a blocking Wait must not hold a fence that deadlocks Close. Queued mutation admission, path-anchor/socket-path lifetime audit, invocation-owned masks, fair all-call intake/drain, native thread/TLS semantics, complete libc frontends and imported consumers remain unfinished. All eight whole socket criteria remain unchecked. Both full EriX guest generations AND external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | integration | [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12) | | posixd | [PR 5](https://git.erikinkinen.fi/erix/posixd/pulls/5) | | vfsd | [issue 26](https://git.erikinkinen.fi/erix/vfsd/issues/26), [PR 3](https://git.erikinkinen.fi/erix/vfsd/pulls/3) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:19 +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/vfsd#26
No description provided.