Skip to content

perf(test): remove nine serial barriers and fix output deactivation race - #1643

Merged
zackees merged 11 commits into
masterfrom
infra/tier2-concurrency-audit
Oct 21, 2026
Merged

zackees merged 11 commits into
masterfrom
infra/tier2-concurrency-audit

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #1634. Refs #1581, #456, #1391.

Remove nine unnecessary Linux Tier 2 serial barriers while preserving the real-time deinterlace guard. Eight tests already use process-owned resources; XSHM now changes resolution on a private Xvfb, with serial fallback when unavailable. Bound software-renderer workers to one per Linux test process. Keep the existing two-shards-per-backend CI matrix and all coverage/skip/timeout policies.

Resolve the output-delay race exposed by concurrency: publish inactive state before emitting deactivate. A new deterministic real-libobs callback test covers normal and forced stop; existing C test bodies and public headers are unchanged. The frontend wait logic is unchanged; its comments now describe the corrected core ordering. Feature ledger updated.

Report and all exploratory outcomes: docs/ci-serial-audit-2026-10-21.{md,json}. Historical unguarded timings are not final-policy or CI gate speedup claims. The landing-policy section supersedes the exploratory recommendation.

Failures resolved

  • Prior PR CI run 39658456956 failed yadif_2x_bottom_first_50i_into_30 in OFF shard 1 despite the renderer cap. Local capped successes did not establish CI reliability. Restore only deinterlace RUN_SERIAL; retain the nine other concurrency gains.
  • Output delay observed active state after deactivation. Core emitted the signal before clearing active. Fix the ordering, rather than adding a serial guard or relaxing an existing assertion. This corrects core notification ordering; it does not claim completion of bug: recording shutdown wait can return before output becomes inactive #1391's separate frontend work.

RED → GREEN

  • cb6ce6057 → 1284477b8: generated CTest registrations require private XSHM and the removable barriers; initial RED had 17 failing assertions.
  • 26818e7e8 → 066dc622f: actual Bash environment rejects an inherited 128-worker renderer pool and pins it to one.
  • 8c2f1dc7a RED: both new callback cases fail deterministically against both backends (CTest exit 8 each). Scheduling guards also fail three assertions until timing isolation is restored.
  • 6d3b3740b GREEN: both callback cases pass 100 stop cycles each against each backend (400 total), and all 27 focused configuration/environment/shard tests pass. Earlier exploratory deinterlace-removal commits are intentionally superseded.

Validation

Native build rebased onto f3e6260b1: 1,766 identical exported symbols; 64 ported C implementations excluded from hybrid libobs.

OBS_TIER2_STAGE=test OBS_CTEST_JOBS=8 rust/tools/linux-validate/run.sh:

Backend Registered Failed Expected skips Execution
C reference (OFF) 351 0 3 169.61 s
Hybrid (ON) 351 0 3 169.20 s

The same three unavailable PulseAudio tests skip. No original registry entries are lost; four tests arrived on master and one is the new regression. Only deinterlace retains RUN_SERIAL when Xvfb is available. All Linux registrations retain the renderer budget.

Pinned clang-format / gersemi, Bash syntax, diff checks and 27 focused Python tests pass. One primary local review found no blocking code issues; its two documentation/evidence notes are addressed. No Rust source or protocol implementation changed; runtime compatibility is checked against both backends. Full local gate not run; PR CI and merge-group CI remain the merge gates. No new workflow file or shard-count change.

Final local validation used unrestricted affinity (16 logical CPUs), unlike the four-core historical experiments. Treat it as correctness evidence, not a controlled timing comparison.

Rebased the previous head ef33f90ddf7ed473c0a4a62c349907e570e2c1b4 onto current master at task start; retained the separate RED/GREEN commits. User explicitly requested completing and merging this optimization. Use the normal merge queue.

@zackees
zackees force-pushed the infra/tier2-concurrency-audit branch from ef33f90 to 3968a7c Compare October 21, 2026 20:09
@zackees zackees changed the title perf(test): audit serial barriers and isolate concurrent Tier 2 runs perf(test): remove nine serial barriers and fix output deactivation race Oct 21, 2026
@zackees
zackees marked this pull request as ready for review October 21, 2026 20:24
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit 4c432e2 Oct 21, 2026
27 checks passed
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.

perf(test): audit Tier 2 serial restrictions and enable safe concurrency

1 participant