#740·camoufox

Camoufox crashes with SIGSEGV under gVisor sandboxes — wasm_rt_syscall_set_segue_base / ARCH_SET_GS unsupported

Author: isaacgountonCreated Aug 26, 2026Updated Sep 8, 2026

Summary

Camoufox crashes with SIGSEGV a few seconds after launch when run inside a gVisor-sandboxed container (e.g. Modal functions, Google Cloud Run, GKE Sandbox/GKE Autopilot). The crash is not specific to Camoufox's own code — it's Firefox 136+'s WASM sandbox (RLBox/wasm2c) requiring arch_prctl(ARCH_SET_GS, ...), a syscall gVisor does not implement (google/gvisor#11567). Filing here since Camoufox pins/ships that Firefox base and this will bite anyone trying to deploy Camoufox on gVisor-backed serverless platforms.

Environment

  • camoufox-js: 0.12.0
  • playwright: 1.60.0
  • Base image: mcr.microsoft.com/playwright:v1.60.0-noble
  • Host: Modal (gVisor-sandboxed container runtime), x86_64
  • Launch options: { headless: true, geoip: true } via launchOptions() from camoufox-js

Repro

javascript
import { launchOptions } from 'camoufox-js';
import { firefox } from 'playwright';

const opts = await launchOptions({ headless: true, geoip: true });
const browser = await firefox.launch(opts);
browser.on('disconnected', () => console.log('disconnected'));
// crashes within ~3s of launch, before any page is opened

Observed (with DEBUG=pw:browser)

pw:browser <launching> /opt/camoufox/camoufox-bin -no-remote -headless -profile ... -juggler-pipe -silent
pw:browser <launched> pid=38
pw:browser [pid=38][err] *** You are running in headless mode.
pw:browser [pid=38][out] [GFX1-]: FireTestProcess failed: Failed to spawn child process "/opt/camoufox/glxtest" (No such file or directory)
pw:browser [pid=38][err] JavaScript warning: resource://services-settings/Utils.sys.mjs, line 119: unreachable code after return statement
pw:browser [pid=38][out] Juggler listening to the pipe
pw:browser [pid=38][err] wasm_rt_syscall_set_segue_base error: Invalid argument
pw:browser [pid=38][err] Redirecting call to abort() to mozalloc_abort
pw:browser [pid=38] <process did exit: exitCode=null, signal=SIGSEGV>

What I tried

  • Setting MOZ_DISABLE_CONTENT_SANDBOX=1 in the launched process's env (confirmed via opts.env.MOZ_DISABLE_CONTENT_SANDBOX that it does reach the child process) — no effect. This makes sense in hindsight: this is the WASM/RLBox sandbox, not the OS-level content-process sandbox that env var controls.
  • No firefox_user_pref or launch arg found that disables the WASM segue-based sandboxing at runtime.

Question / ask

Is there a supported way to disable the WASM segue optimization (or the RLBox-sandboxed libraries that trigger it) at runtime or launch-option time, so Camoufox can run under gVisor-based sandboxes until gVisor implements ARCH_SET_GS? If there's a Firefox pref or build flag for this already, happy to test and report back — a launchOptions() flag would make this a clean workaround for anyone deploying to gVisor-backed platforms (Modal, Cloud Run, GKE Sandbox).

Reference: https://github.com/google/gvisor/issues/11567