Skip to content

CI: run the unit tests under valgrind memcheck on weekdays - #1462

Merged
rjb32 merged 2 commits into
remyboutonnet/memcheck-fixesfrom
remyboutonnet/ci-valgrind
Nov 11, 2026
Merged

rjb32 merged 2 commits into
remyboutonnet/memcheck-fixesfrom
remyboutonnet/ci-valgrind

Conversation

@rjb32

@rjb32 rjb32 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Run the unit tests under valgrind memcheck on weekdays at 9:00, 12:00 and 17:00 Paris time.

@rjb32

rjb32 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

AI-generated summary.

Summary

Goal. Run every unit test under valgrind memcheck on weekdays at 9:00, 12:00 and 17:00 Paris time, so uninitialised reads and reads of freed memory surface within hours. The ASan and UBSan nightly does not report an uninitialised read: #1461 fixed 3 that only memcheck found.

Approach. One new workflow, ci_valgrind.yml, shaped like ci_sanitizers.yml: the same runner label, dependency cache and cleanup. It builds with RELDEBUG=1, so the test binaries keep their symbols, then runs ctest -T memcheck. A test fails on any memcheck error not covered by test/valgrind_suppressions.supp.

Where to look.

  • .github/workflows/ci_valgrind.yml:5 — the schedule, with the timezone key GitHub added in March 2026
  • .github/workflows/ci_valgrind.yml:34 RELDEBUG — set for the whole job, because cmake reads it from the environment
  • .github/workflows/ci_valgrind.yml:72 — the ctest call: the 2 excluded tests and the valgrind options
on weekdays 9:00, 12:00, 17:00 Europe/Paris
  install valgrind if the runner image lacks it
  build dependencies (cached), configure with RELDEBUG=1, ninja
  ctest -T memcheck
    -E test_query_parser_mutant      1267 s under memcheck
    -E test_query_ir_fuzz_hang       its own 120 s timeout stops it
    --error-exitcode=99              a memcheck error fails the test
    --max-threads=2048               JobSystemTest starts 1024 workers
  on failure: print each MemoryChecker log that has errors, upload all of them

Evidence

Merge Danger

Door: two-way

Blast Radius: runners

Each run holds one ubuntu-24.04-turing runner for about an hour at -j8: the same tests took 32 min at -j8 on a dev machine, and a RELDEBUG rebuild took 21 min there. The job sets -j8 itself and ignores HOST_BUILD_JOBS, so ubuntu-runner-aws1 runs it at 8 too, not 16. That happens three times on each weekday, during working hours, so PR jobs on that label have one runner fewer while it runs. The RELDEBUG tree takes 49 GB of disk, against 3.4 GB for a release tree, and the cleanup step deletes it after the job. With 8 tests at once, memory is the limit to watch: one test alone reached 12.9 GB under memcheck, and the dev-machine run stayed inside a 32 GB cap. A dependency cache miss also builds LLVM at -j8.

@rjb32
rjb32 merged commit 1c1ba09 into remyboutonnet/memcheck-fixes Nov 11, 2026
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.

1 participant