Repository navigation
Description
What
Since #3129 the PR asan job restores its compiler cache, and the build is no longer the slow part. A warm run (job 124607914449, 2026-10-31):
| Phase | Minutes |
|---|---|
| Install dependencies | 0.7 |
| Configure + build (HYBRID libobs) | 4.1 |
| Unit tests | 19.8 |
| App launch (45 s window) | 0.9 |
| Clang conversion replay | 0.3 |
All finished PR asan jobs with a cache hit on 2026-10-31 took 26–29 minutes; cold ones took 46–56.
run_unit_tests() in rust/tools/sanitize/sanitize.py runs the 633 registered tests one after another (for test in tests: run_one_test(...), each a subprocess.run with a 600 s timeout) on a 4-core ubuntu-26.04 runner. It prints the test names only after the last test, without times, so the log cannot show which tests are slow.
Proposed
- Run the tests in a pool of workers (the runner's CPU count). Keep the tests that must not share the machine alone:
ctest --show-only=json-v1, whichsanitize.pyalready reads, gives each test's properties. Tests withRUN_SERIAL(todaytest_deinterlace_2x_field_order_*and the fourtest_xshm_*tests) run after the pool, one at a time, as ctest does. Each test keeps its own log file and sanitizer options, as now. - Record each test's seconds in
summary.txtand print the slowest ones, so a slow test shows in the log.
Estimate, not measured: with 4 workers the unit-test phase could drop from about 20 to about 6–8 minutes, depending on how much time the serial tests take and on the memory headroom. ASan roughly doubles memory use; the runner has 16 GB.
Acceptance:
- Before and after times of the
asanjob and of the unit-test phase on the same commit, in the PR. - The same tests run, with the same exit codes and the same sanitizer reports as a serial run of that commit.
- No new flaky test over a few reruns; a test that turns out to need the machine alone gets
RUN_SERIALin itstests.dfile rather than a special case insanitize.py.
Notes
valgrindandtsanuse the same function; this issue is aboutasan, the one that runs on PRs. The same pool could serve the other tools later.- Not part of this issue: 21 tests exit non-zero in the
asanrun and the job still passes (PipeWire, Pulse and v4l2 device tests,test_dock_proportions,test_transition_render_steps,test_ws_cpu_usage). Whether each is an expected skip or a hidden failure is worth its own look.
Activity
zackees commentedon Oct 31, 2026
/ready
vpacher commentedon Oct 31, 2026
Claiming: #3238
Plan (one PR):
sanitize.py(offline, fake tests): the runner reads each test'sRUN_SERIALfromctest --show-only=json-v1, runs the others in a pool of the runner's CPU count, runs the serial ones alone after the pool, keeps one log file and the sanitizer options per test, keeps the summary in ctest order with the exit codes, and records the seconds per test.run_unit_tests(), plus the slowest tests printed after the summary.asanjob and its unit-test phase on the same commit, in the PR (a dispatch ofsanitizers.yamlon the branch), with the summary compared to a serial run.First PR within a day.
ci(sanitizers): RED: give each pooled test its own X server (#3238)
ci(sanitizers): GREEN: give each pooled test its own X server (#3238)
ci(sanitizers): RED: run the timing-sensitive tests alone (#3238)
ci(sanitizers): GREEN: run the timing-sensitive tests alone (#3238)
ci(sanitizers): RED: own X server per asan test, tsan/valgrind serial (…
ci(sanitizers): GREEN: own X server per asan test, tsan/valgrind seri…
58 remaining items
ci(sanitizers): RED: skip exit, known findings, asan gate, valgrind A…
ci(sanitizers): GREEN: skip exit, known findings, asan gate, valgrind…
ci(sanitizers): RED: the known list keeps itself honest (#3238)
ci(sanitizers): GREEN: the known list keeps itself honest (#3238)
ci(sanitizers): RED: each private X server gets its own auth file (#3238
ci(sanitizers): GREEN: each private X server gets its own auth file (#…
ci(sanitizers): RED: tsan in the pool, valgrind one at a time (#3238)
ci(sanitizers): GREEN: tsan in the pool, valgrind one at a time (#3238)
ci(sanitizers): RED: valgrind two at a time (#3238)
ci(sanitizers): GREEN: valgrind two at a time (#3238)
vpacher commentedon Nov 1, 2026
Fixed by #3290 (93070d8), with #3403 and #3404 first.
rust/tools/sanitize/triage.py), each with its issue.What is left, all sub-issues of this issue:
flakykindci(sanitizers): the asan job fails on what it finds; tsan in a pool; …