[BUG] Standalone service build can succeed without its declared entry point #2

Open
opened 2026-09-12 12:50:35 +02:00 by erikinkinen · 0 comments
Owner

Summary

The standalone fatd freestanding CI command omits the existing service linker
script. On selected Rust 1.97.1, it returns Cargo success despite a missing-entry
linker warning; the retained ELF has entry address zero and lacks fatd_entry.
This does not satisfy the intended warning-free static link check.

Reproduction

Use fatd commit 6c6f1bdf759feee49eef1919bfebe50c9a88c898 with its unchanged manifest-selected
Git dependency revisions. Prepare original Cargo sources using published
Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5, select Rust 1.97.1,
and run from the repository:

RUSTFLAGS="-D warnings" cargo build --locked --offline \
  --target x86_64-unknown-none --features fatd-runtime --verbose
readelf -hW target/x86_64-unknown-none/debug/fatd
nm --defined-only target/x86_64-unknown-none/debug/fatd

An explicitly selected output directory was used for the retained local run;
adjust inspection paths to the selected output root. This is an original-source
host-side link reproduction, with no guest, image profile or VM execution.

Expected and actual behavior

Expected: the standalone final link selects the repository's existing
linker.ld, which defines ENTRY(fatd_entry) and __fat_state_arena_start.
A linker warning must make the warning-free build fail.

Actual: the existing workflow invokes cargo build without the script. The
linker searches for _start and reports that it cannot set the entry address.
Rust 1.97.1 notes that the linker-message lint ignores -D warnings; Cargo
returns zero. The retained ELF entry is zero and fatd_entry is absent.

The proposed correction uses cargo rustc --bin fatd with the existing script
and --fatal-warnings for the final link. Production Rust, service capabilities,
manifest pins and the runtime feature selection are unchanged. The separately maintained Integration dynamic-service packaging route is outside this standalone command.

Environment and identity

  • Component: 6c6f1bdf759feee49eef1919bfebe50c9a88c898.
  • Source preparation: reviewed Integration
    e2b1cf5995bcf6334839cda9a013e90fa97787d5; all external Cargo package IDs
    retain their original full Git revisions. The selected workflow itself still
    pinned the earlier helper 44f51633e571d6f76cb6df49008880d8a69909ce.
  • Toolchain: rustc 1.97.1, commit
    8bab26f4f68e0e26f0bb7960be334d5b520ea452; Cargo 1.97.1, commit
    c980f4866141969fab6254a680546a277789d6f0.
  • Configuration: debug standalone x86_64-unknown-none, default features plus
    fatd-runtime, offline Cargo, original Git objects and no path patches.
  • Last known working standalone invocation: not established from this local
    reproduction. No historical CI warning or artifact behavior is asserted.

Evidence and prior checks

The first original-source run returned zero with the missing _start warning
and a zero-entry ELF. Both the complete process logs/status and original ELF are
retained. ELF SHA-256:
67165068aa37e402dce18746234afe1d506785b3bfb4981345512fa10c91acb6.
The caller enforced a 600-second hard limit, 120-second output-stall limit and
32 MiB output budget; the run completed in 6.42 seconds.
Every selected component and dependency source file was compared with its
original Git blob before validation of the proposed correction.

The related e2fsd standalone link issue
records the same command omission in that component. Passing a host test or
static link does not establish service startup or explain the quota VM timeout.

Tracking

Owner: fatd standalone CI configuration. Preserve original failing receipts.
Acceptance requires strict formatting, Clippy, unit and rustdoc checks plus
warning-free runtime/smoke/all-feature debug/release links whose ELF entry
equals fatd_entry. Runtime/smoke links must retain __fat_state_arena_start.
The optimized all-feature force-fail probe stops before arena initialization;
its unused conditional symbol may be absent while .fat_state_arena remains.
Deliberately omitting the script with fatal warnings must fail. Static links use placeholder deployment
capacities; packaged dynamic-service and guest runtime acceptance remain
separate. Corrected host default/all-feature tests pass 175 tests per configuration;
strict host/freestanding Clippy and rustdoc pass. All six corrected links have
the expected entry; ordinary runtime/smoke links retain the arena symbol.
The original overbroad all-feature release symbol assertion is retained and
classified separately. Omitting the script with fatal warnings returns 101.

The correction is published at d91d3f64a7bcd343163d0037f34aa5081a1d1b06 in WIP PR #3. Current-revision CI remains a separate gate.

