Repository navigation
ci(sanitizers): the asan job fails on what it finds; tsan in a pool; valgrind runs every test, two at a time (follow-up to #3279) - #3290
Merged
Conversation
vpacher
enabled auto-merge
October 31, 2026 21:56
vpacher
disabled auto-merge
October 31, 2026 22:04
vpacher
marked this pull request as draft
October 31, 2026 22:09
vpacher
force-pushed
the
ci/3238-sanitize-parallel-tests
branch
from
October 31, 2026 22:12
a846614 to
ccd06f3
Compare
This was referenced Nov 1, 2026
Closed
vpacher
force-pushed
the
ci/3238-sanitize-parallel-tests
branch
from
November 1, 2026 06:41
ccd06f3 to
f701c97
Compare
This was referenced Nov 1, 2026
Closed
vpacher
force-pushed
the
ci/3238-sanitize-parallel-tests
branch
2 times, most recently
from
November 1, 2026 09:17
4c167b6 to
1727c20
Compare
This was referenced Nov 1, 2026
…#3238) #3279 (#3251) runs the sanitizer unit tests in a pool of every core, on the one Xvfb display sanitize.py starts, for every tool. The same design, measured before #3279 merged (dispatch 41238464885 against the serial 41237708627, both on a5feec4), changed three exit codes: with tests side by side on one display, test_xshm_monitor_late failed in its setup ("cannot add RandR monitors"), and test_dock_proportions failed 6 checks instead of 1. Tier 2 runs the same tests in parallel without that, because ctest gives each test its own server through xvfb-run. tsan and valgrind were not measured in a pool, and valgrind needs far more memory per test. TestIsolationTest in ci/test_sanitize_harness.py: - with private_displays, run_tests() runs every test, serial ones too, under xvfb-run with its own server number and without the shared DISPLAY (a fake xvfb-run records both); - private_displays(): asan only; unit_test_jobs(): every core for asan, 1 for tsan and valgrind, SANITIZE_JOBS overrides; - run_unit_tests() passes both for its tool. uv run --no-project python -m unittest ci/test_sanitize_harness.py: 2 errors, 1 failure (run_unit_tests gives valgrind every core), 17 pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…al (#3238) run_tests() takes private_displays: each test then runs through the runner with its own Xvfb server number (a per-run counter from 100; the shared display is :90 to :98). run_one_test() runs it under xvfb-run -n with the shared screen size and leaves the shared DISPLAY out of its environment, so the tests registered with xvfb-run-or-display.sh start their own server instead of falling back to it. The serial tests after the pool get one too. run_unit_tests() passes unit_test_jobs(tool) and private_displays(tool): asan runs every core at a time, each test on its own server; tsan and valgrind run one test at a time on the shared display, as before #3279. SANITIZE_JOBS overrides the pool size. run_tests() keeps its defaults for direct callers. The end-to-end harness test gets a pass-through xvfb-run stub, as it has one for Xvfb. uv run --no-project python -m unittest ci/test_sanitize_harness.py: 20 passed; test_cmocka_sanitize, test_sanitize_triage, test_sanitizers_step and test_sanitize_deps pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With an own X server per test (dispatch 41242258179), four tests still changed in the asan pool: test_async_delay_audio (the tone broke up once), test_slideshow_mem_cap (a fade's wall-clock check), test_deinterlace_mode_load (a frame-timing check) and test_dock_proportions (a Qt layout that settles on timers). Their checks depend on timing, and four ASan processes on four cores leave them no slack. TimingLockTest in ci/test_sanitize_harness.py: the three tests.d tests and the test-graph entry of test_deinterlace_mode_load hold the ctest RESOURCE_LOCK "timing", which the pool runs alone after the others; a RESOURCE_LOCK test is serial in ctest_tests(). uv run --no-project python -m unittest ci/test_sanitize_harness.py: 1 failure (test_async_delay_audio holds no lock), 21 pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_async_delay_audio, test_dock_proportions and test_slideshow_mem_cap (tests.d) and test_deinterlace_mode_load (test-graph.json resource_locks) hold the ctest RESOURCE_LOCK "timing". The asan pool runs a RESOURCE_LOCK test alone after the others, so these four keep the quiet machine they had in the serial run. In Tier 2, ctest only keeps the four from overlapping each other; every other test still runs beside them. No change to sanitize.py: a lock already made a test serial. A new timing-sensitive test takes the same lock. uv run --no-project python -m unittest ci/test_sanitize_harness.py: 23 passed; ci/test_test_graph_sorted.py passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…San, slideshow press (#3238) Tests for the sanitizer job failing on what it finds: - triage: exit 77 (ctest's skip) is a skip, not a failure; a KNOWN test's exit and sanitizer reports are listed, not counted; a KNOWN test that ran clean is listed; an unknown failure still counts. - the triage step fails the asan pass on findings without the input; tsan keeps reporting only. - the valgrind configure turns off the cmocka tests' own ASan. - test_slideshow_mem_cap: a press that never lands fails. RED on CT115: folder_keeps_every_picture fails at the first Next ("did not land in 5 s"); each of its 12 presses waited out the 5 s before. Fails: 5 triage/step cases, 1 harness case (no tool_cmake_args), the slideshow folder case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… ASan, slideshow press (#3238) - triage.py: exit 77 is a skip. KNOWN covers a test's exit and its sanitizer reports, with ten asan entries, each naming the issue that tracks it; a KNOWN test that ran clean is listed so its entry can go. - sanitizers_step.py: asan fails the job on findings with or without the fail_on_findings input; tsan and valgrind still report only. - sanitize.py: the valgrind build turns off the cmocka tests' own ASan (-DOBS_TEST_SANITIZE_PER_TARGET=OFF). 101 valgrind tests died at start ("ASan runtime does not come first") and never ran. - test_slideshow_mem_cap: in a folder the index is not the picture, so a folder press lands when another picture is shown. CT115 Tier 2 tree, 3 runs: 41.4-42.8 s, was 100 s (folder case 61 s -> <1 s). Harness tests: 46 OK. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each KNOWN entry gets a kind (bug, flaky or tool) and bug and flaky entries name their issue; a known bug that ran clean is a finding, so the fix that makes it pass must drop its entry; the known list comes first in the summary, above the failures. Fails: 2 triage cases and the KNOWN shape check (entries are plain strings). Co-Authored-By: Claude Opus 5.5 <[email protected]>
KNOWN entries are (kind, why): "bug" (the test is right, OBS or its build is wrong), "flaky" (the test is not solid yet) and "tool" (a valgrind limitation). A known bug that ran clean counts as a finding, so the fix must drop its entry; a flaky one that ran clean is listed. The known list comes first in the summary. Against real runs: #3279's master asan run 41246480225 fails on test_xshm_monitor_hotplug and test_xshm_monitor_late; the serial nightly 41203573843 and this branch's run 41247123560 pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
) In the tsan pool run 41275822723, test_xshm_monitor_move and test_media_cover_art_monitor exited 5: "xvfb-run: error: problem while cleaning up temporary directory". xvfb-run's own exit replaced the test's. The test now expects `-f <build>/xauth/<test>` on every private server. Fails: test_each_test_gets_its_own_x_server (no -f, so the stub's shift runs into the command). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…3238) run_one_test passes `-f <build>/xauth/<test>` to xvfb-run, so its cleanup only removes an empty temporary directory and the test's own exit status reaches the summary. The build tree is not uploaded, so the cookies stay out of the artifact. Harness tests: 49 OK. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on throwaway refs with a pool and private displays for every tool, against the serial nightly 41203573843: - tsan 41275822723: unit tests 20.3 -> 8.2 min; a few more races found (145 tests with reports, was 137), as more interleavings show them. - valgrind 41275824985: unit tests 82 -> 50.5 min, but 9 tests newly fail (4 timing tests exit 1, 4 new valgrind errors, 1 with 18 failed cases), so it stays serial until it is measured with fewer jobs. Fails: test_private_displays_and_pool_size_per_tool (tsan is serial). Co-Authored-By: Claude Opus 5.5 <[email protected]>
POOLED = {"asan", "tsan"}: both run their unit tests on every core, each on
its own X server; valgrind keeps one test at a time on the shared display.
Harness tests: 49 OK.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the 101 tests that died at start now running (the valgrind build has no per-target ASan), the serial valgrind pass no longer fits the job's 150 minutes: run 41281819710 was 143 min in, unit tests at 134 min and two timing tests still to go. Measured on a local build box, the same valgrind build, the same 108-test sample, at the same time, each on its own 4 cores: - 1 job: 1443 s (746 s timing tests alone, 697 s pool part) - 2 jobs: 1136 s (744 s timing tests alone, 392 s pool part), 1.78x on the pool part, with the same results as 1 job except test_source_monitor_only_load, which also fails serially (nightly 41203573843). 4 jobs (41275824985) had broken 9 tests on timing. Fails: test_private_displays_and_pool_size_per_tool and test_run_unit_tests_uses_the_tool_settings (valgrind runs one test at a time on the shared display). Co-Authored-By: Claude Opus 5.5 <[email protected]>
valgrind runs VALGRIND_JOBS = 2 unit tests at once; private_displays() now follows the job count, so every pass that runs tests side by side gives each its own X server, and SANITIZE_JOBS=1 still runs valgrind on the shared display. The timing-locked tests stay alone after the pool. Harness tests: 49 OK. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=59bf78986128b0bf3e88e3b0e1c3faa6700e3c55 secs=254 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a Ci-Attestation: {"at":1793529162,"gate":"rust/all/fmt","host":"linux-x86_64","key":"4e5e3858d8491199c49bb2e8f32403634c6802f54e8060aee6fb528fdb666fec","lane":"lint","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":38,"stamp":"27cd4b8ad907603c69fe3a8d0fe985fd","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"4e5e3858d8491199c49bb2e8f32403634c6802f54e8060aee6fb528fdb666fec","lane":"lint","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":38,"stamp":"d5a93a648d856ea3fe2659f25a8a54d1","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"0d5d8c901437764902057b062a2a2970307cc3ef96866b8f0eb1c3bd40245bce","lane":"rust-test","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":82,"stamp":"1578f2a2f93b9e070ce6255b93ddce86","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"f9b86b3e7b4c56f30c9c84c28b7cc4f0e5c9112c17da38c138e0b09cd930f9e3","lane":"cross","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":39,"stamp":"0ae2c63e36d2c1ad058c2dd863465dee","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"f9b86b3e7b4c56f30c9c84c28b7cc4f0e5c9112c17da38c138e0b09cd930f9e3","lane":"cross","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":39,"stamp":"35bbe7cd711b3a574ef3f63e087fff88","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"f9b86b3e7b4c56f30c9c84c28b7cc4f0e5c9112c17da38c138e0b09cd930f9e3","lane":"cross","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":39,"stamp":"1374fb0edef543694df2502a436e4d46","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"f9b86b3e7b4c56f30c9c84c28b7cc4f0e5c9112c17da38c138e0b09cd930f9e3","lane":"cross","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":39,"stamp":"198864707a8d0b9fc19e977d32913681","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"} Ci-Attestation: {"at":1793529162,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"2759ea0a08270136ee9a68523ff733c6af0ea1afbb4449a3e97c61aa574ed7a1","lane":"tier2-linux","parents":["6f40abc2382eae22194ee07c3b2d481f2d021586"],"secs":253,"stamp":"1ecdab1fd6760422148507c14323e139","tree":"59bf78986128b0bf3e88e3b0e1c3faa6700e3c55","v":1,"via":"run"}
vpacher
force-pushed
the
ci/3238-sanitize-parallel-tests
branch
from
November 1, 2026 10:33
1727c20 to
476b830
Compare
vpacher
marked this pull request as ready for review
November 1, 2026 10:57
5 of 7 tasks
This was referenced Nov 1, 2026
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.
Fixes #3238. Refs #3251, #3307. Follow-up to #3279. Needs #3403 and #3404 (merged).
Why
Since #3279, the sanitizer job runs the unit tests side by side, and three tests that pass one at a time fail on master:
test_xshm_monitor_late,test_xshm_monitor_hotplug(shared X display) andtest_async_delay_audio(timing). The job still concludes "success": a unit-test failure shows only in the summary, becausefail_on_findingsis off. While measuring this, two more silent gaps showed up: 101 valgrind tests never ran at all, and exit 77 (ctest's "skipped") was reported as a failure next to real ones. On #3307, the masked failures and "make the sanitizer job fail on a unit-test failure" were assigned to this PR.What changes
test_xshm_monitor_late: "cannot add RandR monitors"). Each pooled test runs underxvfb-run -n <number> -f <build>/xauth/<test>, without the sharedDISPLAY, as Tier 2 does through ctest. The auth file sits outside xvfb-run's temporary directory: with it inside, xvfb-run's cleanup failed now and then and its exit 5 replaced the test's (tsan pool run 41275822723).test_async_delay_audio,test_slideshow_mem_cap,test_deinterlace_mode_loadandtest_dock_proportionsholdRESOURCE_LOCK timing; the pool runs them one at a time after the others.SANITIZE_JOBSoverrides;SANITIZE_JOBS=1runs on the shared display.obs_test_sanitize()adds per-target ASan unless the build flags already have-fsanitize=. valgrind's have none, so 101 tests (every*_steps/*_rusttest of the test graph and 12 intests.d) were built with ASan and died at start under valgrind ("ASan runtime does not come first"). The valgrind configure now passes-DOBS_TEST_SANITIZE_PER_TARGET=OFF.ci/sanitizers_step.pypasses--fail-on-findingsfor asan with or without the input; tsan and valgrind still only report until their findings are triaged (ci(sanitizers): about 150 tests report ThreadSanitizer races and nobody triages them #3369). Exit 77 is a skip, not a failure.KNOWNinrust/tools/sanitize/triage.py, each with a kind and its issue, and the summary lists them first:bug: the test is right, OBS or its build is wrong. A known bug that runs clean counts as a finding, so the fix must drop its entry.flaky: the test is not solid yet; it may pass meanwhile. ci(sanitizers): remove the "flaky" kind from the known list #3370 removes the kind once test: test_dock_proportions finds the docks equal after a resize in the asan job #3366–test: test_async_delay_audio's tone breaks under load in the asan job #3368, test: test_darken_transparent measures the output before the scene is drawn in the asan job #3389 and test: test_deinterlace_mode_load's Yadif 2x check runs out of time in the asan job #3390 make those tests solid.tool: the two existing valgrind limitations.test_slideshow_mem_cap100 s → 42 s. Infolder_keeps_every_picture, each of 12 presses waited out its 5 s timeout: a folder is read in directory order, so the index is never the picture's number. A press that does not land now fails (RED), and in a folder a press lands when another picture is shown (GREEN). No assertion is removed. This is also the longest test in Tier 2.Known list (asan)
test_transition_render_stepstest_core_setup_rules_steps,test_no_core_getters&obs->audiowith no core)test_shutdown_canvas_weak_ref,test_shutdown_type_lifetimeobs_shutdown)test_media_remux,test_media_alpha_networktest_dock_proportionstest_ws_cpu_usagetest_async_delay_audiotest_darken_transparenttest_deinterlace_mode_loadAll are sub-issues of #3238. Order after this PR: #3363, #3362, #3364, #3365, #3366–#3368, #3389, #3390, then #3370. The tsan backlog is #3369.
Against real runs, the new triage fails #3279's master run 41246480225 on
test_xshm_monitor_lateandtest_xshm_monitor_hotplug, and passes the serial nightly 41203573843 and this branch's asan run.Note: the asan pass that
build-project.yamlruns on a PR that changes a target in the conversion ratchet now fails on new findings too.Commits
Seven RED/GREEN pairs, each RED failing as stated in its message:
Numbers
Unit-test phase and whole job, against the serial runs before #3279:
With every test, serial valgrind ran out of time: run 41281819710 was at 143 min, unit tests at 134 min and not done, against the job's 150. On a local build box, the same valgrind build and the same 108-test sample, each on its own 4 cores: 2 jobs ran the pool part 1.78x faster than 1 job, with the same results. Measurement runs used throwaway branches; they are deleted.
Open for #3369 (valgrind only reports): with 2 jobs
test_group_child_drift(1 case) andtest_transition_recursive_destinationfail, which passed in the serial nightly;test_slideshow_mem_cap,test_output_filename_reserveandtest_audio_clock_drifthit the 600 s limit, as in the serial nightly (30 of the 54 minutes).Tests
ci/test_sanitize_harness.py,ci/test_sanitize_triage.py,ci/test_sanitizers_step.py: 49/49.test_slideshow_mem_capin a Tier 2 tree on a local build box: RED failsfolder_keeps_every_pictureat the first press; GREEN 3/3 passes, 41.4–42.8 s (was 100 s).Checklist
master🤖 Generated with Claude Code