[BUG] Direct runtime artifact bytes vary with checkout paths #22

Open
opened 2026-09-12 14:13:22 +02:00 by erikinkinen · 0 comments
Owner

Summary

Directly compiled kernel and service artifacts do not apply the canonical source/build path remapping already used for shared objects. Identical service sources built in separate directories can therefore embed different build paths and produce different loaded bytes. This prevents treating the current pair as a controlled comparison of a kernel optimization.

Reproduction

Select Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5 and identical original runtime sources, compiler, target, features and linker inputs. Compile the same local library and executable through rustc_pic_object in two separately located source and scratch directories of different lengths. Retain objects, Rust metadata and the linked ELF; compare their hashes and loaded sections.

An independent real-compiler fixture using identical ASCII source/manifest bytes and a generated executable source produces differing library object, metadata, executable object and linked ELF files. The original failure is retained before modifying the builder.

Expected and actual behavior

Equivalent source/configuration inputs should produce the same artifact bytes regardless of their explicitly chosen checkout and scratch locations. Real source or feature changes must remain observable in artifact and cache identities.

Instead, all four direct-compiler fixture outputs differ and contain their build directory prefixes. In the original host image pair, all 27 shared objects and five unrelated services are identical, while 32 unrelated services differ in loaded sections. Some file sizes also differ. These observations prevent causal timing admission; they neither quantify a timing effect nor prove every changed instruction has only one cause.

Environment and identity

  • Builder: Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5.
  • Host image pair: original kernel baseline fec1113a259c3cfff7d2dd942409b7f3f9df5e64, candidate c94e9f6f50aa14e34d45bdda651678af22ee0c49; all other original selections match.
  • Compiler: Rust/Cargo 1.93.0, rustc commit 254b59607d4417e9dffbc307138ae5c86280fe4c; x86_64 freestanding objects and existing development image configuration.
  • Both host image pipelines finish and pass signature, extraction, compression and source verification. No guest timing run or self-hosted build is established by them.
  • Last known path-independent direct-builder revision has not been established. The existing shared-object route provides a separately observed canonical-remap implementation.

Evidence and prior checks

The original shared-object compiler adds source and work-directory mappings. The common direct compiler and its kernel/service call sites omit them. Independent retained real-compiler fixtures corroborate the uncontrolled path input. Successful compilation and linking have no warning diagnostics; that does not establish reproducibility. Images, original source identities and failed comparisons remain unchanged for review.

Tracking

Profiler: Integration #3; audit: Integration #11; implementation: WIP PR #12. Share the canonical mapping policy across direct and shared compilation, include the helper in both cache ownership lists, preserve explicit source ownership and existing external-source support, and validate actual object/metadata/ELF and downstream identities. A future image comparison must select the corrected original builder for both sides and reverify all unrelated runtime bytes before timing.

The compiler-coordinate correction is published at Integration 27ca5c035c569b11cf44260ca7c2fb587082e17e in PR 12. Fifty-five focused unit tests, five changed host fixtures and a real original-input replay pass: library object/metadata, binary object and linked ELF bytes match across independent worker locations. Complete image-pair validation and guest timing remain open.

A fresh first-attempt full host image pair built with original tooling 381bccd87c5632e9d1af8aa9d0aca295cbc00e1f now produces identical bytes for all 37 non-kernel ELF executables and all 27 shared objects. The original source/kernel pair, compiler and fixed epoch are retained. Complete comparison still fails on a separate eight-byte EFI PDB identifier difference, tracked in Integration #28. No timing acceptance or self-hosted build is claimed.

## Summary Directly compiled kernel and service artifacts do not apply the canonical source/build path remapping already used for shared objects. Identical service sources built in separate directories can therefore embed different build paths and produce different loaded bytes. This prevents treating the current pair as a controlled comparison of a kernel optimization. ## Reproduction Select Integration `e2b1cf5995bcf6334839cda9a013e90fa97787d5` and identical original runtime sources, compiler, target, features and linker inputs. Compile the same local library and executable through `rustc_pic_object` in two separately located source and scratch directories of different lengths. Retain objects, Rust metadata and the linked ELF; compare their hashes and loaded sections. An independent real-compiler fixture using identical ASCII source/manifest bytes and a generated executable source produces differing library object, metadata, executable object and linked ELF files. The original failure is retained before modifying the builder. ## Expected and actual behavior Equivalent source/configuration inputs should produce the same artifact bytes regardless of their explicitly chosen checkout and scratch locations. Real source or feature changes must remain observable in artifact and cache identities. Instead, all four direct-compiler fixture outputs differ and contain their build directory prefixes. In the original host image pair, all 27 shared objects and five unrelated services are identical, while 32 unrelated services differ in loaded sections. Some file sizes also differ. These observations prevent causal timing admission; they neither quantify a timing effect nor prove every changed instruction has only one cause. ## Environment and identity - Builder: Integration `e2b1cf5995bcf6334839cda9a013e90fa97787d5`. - Host image pair: original kernel baseline `fec1113a259c3cfff7d2dd942409b7f3f9df5e64`, candidate `c94e9f6f50aa14e34d45bdda651678af22ee0c49`; all other original selections match. - Compiler: Rust/Cargo 1.93.0, rustc commit `254b59607d4417e9dffbc307138ae5c86280fe4c`; x86_64 freestanding objects and existing development image configuration. - Both host image pipelines finish and pass signature, extraction, compression and source verification. No guest timing run or self-hosted build is established by them. - Last known path-independent direct-builder revision has not been established. The existing shared-object route provides a separately observed canonical-remap implementation. ## Evidence and prior checks The original shared-object compiler adds source and work-directory mappings. The common direct compiler and its kernel/service call sites omit them. Independent retained real-compiler fixtures corroborate the uncontrolled path input. Successful compilation and linking have no warning diagnostics; that does not establish reproducibility. Images, original source identities and failed comparisons remain unchanged for review. ## Tracking Profiler: [Integration #3](https://git.erikinkinen.fi/erix/integration/issues/3); audit: [Integration #11](https://git.erikinkinen.fi/erix/integration/issues/11); implementation: [WIP PR #12](https://git.erikinkinen.fi/erix/integration/pulls/12). Share the canonical mapping policy across direct and shared compilation, include the helper in both cache ownership lists, preserve explicit source ownership and existing external-source support, and validate actual object/metadata/ELF and downstream identities. A future image comparison must select the corrected original builder for both sides and reverify all unrelated runtime bytes before timing. The compiler-coordinate correction is published at Integration `27ca5c035c569b11cf44260ca7c2fb587082e17e` in [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12). Fifty-five focused unit tests, five changed host fixtures and a real original-input replay pass: library object/metadata, binary object and linked ELF bytes match across independent worker locations. Complete image-pair validation and guest timing remain open. A fresh first-attempt full host image pair built with original tooling `381bccd87c5632e9d1af8aa9d0aca295cbc00e1f` now produces identical bytes for all 37 non-kernel ELF executables and all 27 shared objects. The original source/kernel pair, compiler and fixed epoch are retained. Complete comparison still fails on a separate eight-byte EFI PDB identifier difference, tracked in [Integration #28](https://git.erikinkinen.fi/erix/integration/issues/28). No timing acceptance or self-hosted build is claimed.
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/integration#22
No description provided.