## Summary The standalone fatd freestanding CI command omits the existing service linker script. On selected Rust 1.97.1, it returns Cargo success despite a missing-entry linker warning; the retained ELF has entry address zero and lacks `fatd_entry`. This does not satisfy the intended warning-free static link check. ## Reproduction Use fatd commit `6c6f1bdf759feee49eef1919bfebe50c9a88c898` with its unchanged manifest-selected Git dependency revisions. Prepare original Cargo sources using published Integration `e2b1cf5995bcf6334839cda9a013e90fa97787d5`, select Rust 1.97.1, and run from the repository: ```sh RUSTFLAGS="-D warnings" cargo build --locked --offline \ --target x86_64-unknown-none --features fatd-runtime --verbose readelf -hW target/x86_64-unknown-none/debug/fatd nm --defined-only target/x86_64-unknown-none/debug/fatd ``` An explicitly selected output directory was used for the retained local run; adjust inspection paths to the selected output root. This is an original-source host-side link reproduction, with no guest, image profile or VM execution. ## Expected and actual behavior Expected: the standalone final link selects the repository's existing `linker.ld`, which defines `ENTRY(fatd_entry)` and `__fat_state_arena_start`. A linker warning must make the warning-free build fail. Actual: the existing workflow invokes `cargo build` without the script. The linker searches for `_start` and reports that it cannot set the entry address. Rust 1.97.1 notes that the linker-message lint ignores `-D warnings`; Cargo returns zero. The retained ELF entry is zero and `fatd_entry` is absent. The proposed correction uses `cargo rustc --bin fatd` with the existing script and `--fatal-warnings` for the final link. Production Rust, service capabilities, manifest pins and the runtime feature selection are unchanged. The separately maintained Integration dynamic-service packaging route is outside this standalone command. ## Environment and identity - Component: `6c6f1bdf759feee49eef1919bfebe50c9a88c898`. - Source preparation: reviewed Integration `e2b1cf5995bcf6334839cda9a013e90fa97787d5`; all external Cargo package IDs retain their original full Git revisions. The selected workflow itself still pinned the earlier helper `44f51633e571d6f76cb6df49008880d8a69909ce`. - Toolchain: rustc 1.97.1, commit `8bab26f4f68e0e26f0bb7960be334d5b520ea452`; Cargo 1.97.1, commit `c980f4866141969fab6254a680546a277789d6f0`. - Configuration: debug standalone `x86_64-unknown-none`, default features plus `fatd-runtime`, offline Cargo, original Git objects and no path patches. - Last known working standalone invocation: not established from this local reproduction. No historical CI warning or artifact behavior is asserted. ## Evidence and prior checks The first original-source run returned zero with the missing `_start` warning and a zero-entry ELF. Both the complete process logs/status and original ELF are retained. ELF SHA-256: `67165068aa37e402dce18746234afe1d506785b3bfb4981345512fa10c91acb6`. The caller enforced a 600-second hard limit, 120-second output-stall limit and 32 MiB output budget; the run completed in 6.42 seconds. Every selected component and dependency source file was compared with its original Git blob before validation of the proposed correction. The related [e2fsd standalone link issue](https://git.erikinkinen.fi/erix/e2fsd/issues/2) records the same command omission in that component. Passing a host test or static link does not establish service startup or explain the quota VM timeout. ## Tracking Owner: fatd standalone CI configuration. Preserve original failing receipts. Acceptance requires strict formatting, Clippy, unit and rustdoc checks plus warning-free runtime/smoke/all-feature debug/release links whose ELF entry equals `fatd_entry`. Runtime/smoke links must retain `__fat_state_arena_start`. The optimized all-feature force-fail probe stops before arena initialization; its unused conditional symbol may be absent while `.fat_state_arena` remains. Deliberately omitting the script with fatal warnings must fail. Static links use placeholder deployment capacities; packaged dynamic-service and guest runtime acceptance remain separate. Corrected host default/all-feature tests pass 175 tests per configuration; strict host/freestanding Clippy and rustdoc pass. All six corrected links have the expected entry; ordinary runtime/smoke links retain the arena symbol. The original overbroad all-feature release symbol assertion is retained and classified separately. Omitting the script with fatal warnings returns 101. The correction is published at `d91d3f64a7bcd343163d0037f34aa5081a1d1b06` in [WIP PR #3](https://git.erikinkinen.fi/erix/fatd/pulls/3). Current-revision CI remains a separate gate.
Sign in to join this conversation.
No description provided.