Skip to content

ci(sanitizers): about 150 tests report ThreadSanitizer races and nobody triages them #3369

Open
6 of 6 issues completed

Description

@vpacher

What happens

In the tsan pass of nightly 41203573843, 150 of 630 tests exit 66 (ThreadSanitizer found a race). The job stays green because fail_on_findings is off. Some reports point at test code, for example:

  • test/cmocka/test_view.c:163 in test_set_get_source
  • test/cmocka/test_task.c:63 in test_task_fifo_order

Others are in libobs. No issue tracks them.

What to do

  1. Group the reports by first OBS frame (triage.py already does) and file one issue per distinct race in OBS code.
  2. Fix the races in the tests themselves, or add a suppression with the reason.
  3. Once the list is short, let the tsan job fail on new findings, as 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 does for asan.

Sub-issues

Sub-issues

6 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. added
    infra
    quality
    P3
    size:L
    on Nov 1, 2026
  2. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    /ready

  3. added
    ready
    on Nov 1, 2026
  4. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    Claiming: investigation

    Plan: group the tsan reports of the nightly by first OBS frame, file one sub-issue per distinct race in OBS code, and list the ones in test code. Then post that list here.

    First result: after #3290 merges.

  5. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    Blocked: waiting on #3290

  6. added
    claim-blocked
    on Nov 1, 2026
  7. removed
    claim-blocked
    on Nov 1, 2026
  8. moved this from Blocked to In progress in obs-rust Multiviewon Nov 1, 2026
  9. 14 remaining items

  10. moved this from In progress to Tracker in obs-rust Multiviewon Nov 6, 2026
  11. vpacher commented on Nov 6, 2026

    @vpacher
    MemberAuthor

    Claiming: this issue again, to continue it. The claim lapsed while the work went through #3570 and #3701.

    Since my last progress note, #3640, #3669 and #3698 closed #3570, and #3704 (#3701) makes the TSan pass decide from the reports. Plan:

    1. Read today's nightly, the first with libobs: Lock the transition tick's manual step, make the set size atomic #3698 and ci(sanitizers): Decide TSan results from reports, suppress glib #3704, and post the new counts here.
    2. File one issue per remaining group of counted reports, the same way as before. Known candidates: test_v4l2_busy_signal fails under TSan only, a race in test_inhibit_sleep_dbus.c, stinger_update against the stinger's audio render, the ffmpeg output races and thread leaks, and the 7 lock order reports.
    3. Fix them one PR at a time.

    When the counted reports reach zero, fail_on_findings can go on for TSan. First update after today's nightly.

  12. moved this from Tracker to In progress in obs-rust Multiviewon Nov 6, 2026
  13. vpacher commented on Nov 7, 2026

    @vpacher
    MemberAuthor

    Progress: nightly 42235134335 (2eed59e) is the first CI run with #3698 and #3704. It compares with nightly 42049821983 (11-05), which ran before both merged. This is one run on each side, and races depend on timing, so a small change can be chance.

    42049821983 42235134335
    Clean tests 590/701 673/703
    Counted reports (OBS or test code) 182 in 30 tests 118 in 28 tests
    Of these, thread leaks 10 19
    External reports (not counted) 2679 906
    Tests with a non-zero exit 110 2

    What changed

    The 118 counted reports

    Group Tests Reports Next
    end_data_capture_thread not joined, obs-output.c.h:2433 (thread leak) 1 9 In the test code issue: the test's child process exits without teardown, so the thread is not joined. Not a libobs bug.
    RecordingShutdownWait.hpp:39/62 (frontend) 2 8 New issue.
    Test code (7 tests, 1 or 2 reports each) 7 8 One issue, like #3504.
    Other groups 21 93 I read these first, then file them.

    Two tests fail under TSan:

    Next steps

    1. File the issues of the table and the test_v4l2_busy_signal issue.
    2. Read the other groups and file them.
    3. Fix them one PR at a time. When the counted reports reach zero, fail_on_findings can go on for TSan.

    I keep this claim for these steps.

  14. moved this from In progress to Tracker in obs-rust Multiviewon Nov 8, 2026
  15. vpacher commented on Nov 8, 2026

    @vpacher
    MemberAuthor

    Claiming: #3369 (continued: triage of the TSan nightly reports)

    Progress: I compared the sanitizer nightlies 42377217725 (11-07) and 42486786733 (11-08, 5a8b724) with 42235134335 (11-06). There is one run for each day. Races depend on timing, so a small change can be chance.

    11-06 11-07 11-08
    Clean tests (TSan) 673/703 694/717 746/769
    Counted reports (OBS or test code) 118 in 28 tests 97 in 21 tests 94 in 21 tests
    External reports (not counted) 906 926 972
    Tests with a non-zero exit 2 2 2

    What changed from 11-06 to 11-08 (line numbers ignored)

    The 2 tests with a non-zero exit are the same as on 11-06. Each has an open PR:

    Next

    1. The 2 remaining RecordingShutdownWait reports: extend the suppression of ci(sanitizers): suppress Qt queued wait-functor allocation races (#3809) #3845, or annotate the Rust signal handler for TSan, as ci(sanitizers): ThreadSanitizer cannot see hand-offs through Rust, so the tsan pass reports false races on the hybrid build #3507 did for the task queue.
    2. Continue with the remaining groups.
    3. Next progress comment after the nightly of 11-09.
  16. moved this from Tracker to In progress in obs-rust Multiviewon Nov 8, 2026
  17. moved this from In progress to Tracker in obs-rust Multiviewon Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3infraqualityreadysize:L

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions