Skip to content

fix: filter redundant OCI whiteouts before rootfs copy - #3751

Draft
mattteufel-e2b wants to merge 3 commits into
e2b-dev:mainfrom
mattteufel-e2b:fix/oci-whiteout-directories
Draft

mattteufel-e2b wants to merge 3 commits into
e2b-dev:mainfrom
mattteufel-e2b:fix/oci-whiteout-directories

Conversation

@mattteufel-e2b

@mattteufel-e2b mattteufel-e2b commented Oct 26, 2026 •

Copy link
Copy Markdown

OCI layers can introduce directories containing whiteouts for paths absent from lower layers. OverlayFS lists those names while lookup hides them, so rootfs rsync exits 24 and aborts the template build. Marking the immediate parents of character-device 0:0 whiteouts with an empty trusted.overlay.origin makes OverlayFS filter them during enumeration.

The helper walks temporary extracted layers used as read-only lower directories, does not follow symlinks, preserves existing origin/opaque metadata, and propagates xattr failures. Rsync errors remain fatal. No Dockerfile parser or production mount code changes.

Validation:

  • Live Embed/KVM on GCP: the unpatched base f551e44 fails the pinned public astanin__python-tabulate-76 image with rsync 24 and 32 vanished paths. Candidate 83ba76e completes two full builds, boots sandboxes, and passes command/deleted-file checks. The retained TestTemplateBuildWhiteoutImage passes in 52.23 seconds; 8c62923 adds that test and 7bea3bf aligns its cleanup context with the suite pattern; production code is unchanged.
  • The full-image component replay preserves all 59,159 visible paths and file contents. Its walk/mark pass took 0.86 seconds; this is one component observation, not a production overhead benchmark.
  • All 12 OCI tests previously passed on Linux 6.17 AMD64 (race detector) and ARM64 using the production mount path. The live test ran on Linux 7.0.0-1014-gcp. Cross-compilation, vet, shard checks, pinned golangci-lint 2.15.0 (zero issues), and independent review of the new integration test pass. CI is tracked separately; run 41885127655 encountered an ARM64 runner setup failure because linux-modules-extra-7.0.0-1017-azure was unavailable, before tests ran.

Live results, exact hashes, failures and cleanup · Component and kernel-path evidence · Kernel mechanism

The live runs preserve an initial hugepage-capacity failure and a builder-registration 503 separately from the whiteout comparison. Resources and evidence were recovered and cleaned up. This remains a draft for infra review; no staging or production rollout has occurred, and broader image coverage remains separate work.

@cla-bot cla-bot Bot added the cla-signed label Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant