Repository navigation
ci: prevent shared Xvfb resets and diagnose libobs startup failures - #1365
Merged
Merged
Conversation
zackees
marked this pull request as ready for review
October 17, 2026 23:21
zackees
enabled auto-merge
October 17, 2026 23:21
6 tasks
Member
Author
|
Fresh complete PR run 39080388954 passed on the exported-interposer correction. OFF and ON each registered 295 tests with zero failures; CTest 315.01/308.97 s. Both the unchanged slideshow test and the new diagnostic fault-injection test passed in each mode (diagnostic test 0.03/0.02 s). This validates the actual CMake-built test with the normal hidden-visibility build, including the Rust-substituted library. No failed-job retry was used to obtain this result. #1365 is now in the merge queue. Keep #1355 open until fresh queue/master validation; this passing run alone does not assign all historical startup incidents to one cause. |
8 of 15 tasks
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.
Summary
Refs #1355 and #1286. Startup failure diagnostics needed to identify the intermittent CI blocker; the root cause remains unknown.
RED
A new Linux cmocka test interposes XOpenDisplay to return NULL with ECONNREFUSED, calls real shared libobs, preserves its false startup return, and requires error diagnostics naming hotkey initialization and the failed platform call. It also runs against libobs-with-rust in the ordinary OFF/ON suite.
Local RED: compiled the new test in the existing Linux validation image against this checkout's existing build volume mounted read-only. It failed
saw_hotkeys_stage is not true. Existing C tests and public headers are unchanged.GREEN
Add error diagnostics for data, handler, hotkey, main-canvas and destruction-task-queue initialization failure; identify failed XOpenDisplay during hotkey initialization and report DISPLAY. Startup return values and cleanup are unchanged.
Rebuilt real C libobs in the existing checkout-owned Linux build volume and ran the new test successfully. The test asserts the injected call was reached, startup still returned false, and both stage/platform error messages were emitted. Raw RED/GREEN output is under ignored
build_ci_audit/startup-diagnostics-*.log. The build needed container-local git safe-directory configuration and removal of an unavailable legacy ccache launcher from the local CMake cache; these are not repository changes or timing measurements.Verification: pinned clang-format 22.1.3 and gersemi 0.25.0 checks pass; six build-group checks pass;
git diff --checkpasses. Existing C tests/public headers are unchanged, and the feature ledger records the log change. Full OFF/ON CI and the Rust-substituted consumer remain pending. No Rust port or network protocol change: new Rust unit/differential/protocol tests do not apply.This does not establish that X11 caused the original CI incident; further failures should now identify the failed stage. Refs #1355 rather than closing the unknown-cause issue.
Reproduced display-lifetime failure and fix
The real unchanged slideshow binary, using the diagnostic C libobs and shared authenticated xvfb-run display, reproduced XOpenDisplay failure in hotkey initialization: six failed invocations among 68 attempted (workers stop on first failure), across 816 startup groups. Changing only Xvfb's
-noresetoption produced 160/160 successful invocations across 1,920 startup groups, using the same eight workers and library. The earlier raw-Xlib-only probe did not reproduce it; the real OBS test did. This is a local reproduction, not a claim that every historical CI startup failure has the same cause.Add
-noresetto both normal and repeated Tier 2 display sessions, preserving geometry, test parallelism and failure propagation. REDf00beb4b6requires the lifetime policy. GREEN6acb527daexecutes the real suite invocation with a recording launcher, verifies the single server-argument string and exit-17 propagation, and checks repeated tests use the same arguments.uv run --no-project python -m unittest ci.test_tier2_xvfb_lifetime ci.test_tier2_build_errorspasses all six checks. Shell syntax and diff checks pass. Captured local results are indocs/ci-evidence/2026-10-17-startup-xvfb-lifetime.json; raw logs remain in ignored in-repo scratch.Fresh full OFF/ON CI remains required. Existing C tests and assertions remain unchanged; no test retry or skip was introduced.
Follow-up
0a28cd3ee: CI identified two timing-persistence checks that located CTest by the old literalxvfb-run -a ctest. They now locate the actual invocation independently of server arguments while retaining restore-before/run/save-after assertions.uv run --no-project python -m unittest ci.test_tier2_schedule ci.test_tier2_xvfb_lifetime ci.test_tier2_build_errorspasses all 10 focused checks. Cancellation was requested for the superseded red run after this correction; the new required run is 39079466829.CMake-built interposer correction
The full OFF/ON run reached 294 registrations each and failed only the new diagnostics test:
injected_display_failureremained false. All pre-existing tests had no failures. The CMake test build hid XOpenDisplay (LOCALin the symbol table), unlike the earlier standalone compile (GLOBAL DEFAULT); the loader could not reach the hook.Reproduced that exact assertion with the real CMake-built target under a valid private Xvfb display. Marked only the interposer
EXPORT, rebuilt that same target, verified the dynamic symbol isGLOBAL DEFAULT, and ran it successfully under the same display. The assertion that the injected call was reached is retained. Pinned clang-format and diff checks pass. Raw verification logs:build_ci_audit/startup-interposer-visibility-{red-test,green}.log. Fresh full CI remains required.