Commit Graph
16 Commits
Author SHA1 Message Date
Brennan BensonandNeil 48f0e54c03 fix(win): fall back to software rendering after repeated GPU crashes (#6857)
* fix(win): fall back to software rendering after repeated GPU crashes

On old/flaky GPU drivers the GPU child process crashes
(STATUS_BREAKPOINT / ANGLE-D3D init failure) within seconds of launch,
repeatedly — Windows crash clusters F0BDNADU79Q (Win11) and
F0BDNRZ5MDG (Win10). GPU child deaths are intentionally suppressed as
recoverable churn, so Orca never reacted and the GPU kept crashing every
launch with no self-healing path.

Track GPU child crashes in a post-launch window (3 / 30s). On the
threshold, record a gpu_fallback_engaged breadcrumb, persist a marker
file in userData, and relaunch once. The marker is read before
app.whenReady() resolves (the Store isn't available that early) so
app.disableHardwareAcceleration() + --disable-gpu take effect, then it's
consumed/cleared so the fallback applies to exactly one launch and can't
relaunch-loop. Records gpu_fallback_applied on the software-render boot.

Pure logic lives in GpuCrashFallbackTracker and the marker read/write
module, both unit-tested; the index.ts wiring is thin. Desktop only —
headless serve already uses software rendering where needed.

* fix(win): harden GPU crash fallback policy

---------

Co-authored-by: Neil <neil@stably.ai>
2026-06-30 01:21:07 -07:00
Brennan BensonandNeil 60412362a1 fix(win): stop renderer crash-loop with an auto-recovery circuit breaker (#6856)
A deterministic per-load renderer fault (bad GPU driver, corrupt chunk,
AV interference) crashes on every load. Orca auto-reloads recoverable
renderer deaths after 250ms, so without a limit it reloads every
~0.25-1.3s forever — the Windows clusters F0BDRAZN55L (launch-failed
exit 18, bootstrap loop ~1.3s) and F0BDPCL93UM (ACCESS_VIOLATION on
Win10 1909, ~0.8s loop). shouldRecoverRendererAfterProcessGone only
gated integrity-failure/launch-failed, never 'crashed'/'killed'.

Add a rolling-window circuit breaker (3 recoveries / 60s) consulted at
the reload point in createMainWindow. When it opens, Orca stops
auto-reloading, records a renderer_recovery_circuit_breaker_open
breadcrumb, and shows a native Reload/Quit prompt (the renderer is dead,
so a main-process dialog is the only available surface). The window is
NOT reset on did-finish-load: a crash loop renders on every cycle before
dying, so stale attempts must age out by time instead.

Covered by renderer-recovery-circuit-breaker.test.ts (pure helper) and a
createMainWindow.test.ts integration test that drives the loop and
asserts reloads stop after the limit.

Co-authored-by: Neil <neil@stably.ai>
2026-06-30 00:26:29 -07:00
Brennan BensonandNeil 5fc1fb3c25 Coalesce renderer process-gone crash bursts (#6202)
Co-authored-by: Neil <neil@stably.ai>
2026-06-23 20:59:06 -07:00
NeilandOrca 77633809c6 fix(crash-reporting): bound coalescedBreadcrumbs with TTL prune + LRU cap (#5818)
recordCoalescedCrashBreadcrumb set entries keyed by agent:${agentType}:${state}
with no prune and no cap. agentType is an open string (length-trimmed only,
never enum-checked) over the relay/SSH/OSC ingest paths, so the map grew
unbounded over a long multi-agent session — the sibling breadcrumbs array
is capped at 30, but this map was not.

Prune entries past their suppression window and LRU-cap to 128, mirroring
ProcessGoneDedupe's prune/maxKeys idiom.

Regression test fails before the fix (1000 keys) and passes after.

Co-authored-by: Orca <help@stably.ai>
2026-06-19 12:34:44 -07:00
Neil eb89a72fa0 fix: avoid renderer launch-failed reload loop (#4599) 2026-06-03 20:37:15 -04:00
Neil 0bbd103f5f Add process-gone diagnostics to crash reports (#4596) 2026-06-03 16:20:03 -07:00
Neil 68bc0345be fix: bound process-gone crash dedupe (#4272) 2026-05-31 10:24:32 -07:00
Neil 0d1b69eff2 Improve renderer crash report breadcrumbs 2026-05-31 08:05:49 -07:00
Neil c01a05b698 Suppress recoverable child process crash prompts (#3585) 2026-05-30 02:51:51 -07:00
Neil 4a8253a99e Suppress recoverable Chromium child crash reports (#2762) 2026-05-24 18:17:03 -07:00
Brennan BensonandOrca b5b29526a2 Suppress GPU shutdown crash prompts (#2759)
Co-authored-by: Orca <help@stably.ai>
2026-05-24 15:47:24 -07:00
Brennan BensonandOrca 56e8e13b1b Filter SIGTERM process teardown crash reports (#2348)
Co-authored-by: Orca <help@stably.ai>
2026-05-19 15:06:45 -07:00
Jinwoo HongandOrca 8b6f666de5 Suppress false crash reports during expected renderer reloads (#2342)
Co-authored-by: Orca <help@stably.ai>
2026-05-19 13:41:48 -07:00
Jinjing c7ac8a1f2f fix: handle related crash cleanup (#2139) 2026-05-16 22:49:12 -07:00
Jinjing b21dd63eb2 fix: address review findings (#2134) 2026-05-16 17:58:48 -07:00
JinjingandOrca 77264240c8 Add crash report submission flow (#2012)
* feat: add crash report submission flow

* Capture crash-report breadcrumbs

- Add a memory-only crash breadcrumb ring buffer and persist snapshots only
  when a crash report is recorded
- Include sanitized recent activity in crash diagnostics and tests
- Prevent dismissing or closing the crash dialog while submission is in flight

Co-authored-by: Orca <help@stably.ai>

* fix: address auto-review findings

* chore: remove crash report preview artifact

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-15 23:59:03 -07:00