You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: test_audio_clock_drift can report one dropout early in a run #3576
The asan job failed on #3563 (run 41670689565, attempt 2):
slow device: -140 ppm, 7200 s simulated (720000 packets): 1 dropouts (first at 0.1 s), 0 clicks (max d2 0.00942), 0 altered samples
slow device: audio from a -140 ppm device dropped out
[ FAILED ] slow_device_clock_has_no_dropouts
The same test passed in attempt 1 and attempt 5 on the same commit. I saw it once, in 13 asan jobs.
Why this is not only a slow runner
The test uses a virtual clock, and its comment says the audio thread never consumes or resets the buffer. So a slow runner should not change the result. One packet at 0.1 s simulated time did not continue the buffer, which means something changed the buffer or the placement.
Two causes to check. I confirmed neither:
source_output_audio_data() still reads the real clock (os_time). A long stall can change the result of a timing step.
The audio thread walks first_audio_source (libobs/obs-audio.c.h). The test removes its source from the mix, but the source stays on that list.
What to do
Run the test in a loop under CPU load, with and without ASan, to get a failure rate.
Log which placement path the failing packet took (source_output_audio_place() against source_output_audio_push_back()).
Fix the test if the cause is test-only. If the audio path can really lose a packet, this is a bug in libobs, and the fix goes there.
The cause is in the test, not in libobs. The first stamp maps to the real clock, so a stall of 60 ms or more in the first packets leaves the buffer behind that clock, and the audio thread's discard_audio() consumes from it. I was wrong in this issue to say that a slow runner should not change the result.
PR: park the audio thread in a task while the test owns the buffer, and drop the known-list entry.
Activity
vpacher commentedon Nov 3, 2026
Claiming: #3576
The cause is in the test, not in libobs. The first stamp maps to the real clock, so a stall of 60 ms or more in the first packets leaves the buffer behind that clock, and the audio thread's
discard_audio()consumes from it. I was wrong in this issue to say that a slow runner should not change the result.test: Stop three unrelated failures from failing the asan job (obs-ru…
docs: Say what to do when asan fails a PR, and count the known list (o…
test: Keep the audio thread out of test_audio_clock_drift (obs-rust#3587