Skip to content

DO NOT MERGE: non-vacuity check for #4049 - #4050

Closed
zackees wants to merge 2 commits into
masterfrom
ci/flaky-audio-own-clock-red
Closed

zackees wants to merge 2 commits into
masterfrom
ci/flaky-audio-own-clock-red

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

Throwaway. It is #4049 plus one commit that restores the old own-clock wiring (on_video_clock forced true in C and Rust) and keeps every new test, to show the tests fail without the fix. It will be closed, and its branch deleted, once the red run is recorded on #4049.

🤖 Generated with Claude Code

zackees and others added 2 commits November 8, 2026 08:13
test_async_audio_own_clock ejected the merge queue twice
(merge_group runs 42488016838 and 42489291203, "tests OFF" job):
small_packets_audio_ahead_of_video_is_heard heard the tone in 84 % and
87 % of the program, under its 90 % bar. Both runs completed in their
normal 30.3 s, so it was not a hang.

The cause is in libobs, not the test. Since #3752 a continuous packet
on a clock of its own (hours from last_output_frame_ts) does not follow
the video's timing. But it still read source->timing_adjust, which
obs_source_update_async_video() sets to the video's timing on every
shown frame. So nearly every packet hit under_lock's MAX_TS_VAR
reset and was placed at os_gettime_ns(), when it arrived, instead of
by its timestamp. On a busy machine the arrival jitter turns into gaps
and overlaps in the mix, more so with 21 ms packets than with 100 ms
ones.

Audio on a clock of its own now has own_clock_timing_adjust and
own_clock_timing_set, under audio_buf_mutex. The first such packet
seeds them from the system clock, as reset_audio_timing() does. Later
packets are appended where their own timing puts them, and video
frames do not move it. Audio on the video's clock (or with no frame
yet) is unchanged. C in obs-source-audio-output.c.h, Rust in
obs_source::audio_output through two new seam getter/setter pairs.

RED (local, Tier 2 harness tree, 16 busy loops on 16 CPUs, master
2d6ae72): 6 of 6 runs of the C reference fail an own-clock case
(1024-frame 73-89 %, 4800-frame down to 71 %). The same-clock guard
stays at 93 % in all 6, so the load starves only the own-clock path.
GREEN: 5 of 5 runs each of the C reference and hybrid libobs at the
same load, every case 92-93 %. Rust: Tier 1 covers the seed and a late
continuous packet (both fail with the old wiring). Tier 3 parity
against the C oracle now generates last_output_frame_ts and the own
timing, and fails against the old Rust.

Refs #3747.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Throwaway for #4049's non-vacuity proof.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees

zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Red run 42502653222 recorded on #4049; closing the throwaway.

@zackees zackees closed this Nov 8, 2026
@zackees
zackees deleted the ci/flaky-audio-own-clock-red branch November 8, 2026 17:37
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.

1 participant