Skip to content

ci(bench): build the nightly bench gate without fat LTO - #2276

Merged
bplatz merged 3 commits into
mainfrom
ci/bench-gate-build-profile
Nov 11, 2026
Merged

bplatz merged 3 commits into
mainfrom
ci/bench-gate-build-profile

Conversation

@bplatz

@bplatz bplatz commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

The nightly bench-gate job has failed every night since 2026-09-23; its last green run on ci-cd-large was 09-22. Each run's runner is shut down ("The runner has received a shutdown signal", exit 143) 5–10 minutes into the cold release build of every bench, at a different point each night. The runner has 31 GB and 232 GB free disk. The likely cause is memory under the release profile's fat LTO and single codegen unit. The logs carry no memory figures to confirm it.

The gate checks only that every bench builds and survives one --test iteration; it measures nothing. This PR builds it with CARGO_PROFILE_BENCH_LTO=off and CARGO_PROFILE_BENCH_CODEGEN_UNITS=16. bench-compare, which takes the measurements, keeps the release profile.

A manual run of this branch completed the gate from a cold cache: the build took 13 minutes, and all 39 bench binaries (277 scenarios) passed their smoke run (https://github.com/fluree/db/actions/runs/42413847413).

The gate checks that every bench builds and runs once in --test mode; it
measures nothing. Under the release profile's fat LTO and single codegen
unit, its cold build of every bench got the 8-core runner shut down
partway through, every night since the job moved to ci-cd-large, so the
gate never reported. bench-compare, which measures, keeps the release
profile.

@aaj3f aaj3f left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bplatz yes to this, no pushback. The gate checks that benches compile and run, not how fast, so building it without fat LTO and with 16 codegen units fits what it's for, and bench-compare (unchanged, green every night) still gives us nightly fat-LTO coverage of the engine's dependency tree. Against a gate that hasn't completed since 09-22, that's a clear win. (Small correction to the body, fwiw: it did complete on ci-cd-large on 09-16 through 09-22, in about 28 minutes, so the build outgrew the runner's headroom later rather than never fitting.)

Full review below:


✅ Approve.

Thanks for chasing this: the nightly bench-gate has failed every night since 2026-09-23 (48 runs; the last green one was 09-22), with the runner shut down partway through the cold build in each one Claude opened, so we've had no "every bench still builds and runs" signal for about seven weeks. Building only this job with lto = off and 16 codegen units is the right altitude: the gate's failure modes (a bench stops compiling, a bench panics in --test, a budget entry drifts) don't depend on the link profile, and the env sits at job level, so the smoke step reuses the build instead of rebuilding with fat LTO. On what changes relative to release: the gate measures nothing either way; what it stops doing is fat-LTO-linking the bench binaries, and bench-compare, which keeps the release profile, still builds the four fluree-db-api benches and the engine under fat LTO nightly. One optional wording note on the comment below.

Adherence to repo commitments:

  • Patterns/abstractions: ✔ standard Cargo profile env overrides scoped to one job; no new mechanism.
  • Performance (speed first, memory second): ✔ no product code; measurements (bench-compare, baselines) keep the release profile.
  • Deployment targets: ✔ n/a — CI workflow only.
  • Testing: ✔ manual run of this head completed the gate cold (run 42413847413: 12m 59s build, 39 benches, 277 scenarios Success); workflow-lint green.
  • Conventions: ✔ self-describing ci(bench): title and a commit body that explains the why; ⚠️ the new comment states a likely cause as certain, and two older comments still say "release"/"fat LTO" (optional).

Verified at branch HEAD (853773259): Claude read the 11-09 nightly failure (8 cores, 31 GiB, exit 143 with a runner shutdown signal mid-compile) and the manual run on this SHA (env overrides present, build and smoke green); ci.yml is green on this SHA after a rerun of the rotation-status flake that #2277 fixes.

Approving so you can merge when ready.

# memory as advisory until a ci-* baseline is committed (bench-capture).
# (FLUREE_BENCH_RUNNER_CLASS is still read as the pre-rename spelling.)
FLUREE_BENCH_HOST_CLASS: ci-cd-large-8core
# This gate checks that benches build and run, not how fast they run, so

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional (comment wording). This is so minor, but the comment states the cause as settled ("eight concurrent rustc and LTO-link jobs got the runner shut down"), where the PR body more carefully calls it likely. In the 11-09 nightly log the runner went silent about four minutes after the last "Compiling" line, while big crates were still compiling under one codegen unit, so "memory under the release profile's fat LTO and single codegen unit" fits the evidence better than the LTO links specifically. Two nearby comments also still describe the old profile: the cold cache "must compile … in release" (:51-52) and bare cargo bench --workspace builds "under fat LTO" (:91-93). Maybe something like (for :64-67):

      # This gate checks that benches build and run, not how fast they run, so
      # it skips the release profile's fat LTO and single codegen unit. Under
      # them the runner was shut down partway through every cold build, most
      # likely out of memory (the logs carry no memory figures).

Minor and non-blocking, but if you agree it's more accurate, I'd fold it in now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 5239e7f

@bplatz
bplatz merged commit 9aab5d5 into main Nov 11, 2026
19 checks passed
@bplatz
bplatz deleted the ci/bench-gate-build-profile branch November 11, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants