fix(desktop): attempt renderer reload on killed reason, not just crashed/oom - #43716
fix(desktop): attempt renderer reload on killed reason, not just crashed/oom#43716liuhao1024 wants to merge 1 commit into
Conversation
…hed/oom The render-process-gone handler only reloaded the renderer when the reason was 'crashed' or 'oom'. When the renderer is killed externally (reason='killed', exitCode=15/SIGTERM), the handler logged but never attempted a reload, leaving the window blank while the backend continued restarting — producing the boot loop reported in NousResearch#43640. Add 'killed' to the reload condition. The existing crash-loop guard (RENDERER_RELOAD_MAX=3 within 60s) prevents infinite reload attempts if the kill is persistent. Fixes NousResearch#43640
|
Thanks for the focused recovery hardening. The premise remains valid on current main: Problems
Suggested changes
The #43640 reporter later identified dashboard-auth 401 as that incident's root cause, while also confirming this remains useful general bounded-recovery hardening. This is an automated hermes-sweeper review. |
|
Closing as superseded by design — PR #83567 (salvaged from #81533) just landed per-window renderer-lifecycle handling, and it deliberately keeps The reasoning: The diagnostic gap that motivated this PR is covered too: every window now logs Thanks for the contribution, and sorry it sat so long — if you're seeing live windows getting |
What does this PR do?
Adds
'killed'to therender-process-gonehandler's reload condition so the renderer attempts recovery when externally terminated (e.g. SIGTERM), not just oncrashedoroom. This prevents the boot loop reported in #43640 where the renderer is killed but never reloaded while the backend keeps restarting.Related Issue
Fixes #43640
Type of Change
Changes Made
apps/desktop/electron/main.cjs: Added'killed'to therender-process-gonereason check. The existing crash-loop guard (RENDERER_RELOAD_MAX = 3withinRENDERER_RELOAD_WINDOW_MS = 60s) already prevents infinite reload attempts if the kill is persistent.How to Test
SIGTERMto the renderer's PID (or simulate a killed renderer) — the app should attempt a reload instead of staying on a blank screenChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACode Intelligence
apps/desktop/electron/main.cjsrender-process-gonehandler (lines 4963–4995)RENDERER_RELOAD_MAX,RENDERER_RELOAD_WINDOW_MSconstants at line 564–565