Skip to content

fix(desktop): retry once without the GPU sandbox after a Windows status breakpoint - #1520

Open
173787247 wants to merge 1 commit into
anywhere-labs:masterfrom
173787247:fix/win11-gpu-sandbox-fallback
Open

173787247 wants to merge 1 commit into
anywhere-labs:masterfrom
173787247:fix/win11-gpu-sandbox-fallback

Conversation

@173787247

Copy link
Copy Markdown

Summary / 摘要

A sandboxed GPU child that dies with Windows STATUS_BREAKPOINT (0x80000003) leaves Chromium no working GPU mode. It retries every mode and then ends the browser process, so the user only sees that nothing opens — the symptom in #1487 and #1323 (and the discussion thread "GPU子进程崩溃 exitCode 0x80000003"). Electron reports that child as reason: 'crashed', not launch-failed, so the existing sandbox explanation in sandbox-launch.ts never runs.

This change recognizes the signature in the Beta and Next shells, records it in diagnostics, and relaunches once with --disable-gpu-sandbox — the workaround documented for the Chromium/native-sandbox regression and used by other Electron apps (desktop/desktop#22306). The switch stays on the relaunched command line, so a second failure is not retried into a loop. Every child except the GPU process keeps its sandbox.

沙箱化的 GPU 子进程以 Windows STATUS_BREAKPOINT(0x80000003)退出后,Chromium 没有可用的 GPU 模式,会在窗口出现前结束浏览器进程,用户只看到「双击没反应」(#1487、#1323、讨论帖同签名)。Electron 把这种退出报告为 reason: 'crashed' 而非 launch-failed,现有说明对话框不会触发。

本 PR 在 Beta 与 Next 外壳中识别该签名、写入诊断,并只重启一次,带上 --disable-gpu-sandbox(原生沙箱回归的已知规避方式,其他 Electron 应用也在用)。该参数会留在重启后的命令行里,因此再次失败不会循环重启;除 GPU 外其余子进程的沙箱保持不变。

Related Issues / 关联 Issue

Type / 类型

  • Bug fix / 问题修复
  • Feature / 新功能
  • Documentation / 文档
  • Release or packaging / 发布或打包
  • Tests only / 仅测试
  • Other / 其他

Platforms / 影响平台

  • Windows installer / Windows 安装包
  • Windows portable ZIP / Windows 便携版 ZIP
  • macOS Apple Silicon
  • macOS Intel
  • macOS Universal package / macOS 通用安装包
  • Linux
  • Not platform-specific / 与平台无关

Verification / 验证

  • corepack yarn workspace dsh-plugin-desktop-beta exec vitest run tests/sandbox-launch.spec.ts tests/main-lifecycle.spec.ts — 76 passed
  • corepack yarn workspace dsh-desktop-next exec vitest run tests/sandbox-launch.spec.ts tests/main-lifecycle.spec.ts — 76 passed
  • corepack yarn workspace dsh-plugin-desktop-beta typecheck — 0
  • corepack yarn workspace dsh-desktop-next typecheck — 0
  • node scripts/verify-desktop-variants.mjs — 268 files aligned between Next and Beta
  • corepack yarn test — full suites are not green in this checkout: 6 (Beta) / 5 (Next) tests fail with ENOENT … deepseek-harness/… because the pinned upstream submodule is not initialized here. The failing files are sign-runtime, mac-entitlements, prepare-runtime, primary-runtime, prune-python-tests; none touch this change.
  • corepack yarn check — not run (needs the initialized submodule and a full build)
  • Platform package smoke / 平台打包或启动冒烟 — not run
  • Manual test / 人工测试 — could not reproduce the crash locally: a minimal Electron 44.7.0 app on this Windows 11 26200 machine opens normally, and Electron 44.7.0's own install_dir_access.cc check produces a clear FATAL for the ACL variant instead of 0x80000003. So the change is based on the upstream reports and the identical signature in [Win11 26200][2.0.18] 启动即崩:GPU process launch failed: error_code=18 → GPU process isnt usable. Goodbye.(startup.jsonl 停在 runtime-bootstrap,仅 --no-sandbox 可启动) #1487; it has not been verified against a machine that still crashes.

Release Notes / 发布说明

Windows: if a GPU process dies with STATUS_BREAKPOINT during startup, DSH Desktop Beta / DSH NEXT restart once with only the GPU sandbox disabled (--disable-gpu-sandbox) instead of exiting with no window.

@173787247
173787247 force-pushed the fix/win11-gpu-sandbox-fallback branch 3 times, most recently from bf4eb69 to af3a8b0 Compare November 5, 2026 13:45
@173787247
173787247 force-pushed the fix/win11-gpu-sandbox-fallback branch from af3a8b0 to 5fd3ca4 Compare November 5, 2026 15:32
@173787247

Copy link
Copy Markdown
Author

Rebased onto current master a8b9865 and resolved the eight conflicted files; the PR is mergeable again. The repository has no PR CI, so a review is the remaining step. Happy to adjust anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant