[BUG] Keep destination absence distinct from ext lookup failures #13

Closed
opened 2026-09-30 06:37:53 +02:00 by erikinkinen · 0 comments
Owner

Summary

Regular-file creation, mkdir, symlink creation and hard-link destination checks discard every destination lookup error except success. A failed read can therefore enter a namespace mutation without established absence. Depending on later I/O, the operation can succeed after suppressing the original failure or can attempt allocation before a later refusal. The behavior was identified by source audit, not an executed reproduction.

Reproduction

At E2fsd 0704b99def883c46abc5b880c66da058bc677015, inspect src/media/mutation.rs regular-file and directory creation and src/media/mutation/links.rs symlink and hard-link creation. All four test the child lookup with is_ok() and proceed for every error. Configure a writable ext medium with an existing source for hard links, then inject a single IPC_RESULT_INTERNAL when reading the destination directory during the final-component lookup. Let subsequent reads succeed. Invoke each mutation with a missing destination. A persistent malformed directory is a second negative control.

This is a source-derived control-flow reproduction. Runtime frequency, exact post-failure media state and test/build outcomes have not been measured. Fault-injection regressions will distinguish a known missing child from read failure before counting any write attempt.

Expected and actual behavior

Expected: only a completed negative directory search admits creation. A dependency may itself return NOT_FOUND; the error code alone does not establish absence. Preserve every other lookup error and return before allocation, link-count updates, namespace writes or transaction effects. Existing-destination behavior remains unchanged.

Actual source behavior: is_ok() preserves only the existence case and erases the distinction between known absence, I/O failure and malformed metadata. Exact-entry create/touch and rename originally discriminated by error code, which still conflated a dependency NOT_FOUND with directory absence. Typed absence now preserves both meanings through these paths and indexed recovery.

Environment and identity

  • Component revision: E2fsd 0704b99def883c46abc5b880c66da058bc677015; Integration d8413bf1bb92414b6b84ffec9e3839695b1439dc.
  • Image/runtime: no image executed; authored controls will use original fixture media and a test-owned block wrapper.
  • Hardware, firmware and toolchain results: not involved in the source finding.
  • Authority: existing explicitly supplied mount, block route and mutation operation; no new route or grant is required.
  • Last known working revision: unknown.

Evidence and prior checks

The ext destination-lookup defect is implemented and published: e2fsd bddfed39, docs ea2f3f25, integration 8fa3c0b8. It is closed under the testing waiver. The full conditional Open/openat work remains open.

Completed child absence now has a distinct internal result. Block/key/format failures, including dependency NOT_FOUND, propagate through regular-file creation, mkdir, links, rename destinations, exact-entry resolution/revalidation and indexed journal recovery. Provider rename preflight retains the distinction across the full pathname and preserves its existing held-destination exclusion on both wire versions. Short unparsed directory suffixes refuse as malformed media. Original mounts, block/key routes, parent identities and native operation ceilings remain unchanged.

Path, exact and touch regular-file creation share one transaction core. Preflight precedes allocation; inode and optional inline payload initialization, checksums, entry insertion, timestamps, quotas and result metadata remain under the original transaction owner. Explicit touch fields override automatic times. Unselected touch fields no longer cause a redundant touch read/write. Journal rollback and uncertain-effect fail-stop behavior remain; no measured performance result is claimed.

Ten regression controls are authored and unrun: linear/indexed namespace failures including missing-device codes, malformed records/suffixes, exact absence resolution/revalidation, successful mutations, intervening conflicts, persisted modes/inline data/timestamps, held-destination provider preflight and indexed recovery with unchanged home media. Rustfmt was applied to19 changed Rust inputs. The source inventory covers 3573 code files across 76 repositories, all below1000 lines; largest changed source 988 lines. Contracts, component documentation and maintained filesystem manual TeX are updated. Three signed commits are published with three catalog selections; the independent Rootd helper remains 17acba24ba2136d453fa84326574b7470b161741.

This completes the reported mutation defect and consolidation. Full conditional compatibility creation still needs authenticated requested mode/effective IDs/current mask, original held-parent evidence, default ACL inheritance and original acquisition/result/cleanup custody. No full Open acceptance credit is added: 16.91% weighted and 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest generations and rebuilding the external Rust/LLVM toolchain inside EriX remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred. No executed pass, warning-free build or benchmark result is claimed.

Earlier source evidence follows; the correction above is current.

The four source locations are the evidence. Tests, builds, lint checks, VM execution and CI observation are deferred by user instruction. No executed failure or pass is claimed. The correction covers every namespace destination check, exact-entry revalidation, provider rename preflight and indexed recovery, and shares regular-file allocation/publication logic.

Tracking

Part of conditional Open/openat creation and the phase completion tracker. Full conditional creation, inherited ACLs and guest builds remain separately unfinished.

## Summary Regular-file creation, mkdir, symlink creation and hard-link destination checks discard every destination lookup error except success. A failed read can therefore enter a namespace mutation without established absence. Depending on later I/O, the operation can succeed after suppressing the original failure or can attempt allocation before a later refusal. The behavior was identified by source audit, not an executed reproduction. ## Reproduction At E2fsd `0704b99def883c46abc5b880c66da058bc677015`, inspect `src/media/mutation.rs` regular-file and directory creation and `src/media/mutation/links.rs` symlink and hard-link creation. All four test the child lookup with `is_ok()` and proceed for every error. Configure a writable ext medium with an existing source for hard links, then inject a single `IPC_RESULT_INTERNAL` when reading the destination directory during the final-component lookup. Let subsequent reads succeed. Invoke each mutation with a missing destination. A persistent malformed directory is a second negative control. This is a source-derived control-flow reproduction. Runtime frequency, exact post-failure media state and test/build outcomes have not been measured. Fault-injection regressions will distinguish a known missing child from read failure before counting any write attempt. ## Expected and actual behavior Expected: only a completed negative directory search admits creation. A dependency may itself return NOT_FOUND; the error code alone does not establish absence. Preserve every other lookup error and return before allocation, link-count updates, namespace writes or transaction effects. Existing-destination behavior remains unchanged. Actual source behavior: `is_ok()` preserves only the existence case and erases the distinction between known absence, I/O failure and malformed metadata. Exact-entry create/touch and rename originally discriminated by error code, which still conflated a dependency NOT_FOUND with directory absence. Typed absence now preserves both meanings through these paths and indexed recovery. ## Environment and identity - Component revision: E2fsd `0704b99def883c46abc5b880c66da058bc677015`; Integration `d8413bf1bb92414b6b84ffec9e3839695b1439dc`. - Image/runtime: no image executed; authored controls will use original fixture media and a test-owned block wrapper. - Hardware, firmware and toolchain results: not involved in the source finding. - Authority: existing explicitly supplied mount, block route and mutation operation; no new route or grant is required. - Last known working revision: unknown. ## Evidence and prior checks The [ext destination-lookup defect](https://git.erikinkinen.fi/erix/e2fsd/issues/13) is implemented and published: [e2fsd `bddfed39`](https://git.erikinkinen.fi/erix/e2fsd/commit/bddfed39353239417f0543852d46fbe859c2963b), [docs `ea2f3f25`](https://git.erikinkinen.fi/erix/docs/commit/ea2f3f2591e87e867692c180b38c364a1116e24d), [integration `8fa3c0b8`](https://git.erikinkinen.fi/erix/integration/commit/8fa3c0b8f987b1407ceb8b5ca248075b0e519dd7). It is closed under the testing waiver. The [full conditional Open/openat work](https://git.erikinkinen.fi/erix/posixd/issues/17) remains open. Completed child absence now has a distinct internal result. Block/key/format failures, including dependency NOT_FOUND, propagate through regular-file creation, mkdir, links, rename destinations, exact-entry resolution/revalidation and indexed journal recovery. Provider rename preflight retains the distinction across the full pathname and preserves its existing held-destination exclusion on both wire versions. Short unparsed directory suffixes refuse as malformed media. Original mounts, block/key routes, parent identities and native operation ceilings remain unchanged. Path, exact and touch regular-file creation share one transaction core. Preflight precedes allocation; inode and optional inline payload initialization, checksums, entry insertion, timestamps, quotas and result metadata remain under the original transaction owner. Explicit touch fields override automatic times. Unselected touch fields no longer cause a redundant touch read/write. Journal rollback and uncertain-effect fail-stop behavior remain; no measured performance result is claimed. Ten regression controls are authored and unrun: linear/indexed namespace failures including missing-device codes, malformed records/suffixes, exact absence resolution/revalidation, successful mutations, intervening conflicts, persisted modes/inline data/timestamps, held-destination provider preflight and indexed recovery with unchanged home media. Rustfmt was applied to19 changed Rust inputs. The source inventory covers 3573 code files across 76 repositories, all below1000 lines; largest changed source 988 lines. Contracts, component documentation and maintained filesystem manual TeX are updated. Three signed commits are published with three catalog selections; the independent Rootd helper remains `17acba24ba2136d453fa84326574b7470b161741`. This completes the reported mutation defect and consolidation. Full conditional compatibility creation still needs authenticated requested mode/effective IDs/current mask, original held-parent evidence, default ACL inheritance and original acquisition/result/cleanup custody. No full Open acceptance credit is added: 16.91% weighted and 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest generations and rebuilding the external Rust/LLVM toolchain inside EriX remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred. No executed pass, warning-free build or benchmark result is claimed. Earlier source evidence follows; the correction above is current. The four source locations are the evidence. Tests, builds, lint checks, VM execution and CI observation are deferred by user instruction. No executed failure or pass is claimed. The correction covers every namespace destination check, exact-entry revalidation, provider rename preflight and indexed recovery, and shares regular-file allocation/publication logic. ## Tracking Part of [conditional Open/openat creation](https://git.erikinkinen.fi/erix/posixd/issues/17) and the [phase completion tracker](https://git.erikinkinen.fi/erix/integration/issues/65). Full conditional creation, inherited ACLs and guest builds remain separately unfinished.
erikinkinen changed title from [BUG] Preserve destination lookup failures before ext creation to [BUG] Keep destination absence distinct from ext lookup failures 2026-09-30 06:53:36 +02:00
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:46 +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/e2fsd#13
No description provided.