Repository navigation
Gate perf-callgrind on usable valgrind (verify, repair, fail loud) - #48
Merged
Merged
Conversation
The apt cache key embeds apt-resolved versions, which vary by runner image build; the linux-tools-38.38 entry is degenerate (0 packages), so affected legs installed green with NO valgrind and snip silently recorded callgrind_repeat 0 (run 41713792243: 9/16 shards vacuous). Probe exactly what snip probes; reinstall once from apt on failure; fail the job loudly if valgrind is still unusable. Session: gentle-menkar
|
| Project | clojure-code-snippet |
| Branch | fix/valgrind-verify-gate |
| Commit | 6ddda24 |
| Report | Testbed | Adapter | Status |
|---|---|---|---|
| 1 | ubuntu-latest-clojure-rs | JSON | ✅ No Alerts |
| 2 | ubuntu-latest-jvm | JSON | ✅ No Alerts |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
michael-h-hu
approved these changes
Nov 4, 2026
michael-h-hu
left a comment
Collaborator
There was a problem hiding this comment.
Review: Gate perf-callgrind on usable valgrind (PR #48)
No findings. Approve.
What was inspected
- Diff (
gh pr diff 48): +25/-0 in.github/workflows/test.ymlonly, one newVerify valgrind usablestep. Merge-base11de561→ head6ddda24touches nothing else;docs/untouched, pilot job byte-identical to base. - Probe equivalence: gate
usable() { command -v valgrind >/dev/null && timeout 30 valgrind --version >/dev/null 2>&1; }matchesCallgrindUsable()inscripts/ci/go/internal/measure/exec.go:136-143exactly (exec.LookPath("valgrind")+Run([path, "--version"], nil, 30), err==nil).measure.go:150-152confirms this is the warn-and-continue-at-repeat-0 path being gated. - Repair branch: single
apt-get update, then oneinstall -y --reinstallof the exact perf-callgrind package list (time linux-tools-common linux-tools-generic valgrind gcc, 5 packages — same list and order as theInstall measurement toolsstep, version 1.2). Re-probe after repair via barecommand -v valgrind+ver=$(timeout 30 valgrind --version); under the runner's defaultbash -e -o pipefaileither failing aborts the step loudly.valgrind: <version>recorded to$GITHUB_STEP_SUMMARY. - Shell strictness: gate script passes
bash -n; contains no pipes and notee(the pre-push pipefail-masking pattern is gone — re-verified).usable()is only invoked underif !, so-ecannot misfire on the probe; fail-loud lines are unconditional. - Ordering:
Install measurement tools(line 224) →Verify valgrind usable(245) →Measure callgrind sweep(258). Gate runs before any measurement on every perf-callgrind leg. - Scope: pilot untouched — its
Measure AOT pilotstep passes--repeat/--alloc-repeatbut never--callgrind, and has its own 4-package install list (nogcc, version 1.1), correctly not mirrored by the gate. - Hygiene: title clean (no session id); body ends
Session: gentle-menkar; commit message signed;session:gentle-menkarlabel present; YAML parses (yaml.safe_loadOK). - Mergeability:
mergeable: MERGEABLE,mergeStateStatus: CLEAN; local trial merge ofmaster(post-#45) into the branch auto-merges cleanly — the missing concurrency/cljrs-cache hunks are non-overlapping as the PR body claims, so rebase-at-land is trivial.
Live proof (production run 41737221419, this PR's own CI)
- All 26 checks green, incl. all 16
perf-callgrindlegs,perf-pilot, bothreport-callgrind, andBencher Report. - Both gate paths exercised live: 13/16 legs restored the degenerate
0 packagescache and printedcached valgrind unusable; reinstalling from apt(repaired); 3/16 restored9 packagesand passed through ((0,jvm),(4,jvm),(5,clojure-rs)— exactly the non-repair set). - All 16 legs emitted a
valgrind-X.Y.Zversion line post-gate; zerovalgrind unavailablewarnings and zerono callgrind data; skipping Bencher reportpaths (vs 9/16 vacuous in run 41713792243). Leg durations 7m–2h32m confirm real callgrind, not 1–5 min vacuous shards. Bencher reports created successfully.
Residual risks / gaps
- The degenerate
79ad…cache entry is deliberately left in place (self-heals per-leg via the repair branch). Optional maintainer follow-up to evict it; not a blocker. - Branch is one commit behind
master(#45); merge is clean so no rebase needed for approval, but land should rebase or merge-queue to re-run CI on the combined tree.
Round 1 — no changes requested.
Session: gentle-menkar
AI-Tool: Muse Code (Meta Muse Spark)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Run 41713792243 (PR #45): 9 of 16 perf-callgrind shards finished green in 1-5 min having measured NOTHING —
callgrind_repeat: 0, walltime-only entries, 0 benchmarks in sweep-bench.json — via the "no callgrind data; skipping Bencher report" path. The other 7 shards did real callgrind (26-91 min). Per-runner luck, not runtime-specific.Evidence (all 16/16 shards, run 41713792243)
The workflow's apt step (
awalsh128/cache-apt-pkgs-action, same packages +version: 1.2on every leg) succeeded green in 1-13s on ALL shards — but restored different caches, because the action normalizes the package list WITH apt-resolved versions, and the fleet is mid-rollout across image builds:79ad5552…(1341 B)085cee66…(45 MB)Skip shards: rs 0,1,2,7 + jvm 0,1,3,4,7. Real shards: rs 3,4,5,6 + jvm 2,5,6.
Decisive log lines (skipper job 126197885347, shard 4/jvm):
Value hashed as '79ad5552f5c1bc04dd11fc2a2cdd7690'→Cache hit,Cache Size: ~0 MB (1341 B)Found 3 files in the cache.(cache_key.md5, install.log, manifest_main.log — zero.tar, no manifest_all.log)Restoring 0 packages from cache...→ step still greenwarning: valgrind unavailable; callgrind_instructions will be null→callgrind_repeat: 0in sweep-results.jsonThe
79ad…entry is degenerate: it was saved by a job on which apt unpacked nothing (zero^Unpackinglines → zero tars, not even a manifest_all.log — seeget_installed_packagesin the action's lib.sh), so every restore of it provides nothing while reporting success.snip measure(cmd/snip/measure.go:150-152+internal/measure/exec.go:136-143) only warns on unusable valgrind and continues at repeat 0 — hence green vacuous shards.Fix
One purely additive step (
+25/-0) in the perf-callgrind job, right after "Install measurement tools" — no overlap with PR #45's hunks (concurrency block + clojure-rs caching), so rebase-friendly:timeout 30 valgrind --versionexit 0.update+install -y --reinstallof the same six packages), then re-probe.valgrind: <version>in the step summary for future diagnosis.The pilot job is untouched (it never passes
--callgrind). The degenerate cache entry is deliberately left in place: with this gate it self-heals per-leg via the apt reinstall, and deleting shared cache state is left to maintainers as an optional follow-up.Verification
bash -n.bash -e: (A) usable → exit 0, no apt call, version in summary; (B) broken + apt repair works → apt update+reinstall called, exit 0; (C) broken + repair fails → exit 1 with valgrind's stderr.Session: gentle-menkar