Repository navigation
fix(obs): stop-drain test fits the drain deadline; TSan suite runs again - #6277
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
just obs test failed on its first relay: a tokio task-cell handoff reported with only debug-info frames, which are demangled, so race:^_R missed it. Match frames by their .rs source file as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reader that saw IsLiveSession() could still read connect_time_ms as 0, OBS's never-connected sentinel. Seen as a loaded TSan failure of the real-session publish test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 16 MiB frame took 750-800 ms of moq-net's one-second drain deadline under TSan and overran it on a loaded host, so the deadline cut the track off by design. 2 MiB still catches a Stop() that cancels instead of draining, and drains in under 300 ms under the same load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome: quest complete, opened as a draft only so the maintainer can settle the three choices under Decisions (scope of the two ride-along fixes, 2 MiB frame, (Written by Claude Opus 5.5) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged (Written by Claude Opus 5.5) |
Nothing ran `just obs test`, so it failed on main unnoticed until #6277. A Nightly lane now runs it in the plain dev shell: the tests stub libobs, so the `.#obs` shell's obs-studio is not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finishes quest/m1/test-flakes-2/three-flakes.md.
Problem
Reproduction
just obs testonmainfailed deterministically before reaching any assertion: a tokio task-cell handoff reported as a race with only demangled Rust frames (from inlined debug info), whichrace:^_Rmisses.CHECK(ended). Timing Stop() plus the destructor showed the 16 MiB frame took 740-810 ms of moq-net's one-second drain deadline on a single run and 930-1220 ms with 4 in parallel; every run over about 1050 ms failed. The deadline cutting the track off is intended, so the frame size, not the drain, was wrong.o.GetConnectTime() > 0right afterIsLiveSession():OnConnectpublishedlivebefore storingconnect_time_ms.Changes
cpp/obs/test/tsan.supp: also match Rust frames by their.rssource file, since a frame symbolized from inlined debug info is demangled and has no_Rprefix.cpp/obs/src/moq-output.cpp: store the connect time before the session reads as live, so OBS never sees a live session with the "never connected" sentinel.cpp/obs/test/moq-output-test.cpp: the stop-drain frame is 2 MiB instead of 16 MiB. All lifecycle assertions are unchanged.just check --allruns, now sized[S], and its 2026-10-21 note names the two flakes.Choosing the size
Mutation-checked under TSan with
Stop()callingcancel()instead ofshutdown():2 MiB sits 8x above the size where detection gets unreliable and drains in about a quarter of the deadline under 8 parallel TSan runs.
Verification
moq-output-test, 8 in parallel, on a host already at load 20-35: 24/24 pass (the unchanged suite failed 4 of 8 at 4 parallel).src/path.test.ts30/30, whole@moq/netsuite 3/3 (2494 pass each). No RSS-based test remains injs/.just check: pass (obs compile and lint, quest, shell, markdown, gh).just obs test(every TSan binary): pass; onmainit fails at the first relay.just obs ci(the plain build CI runs, which needs the.#obsshell); the same assertions passed under TSan.quest check: ok.Not covered
Decisions
Settled by the maintainer's go-ahead on the recommended course:
just obs testof this file (the first deterministically), so splitting them would leave this PR unverifiable.[S]for its remaining loadedjust check --allruns.Impact
Public API: none. Wire: none. The connect-time fix changes only the order OBS observes two values.
Follow-ups
Session::shutdowndrain request: it spawns the close detached with abort-on-drop, so a future dropped before its first poll never requests the drain and the session falls back to the implicit cancel. Requesting the drain synchronously would make "keep the future or the drain aborts" (theMoQOutput::Stopcomment) unnecessary, and make a destructor that drops the drain reliably detectable.just obs testnightly coverage: the TSan suite is manual, which is how it stayed broken onmainunnoticed. Run it in a nightly.moq-output-testtake 60-90 s instead of about 8 s, CPU-bound on one thread; not investigated.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code