Repository navigation
test: excuse deinterlace skips by the ticks libobs did not render (Fixes #5374) - #5425
Merged
Merged
Conversation
…ED, Refs #5374) Record, for every output frame of test_deinterlace_2x_field_order, whether video-io repeated the frame before it (the same cache entry: a tick the graphics thread missed), and print the repeated, lagged and video-io dropped counts in each case's summary. The field accounting moves into count_fields(), a pure function, with fixed-sequence cases. RED: a 3-tick stall (the failing run of #5374) and stall repeats are still counted as a skip and a hold. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#5374) When the graphics thread misses N ticks, video-io repeats the last rendered frame for them and the next render shows the field that is due by then: up to N fields were never due at a rendered tick. The field accounting no longer counts those repeats as holds, and excuses a skip by up to the ticks not rendered since the field before it. With no repeated frames the rules are unchanged, including the one late tick allowed by #2904; a skip or hold with no stall, or a skip past the stall, still fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Ci-Attestation: {"at":1795311679,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":70,"stamp":"43c71a68cbc74d9bc2f597ebff597917","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311679,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":70,"stamp":"f564239d403c85ebeea6d16bc9a6a815","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311679,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":70,"stamp":"f1e5f3da544614e3f1ef64a8de9c4822","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311679,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":70,"stamp":"03153b4f7b8976677891ef543c9004b5","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"general/all/client-lint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"96eefb001ac1163b67e3f1037b843069","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311679,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":70,"stamp":"93745534b7f53b48f77e8036035051c6","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311609,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"926bcfd66bc9e995184285db88b6f183","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311609,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"fb96360185785cccee6143bda2c7e211","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"c6eb47e9ffb7c6e8530081369f62f9d2","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"bccfd8e79336b4529e027acd8ca80140","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"55e12769df03ca97c7c64add096bc89d","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"7ec2f6772a38e8f06514cbe9757e59ff","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"1f2dc4e26d73ebbbe271be2cdfd0097e","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"0027820330180b08995f2bfe69bc9831","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"f90334cce9bf4440d90a1eca14914f95","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"ae5c8d845c407f9b16bb6bc4a2034d42","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"a8b8cdfcfc6d9f49dd976421b8c12869","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311608,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"68c72eb183c2ec14bfdfa02b1b3a3bf53f9be1dbae90d80dc91800a8e1e716c7","lane":"client-lint","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":68,"stamp":"36d51c23e007e584ccc87b6b1b236b23","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Ci-Attestation: {"at":1795311854,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"5be76905b23154b3363e0a67c67f84a8755c3e062e970cf2e2b374837be5332c","lane":"client-test-x86_64-unknown-linux-gnu","parents":["7c480ecb2a9718cfb9dd091cf9733861b7e4d747"],"secs":175,"stamp":"e1710cf632c31af90dbdbf1abdd60f19","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141","v":1,"via":"run"} Client-Checks: {"checks":{"base":"1d9ab9704a899c04b9cd412283bda12491b55e77","coverage":"all-tracked-applicable-files","diff":["test/cmocka/test_deinterlace_2x_field_order.c"],"head":"ec16e2ff2817a8bbb8d4f16fd76b19bf03c129a2","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504-GITv2.15.4\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"73823c9dcea417b717d6234e358b9d8c555deb3e7f185755b375afa1c93bde69","tree":"fe41d69319c130c1ffc1c28b782ae6c78b169141"}}
zackees
approved these changes
Nov 22, 2026
zackees
left a comment
Member
There was a problem hiding this comment.
Coordinator review: approved.
- Matches the #5374 triage plan: test-only, with libobs untouched. With no repeated frames the rules are exactly the old ones, including #2904's one late tick. A skip is excused only up to the ticks not rendered since the previous field, and a stall in an earlier window doesn't excuse a later skip. So the test is no weaker when there is no stall.
- Accounting: it is now a pure
count_fields()with fixed sequences. The RED commit shows the two stall sequences failing under the old rules, while the five must-fail sequences keep failing as they should. - Evidence goes past the plan: the forced SIGSTOP stalls show the repeated-frame count equal to libobs's own lagged count in every case, on both libraries. That rules out a hidden libobs skip.
- Limit: the unbuffered late-input case is correctly left out of scope. It is late input, not a render stall. A follow-up belongs on #456, which the triage already asked for.
- Known-flaky: no entry was added, so none is left behind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5374. Test-only:
test_deinterlace_2x_field_ordercounted a multi-tick render stall on a loaded runner as a cadence bug. It failed in the merge queue on the C reference and ejected an unrelated PR.What changes
raw_videorecords, for every output frame, whether video-io repeated the frame before it, meaning the same cache entry was delivered again. That happens only when the graphics thread missed ticks:video_sleepcounts them as lagged, andvideo_output_cur_framedelivers the last rendered frame once per missed tick. Each rendered frame gets its own cache entry.count_fields(), withskips_ok()andholds_ok(). There are seven fixed-sequence cases (accounting_*_50i_into_50, which run under the 50i-into-50 entry).N repeated frames (L lagged, D dropped by video-io) excuse E skipped fields.No
known-flaky.txtentry was added, and none is left behind.Evidence
RED (commit 1, Tier 2 in Docker:
OBS_CTEST_JOBS=10 uv run --no-project rust/tools/linux-validate/run.py --repeat 2 --tests '^test_deinterlace_2x_field_order_50i_into_50$'). The two stall sequences fail under the old rules, and the five must-fail sequences pass:GREEN, full Tier 2 for both builds, with 10 repeats of all five rates under load: 13 busy loops on 16 cores (load average about 17), running only during the repeat phases.
Busy loops on this host never stalled the renderer: all 650 measured cases logged 0 repeated frames. So I also forced real stalls. I ran the built binary from the kept Tier 2 build volume (
CMOCKA_TEST_FILTER='*_50i_into_50', underxvfb-run) and froze the process with SIGSTOP/SIGCONT for 100 ms every 2.5 s. In every case, on both libraries, the repeated-frame count equals libobs's own lagged count. The buffered cases skipped 2-4 fields after a 3-4 tick stall. All were excused, and the old rules would have failed every one, the same way the merge-queue run did:With 60 ms freezes (1-2 ticks), all 22 cases pass on both libraries, and the repeated count again equals the lagged count each time.
Not covered, and not changed here: a freeze of the whole process also stops the thread that feeds frames. An unbuffered source then gets its frames late and skips them one render after the stall window (
after_pause_linear_2x_unbuffered:3 skipped (at most 2 in a row), 4 repeated frames (4 lagged) excuse 1). That is late input, not a render stall. The test fails that way with or without this change, and none of the CI failures scanned in #5374 show it. So I did not widen the excuse past the stall's own window.🤖 Generated with Claude Code