Skip to content

Commit dfa9e40

Browse files
linesightclaude
andcommitted
Add --single-process for Linux CI to fix renderer Mojo bootstrap failure
The renderer subprocess fails global descriptor lookup key 7 (the Mojo IPC bootstrap fd) because CEF 146 does not pass it in --no-sandbox mode on Linux. This causes CreateBrowserSync() to block for ~60s waiting for the renderer to connect, then return None. --single-process runs the renderer inside the browser process so no subprocess launch occurs and no fd-passing is needed. --in-process-gpu stays to keep the GPU inside the browser process during CefInitialize(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d0e7e31 commit dfa9e40

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

unittests/main_test.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,22 @@ def test_main(self):
146146
if LINUX:
147147
# Sandbox setup (user-namespace) fails on CI runners.
148148
switches["no-sandbox"] = ""
149-
# /dev/shm is too small in CI containers; renderer subprocess
150-
# fails shared-memory descriptor lookup (global descriptor 7).
149+
# /dev/shm is too small in CI containers.
151150
switches["disable-dev-shm-usage"] = ""
152151
# GPU acceleration is not available under xvfb.
153152
switches["disable-gpu"] = ""
154153
switches["disable-gpu-compositing"] = ""
155-
# Run GPU process inside the browser process. Without this,
156-
# the GPU subprocess is spawned during CefInitialize() and
157-
# fails the global descriptor lookup (key 7), which prevents
158-
# OnContextInitialized from firing and browser creation fails.
154+
# Run GPU process inside the browser process so it is not
155+
# spawned during CefInitialize() where it would fail the
156+
# global descriptor lookup (key 7) and block OnContextInitialized.
159157
switches["in-process-gpu"] = ""
158+
# Run the renderer inside the browser process. Without this,
159+
# the renderer subprocess fails the global descriptor lookup
160+
# (key 7, the Mojo IPC bootstrap fd) because CEF 146 does not
161+
# pass it in --no-sandbox mode; CEF then waits ~60s before
162+
# CreateBrowserSync() returns None.
163+
switches["single-process"] = ""
160164
switches["no-zygote"] = ""
161-
# Run the storage service in-process so it doesn't need the
162-
# Mojo bootstrap FD (global descriptor 7) that fails in CI.
163-
switches["disable-features"] = "StorageServiceOutOfProcess"
164165
cef.Initialize(settings, switches=switches)
165166
subtest_message("cef.Initialize() ok")
166167

unittests/osr_test.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,19 @@ def test_osr(self):
115115
if LINUX:
116116
# Sandbox setup fails on CI runners.
117117
switches["no-sandbox"] = ""
118-
# /dev/shm is too small in CI containers; renderer subprocess
119-
# fails shared-memory descriptor lookup (global descriptor 7).
118+
# /dev/shm is too small in CI containers.
120119
switches["disable-dev-shm-usage"] = ""
121-
# Run GPU process inside the browser process so the GPU
122-
# subprocess is not spawned during CefInitialize() and does
123-
# not fail the global descriptor lookup that blocks
124-
# OnContextInitialized from firing.
120+
# Run GPU process inside the browser process so it is not
121+
# spawned during CefInitialize() where it would fail the
122+
# global descriptor lookup (key 7) and block OnContextInitialized.
125123
switches["in-process-gpu"] = ""
124+
# Run the renderer inside the browser process. Without this,
125+
# the renderer subprocess fails the global descriptor lookup
126+
# (key 7, the Mojo IPC bootstrap fd) because CEF 146 does not
127+
# pass it in --no-sandbox mode; CEF then waits ~60s before
128+
# CreateBrowserSync() returns None.
129+
switches["single-process"] = ""
126130
switches["no-zygote"] = ""
127-
# Run the storage service in-process so it doesn't need the
128-
# Mojo bootstrap FD (global descriptor 7) that fails in CI.
129-
switches["disable-features"] = "StorageServiceOutOfProcess"
130131
browser_settings = {
131132
# Tweaking OSR performance (Issue #240)
132133
"windowless_frame_rate": 30, # Default frame rate in CEF is 30

0 commit comments

Comments
 (0)