Repository navigation
Description
Refs #3369
What
The nightly ThreadSanitizer pass cannot fail the job yet. Most of what makes a test not clean is reports in libraries that TSan cannot see into.
Nightly 42049821983, 701 tests that ran:
- 110 tests exit non-zero: 99 with TSan's exit code 66, 11 with a cmocka failure count.
- 111 tests have reports. For 81 of them, every report is external (
triage.pyfinds no OBS frame), and triage does not count them. The exit code still marks the test as not clean. - 2679 external reports, 182 counted.
| Library | External reports | Tests with only external reports |
|---|---|---|
| glib, gio, gobject | about 1850 | 3 |
| Mesa, Qt, FFmpeg, other | about 830 | 78 (70 Mesa only) |
test_portal_shortcuts has 1616 of them.
External reports can also fail a test. A test that forks a child gets exit code 66 from the child and asserts on it. The logs of 6 of the 11 tests show 66 != 0 or got 66.
Measurement
Local, sanitizer build on master, TSAN_OPTIONS with exitcode=0:
- The 11 tests, 2 runs: 10 pass.
test_v4l2_busy_signalstill fails. It also fails on the last 2 nightlies, and passes under ASan and valgrind.
11 tests with many reports, 2 runs each:
| Suppression | External reports | Counted reports |
|---|---|---|
| None | 2121, 2138 | 137, 133 |
called_from_lib for glib, gio, gobject |
200, 200 | 59, 40 |
called_from_lib also for Mesa, Qt, FFmpeg, PulseAudio |
499, 497 | not compared |
The glib suppression leaves the Mesa tests as they were. It removes 78 counted reports in test_portal_shortcuts. The one I read is test code reading a string that glib allocated, with the handover inside glib, so I treat the group as false positives. It shows one race under the noise, at test_inhibit_sleep_dbus.c:266. The other changes are single reports that come and go, and test_stinger_media_duration varies between runs.
Do not suppress Mesa this way. TSan then does not see Mesa's mutexes, and its tests report more: 35 to 103, 47 to 137, 27 to 97.
Proposed change
One PR, in rust/tools/sanitize/, covered by ci/test_sanitize_harness.py and ci/test_sanitize_triage.py:
- Add
exitcode=0to the TSan options. A real test failure still exits non-zero. - In
triage.py, a TSan test is clean only with exit 0 and no counted report. Without this, the headline reads clean for a test with counted reports. - Add a suppressions file with
called_from_libfor glib, gio and gobject.
Mesa stays listed as external and not counted. Qt and FFmpeg stay as they are, because I did not measure them alone.
The job stays green. No CI cost change is expected, and I did not measure run time. The next nightly gives the new headline.
Not in this issue
Turning on fail_on_findings for TSan comes after the counted reports reach zero. The test_v4l2_busy_signal failure, the test_inhibit_sleep_dbus.c:266 race and the other counted reports go through #3369.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
vpacher commentedon Nov 5, 2026
Claiming: this issue, as scoped above. One PR, RED tests in
ci/test_sanitize_harness.pyandci/test_sanitize_triage.py, then the change. First PR today.ci(sanitizers): Decide TSan results from reports, suppress glib (obs-…