[BUG] Exact directory close acknowledges before provider cleanup completes #4
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/vfsd#4
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
An exact-directory close reply could report success before Vfsd closed the retained provider handle and independent navigation anchor. A caller therefore could not use that reply as a provider-cleanup completion barrier. Source inspection also found that an unrelated reply error skipped the normal one-shot cleanup attempts before fail-stop.
Reproduction
At Vfsd
a57cad7e874cefe12f70d8436100a90fc4e8bb8d, inspecthandle_exact_rpcinsrc/runtime.rs: after an accepted handle-zeroCLOSE, it sends the successful reply before callingretire_consumed_exact_object. That helper subsequently closes the provider object. A reply error returns before that helper. This is a source-confirmed ordering defect; no runtime or clean-image reproduction was executed under the user's testing override.Expected and actual behavior
Expected: a successful exact close reply follows confirmed provider-handle and navigation-anchor disposal. The native receiver remains alive for that reply attempt, then is retired before dispatch resumes. Failure of either provider close must prevent success acknowledgment and record reuse. Required local cleanup must still be attempted after a reply error.
Actual at the affected revision: the reply precedes provider disposal; caller-visible success cannot establish completion. No runtime exit code, timing or test pass is claimed.
Implemented in signed Vfsd
3d0cc24donfeature/posix-compat. The close path now enforces provider-before-reply ordering, preserves pending reply custody and fails stopped on uncertain cleanup. One-shot operations preserve result-before-disposal semantics and attempt both cleanup steps after a reply error. The change is published on the feature branch; the image catalog has not adopted it.Environment and identity
a57cad7e874cefe12f70d8436100a90fc4e8bb8d; fixed revision linked above.Evidence and prior checks
Eight authored regressions cover explicit close ordering, terminal-caller loss, reply and receiver failures, one-shot cleanup, retained live objects, both actual directory pins and failure of either provider close. The real-handle fixtures preserve the parent directory and retain uncertain child records. Tests remain unrun. Formatting was applied; tests, builds, lint checks, VM runs, manual builds and CI observation are deferred by the user. No waived check is reported as passed.
Manual update describes the completion contract. The runtime was split into a focused exact-dispatch module; all changed code files remain below 1,000 lines.
Tracking
Implementation and documentation are complete for this defect; testing is waived for completion by the user. Broader realm source ownership and consumer adoption remain open in the binding design.
Vfsd review, Vfsd authority work, manual review, Phase 6 master.
erikinkinen referenced this issue2026-09-29 02:27:45 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 02:27:46 +02:00