Skip to content

fix: bound stalled browser startup and finalize shutdown safely (#3833) - #3846

Merged
zackees merged 2 commits into
masterfrom
fix/3833-browser-startup-timeout
Nov 7, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3833-browser-startup-timeout

Conversation

@zackees

@zackees zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member

Refs #3833. Browser implementation: obs-rust/obs-browser#19, merged as 21d6bba.

When Linux CEF never finishes initialization, quit now stops waiting after 5 seconds instead of hanging indefinitely. Startup logs one warning after 10 seconds, naming the runtime CEF version; actual initialization failure also warns once. A slow initializer can still recover.

This bumps obs-browser to its merged fix and installs the private frontend shutdown handshake. The timed-out manager thread, CEF objects and events stay alive; a late result parks before touching OBS or restoring signal handlers. The frontend invokes the final hook after normal Qt, libobs and platform cleanup, with its log flushed. Only the abandoned case uses _Exit(0) before static destructors. Real CEF helpers were observed to exit after parent IPC closed. Older hosts without this handshake exit immediately on this exceptional timeout rather than returning through unsafe unload. The feature ledger documents the change, and Fast Gate runs the CEF-independent handshake regression.

Validation:

  • RED: browser commit 2de6932, against the unchanged real module, pinned CEF 156.0.14 (8078-r2), and hybrid libobs. Both immediate-unload modes and a released slow initializer passed. A never-released cef_initialize stayed silent and OBS shutdown exceeded the test's 12-second bound.
  • GREEN: real browser module and helper built with ENABLE_BROWSER=ON. Under Xvfb: unchanged immediate initialize/source cases passed; real profile-lock initialization failure passed with exactly one warning; released slow init, stalled init, a stall after actual CEF helpers started, and recovery after a startup warning all passed. Helper pidfds signaled exit within 5 seconds, and a static-destructor sentinel verified the fatal exit skips destructors.
  • Production handshake without CEF: 100 repeated runs passed, including late completion after abandonment. Parent browser tests: 4 passed. Read-only clud-review: clean, with an independent 100-run replay. The merged browser tree is identical to the verified GREEN tree.
  • SOLDR_PORCELAIN=0 ./lint reached the known soldr Dylint environment refusal: no pre-deployed driver for nightly-2026-05-28, and building the driver under clud is refused. Every earlier lint lane passed. Hosted Fast Gate remains the merge gate; no unrelated Dylint pin changes were made.

Observed real-runtime log:

[obs-browser]: CEF 156.0.14 initialization has not completed after 10 seconds. Browser sources and docks are unavailable until CEF starts.
[obs-browser]: CEF initialization timed out during shutdown (CEF 156.0.14, 5 seconds). Retaining the blocked thread and its events; OBS will finish cleanup and exit without running CEF destructors.
browser startup and immediate shutdown completed

Reproduction commands and lifecycle details are in the browser test README. The lifecycle fixture exercises the same private finalization hooks as the frontend. The full GUI and Arch CEF 152.0.6 installation were not run, so this uses Refs, not Fixes. No CEF support-version decision is made.

A different pool temporarily switched this slot during 07:20–07:35 UTC. Both reflogs, all owned files and the only pushed draft commit were audited. All results from that window were discarded; the RED and GREEN module builds/tests above were rerun from a fresh audited build directory after restoration. No unrelated work is included.

@zackees
zackees enabled auto-merge November 7, 2026 08:06
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the pool chaperone. Verified head ff84068 is pushed, the PR is ready, and auto-merge is enabled. Browser PR obs-rust/obs-browser#19 is already merged and this points to its merged commit. Real CEF RED/GREEN, helper exit checks, normal/failure/slow controls and the 100-run handshake regression passed. Local lint stopped only at the assignment-documented soldr Dylint driver refusal; earlier lanes passed. Hosted Fast Gate decides admission. Full GUI and the reporter’s Arch CEF 152 installation remain unverified, hence Refs #3833.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 8916389 Nov 7, 2026
39 checks passed
@zackees
zackees deleted the fix/3833-browser-startup-timeout branch November 7, 2026 08: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