Skip to content

ci(sanitizers): Decide TSan results from reports, suppress glib - #3704

Merged
vpacher merged 2 commits into
masterfrom
ci/3701-tsan-external
Nov 5, 2026
Merged

vpacher merged 2 commits into
masterfrom
ci/3701-tsan-external

Conversation

@vpacher

@vpacher vpacher commented Nov 5, 2026

Copy link
Copy Markdown
Member

Fixes #3701

What and why

The TSan pass now decides from the reports, not from TSan's exit code. A report with no OBS frame no longer makes a test not clean, and no longer fails a test that asserts on a forked child's exit code.

  • sanitize.py: the TSan options add exitcode=0 and suppressions=rust/tools/sanitize/tsan.supp.
  • tsan.supp: called_from_lib for glib, gio and gobject only. Mesa stays out (see ci(sanitizers): external reports keep ThreadSanitizer tests from counting as clean #3701).
  • triage.py: a test is clean only with exit 0 and no counted report. ASan and valgrind exit non-zero on a report, so for them this changes nothing.
  • docs/knowledge/local-sanitizers.md: one paragraph on the above.

The job stays green, as before. CI only, no user-visible change, so there is no features ledger line.

RED → GREEN

  • RED, the first commit: 3 new tests fail (test_tsan_exit_code_does_not_depend_on_reports, test_tsan_suppressions_are_the_glib_family_only, test_counted_report_with_exit_zero_is_not_clean). The fourth, test_external_report_with_exit_zero_is_clean, passes on both commits.
  • GREEN, the second commit: ci.test_sanitize_harness and ci.test_sanitize_triage, 58 tests, pass.

Full local run of sanitize.py tsan with this branch (sanitizer build in a container, 24 cores): 684 tests ran, 681 exit 0, app launch exit 0. The 3 that fail also fail on master with exitcode=0 and no suppressions, in 3 runs of each alone:

Test With the glib suppression Without
test_v4l2_busy_signal fails 3 of 3 fails 3 of 3
test_slideshow_mem_cap fails 2 of 3 fails 3 of 3
test_source_audio_output fails 1 of 3 fails 1 of 3

They go through #3369. The measurements of the suppression itself are in #3701.

In the container the checkout is at /w/src, and triage.py finds no OBS frame in that path form, so its local headline is not the CI one. I counted that run with the paths rewritten: 186 counted reports in 44 tests (the last nightly: 182 in 30 tests, 4 cores). The next nightly gives the CI headline.

  • Local gate: all Linux lanes passed.
  • Real app: not applicable.
  • Test cost: 4 new Python tests in existing files, under 1 s together.

Checklist

  • Base is master (or the description starts with a Stacked: note)
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits
  • User-visible change: its line in docs/features.md is added or updated (not applicable: CI only)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): built with scripting ON (PR CI builds no OBS app: run gh workflow run ci.yml --ref <branch> for the full builds) and cross-checked with clang and MSVC (not applicable: no warning or flag changes)
  • Intentional differences from C listed in the parity test header and rust/README.md (ports) (not applicable: not a port)

🤖 Generated with Claude Code

vpacher and others added 2 commits November 5, 2026 19:22
RED: TSan has no exitcode=0 and no suppressions, and the triage headline
counts a test with a counted report and exit 0 as clean.

Refs #3701.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TSan's exit code 66 also came from reports with no OBS frame, in 81 tests
of the last nightly, and it failed tests that assert on a forked child's
exit code. TSan now runs with exitcode=0, and triage.py calls a test clean
only with exit 0 and no counted report.

called_from_lib for glib, gio and gobject removes about 1900 false reports.
Mesa stays out: that makes its tests report about 3 times more.

Refs #3701.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=443358b10bb094b8e28007d86e744c94b1702795 secs=313 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a
Ci-Attestation: {"at":1793903310,"gate":"rust/all/fmt","host":"linux-x86_64","key":"5289f98c867fa0b66099df24077f8063384a50574453ebca075e5355cd3f0ad7","lane":"lint","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":81,"stamp":"7e830d38565f3ee76ae4753d354e1730","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"5289f98c867fa0b66099df24077f8063384a50574453ebca075e5355cd3f0ad7","lane":"lint","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":81,"stamp":"55e8103747f3f4b726e422014bc452e3","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"64c7e7c0695a13b6bd5fe96dbd08ca7b8bee2047531efbb38dbbaa81fadfcbb1","lane":"rust-test","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":88,"stamp":"865efed96b3d67b9df00a468257044f6","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"df662d3b72e0dcd3c7f7c4eeebd9f274a844fcdeba7ff5b5876f243dabbbd59c","lane":"cross","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":46,"stamp":"1ef43edfab1e74c921b67875d0e5820a","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"df662d3b72e0dcd3c7f7c4eeebd9f274a844fcdeba7ff5b5876f243dabbbd59c","lane":"cross","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":46,"stamp":"084ba1fd793b3f04b37b594c0a9d6859","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"df662d3b72e0dcd3c7f7c4eeebd9f274a844fcdeba7ff5b5876f243dabbbd59c","lane":"cross","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":46,"stamp":"50b1f3cf4a0278b21e0c5aa5dd2ed724","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"df662d3b72e0dcd3c7f7c4eeebd9f274a844fcdeba7ff5b5876f243dabbbd59c","lane":"cross","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":46,"stamp":"3673f7dd946ddf8137c2bd6288fbd49c","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
Ci-Attestation: {"at":1793903310,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"31bd9d20347e3a54bc226a354394c29f3e4e444b06b47fb0605120da4898a130","lane":"tier2-linux","parents":["fc7c4aa6109862c5480ec38bf894b372dbe1b657"],"secs":313,"stamp":"123c9ab2fdc1520bd9bdf1bb8e42457d","tree":"443358b10bb094b8e28007d86e744c94b1702795","v":1,"via":"run"}
@vpacher
vpacher requested a review from zackees as a code owner November 5, 2026 18:52
@vpacher
vpacher enabled auto-merge November 5, 2026 18:52
@vpacher
vpacher added this pull request to the merge queue Nov 5, 2026
Merged via the queue into master with commit 2235045 Nov 5, 2026
38 checks passed
@vpacher
vpacher deleted the ci/3701-tsan-external branch November 5, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci(sanitizers): external reports keep ThreadSanitizer tests from counting as clean

1 participant