[BUG] File delivery cancellation disables a positively advanced shared descriptor #19
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/posixd#19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implemented: validated file I/O survives delivery cancellation during caller release. Testing is waived by user; the regression controls are authored and unrun. Full Open/openat remains separate and unfinished.
Original defect:
Cancelling a file Read or Write after its native result was positively correlated can disable the shared description while the mediator is releasing the original outbound caller. A surviving dup alias then reports EBADF despite having a valid admitted candidate and a known committed cursor. This is a source-audit finding; the reproduction has not been executed.
Reproduction
The authored sealed-service regression will cover both ordinary and draining release, plus uncollected and uncertain-submission controls. Runtime frequency and clean-image reproduction remain unmeasured under the execution waiver.
Expected and actual behavior
Expected: preserve the original admitted file and its positively committed shared cursor; release the outbound caller and abandon only that delivery. Do not replay the original effect. Final Close must still retire the sole original pin.
Actual source behavior: cancellation disables every file candidate after the Submit stage, including Release after complete result validation. Later byte I/O through any alias reports EBADF. Outstanding effects without validated results must remain cleanup-only.
Environment and identity
6674637c7a10420dac23a9622e0c27a7e37e7492; Integration cataloge1dcb8ff2acfb8d45d98093f43ee7f17e1ffdf47.Evidence and prior checks
The file-delivery cancellation defect is corrected and published: docs
8a2ea35b, posixd17e151a3, integration70d1079b.After an original native Read/Write reply is completely validated, cancellation during ordinary or acknowledged draining caller release preserves the committed shared cursor and admitted candidate for surviving aliases. It abandons only the delivery and never replays the effect. An uncollected effect remains cleanup-only, and uncertain submission retains original custody under the existing service failure latch. Final Close still retires the one shared pin.
Four sealed-service regressions are authored and unrun: collected Read and Write each cover cancellation before and during draining release; negative controls cover uncollected cancellation and uncertain submission without ordinary-use recovery or discarded custody. Rustfmt was applied with the repository configuration. Component contracts, architecture/roadmap and the technical manual are updated. The implementation closes the defect under the current testing waiver; no test pass is claimed.
Three signed commits are pushed on feature/posix-compat in Posixd, Docs and Integration. Integration adopts three catalog entries and preserves the independent Rust helper
e755cf71c9365577882183d16e7d7e4442fa49cd. No Cargo dependency changes are needed. A read-only inventory covers 3493 code files in 76 repositories, all below 1000 lines; the largest changed source is 475 lines.Full native Open/openat remains unfinished for parent/symlink/mount traversal and conditional creation with process umask. The source audit confirms root/cwd are independent provider anchors; accepting parent components alone cannot implement ceiling-preserving traversal across them. This correction adds no full Open acceptance credit. Recalculated completion remains 16.91% weighted: 21/460 parents and 441/902 sub-items. Both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain required. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred.
Earlier evidence follows; the correction above supersedes the original cancellation behavior.
The cancellation branch in
src/realm_io/external/file.rsdisables a candidate whenever its phase differs from Submit. Release is entered only after complete wire validation and cursor commitment. Candidate disable removes frozen access, causing later alias byte operations to report EBADF.Tracking
Related: native Open/openat and Phase 6 completion. Resolution requires preserving successful-result state through ordinary and draining cancellation while retaining uncertain outcomes and final cleanup obligations.
erikinkinen referenced this issue2026-09-30 00:51:21 +02:00
erikinkinen referenced this issue from erix/docs2026-09-30 00:51:23 +02:00
erikinkinen referenced this issue from erix/integration2026-09-30 00:51:24 +02:00