Skip to content

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

Closed

Description

@vpacher

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.py finds 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_signal still 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:

  1. Add exitcode=0 to the TSan options. A real test failure still exits non-zero.
  2. 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.
  3. Add a suppressions file with called_from_lib for 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.

Activity

  1. vpacher commented on Nov 5, 2026

    @vpacher
    MemberAuthor

    Claiming: this issue, as scoped above. One PR, RED tests in ci/test_sanitize_harness.py and ci/test_sanitize_triage.py, then the change. First PR today.

  2. added
    ready
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions