Repository navigation
[Desktop] Renderer oom → total app loss: bounded page-reload recovery + bounded event window (patches & evidence)
#12149
Replies: 2 comments
|
Update — UI state preservation + heap watermark (v9) Following up on this discussion, we added a layer that closes two practical gaps in the reload-recovery approach: 1. The reload used to lose UI state (scroll position, unsent draft)Now the main window snapshots and restores it:
2. Early warning before an actual OOMEvery 30 s the script checks
Two implementation lessons that may be useful upstream
Validation
If the recovery direction is accepted, this could land as a separate small patch ( Repo (docs, patches, tests): https://github.com/ZhaoZehao10/dsh-phoenix — see |
|
An entry-count cap is a smaller change than the byte-bounded window and removes the unbounded term.
Proposal:
The measurements in the report above show the byte-bounded version reaching about 48 MB from 164 MB. An entry cap should capture most of that with a one-file change, and can be upgraded to a byte bound later without changing the contract. 中文说明按条目数设上限比字节有界窗口改动更小,并且同样移除无界项。
建议:
上文报告中的测量显示,字节有界版本可从 164 MB 降到约 48 MB。条目上限应以单文件改动拿到其中大部分收益,之后可以在不改变契约的前提下升级为字节上限。 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the desktop renderer dies for any reason other than a clean exit — including
oom— the shell escalates straight toreportFatal, which shows the recovery dialog and takes the whole application down. In-flight turns are interrupted and background jobs are lost, even though the session log is durable on disk and the Host process is healthy.We'd like to propose two changes for discussion:
oom/crashed/killedas recoverable renderer state; reload the window (250 ms) with a bounded budget (2 reloads per rolling 60 s window, time-reset for isolated incidents), then fall back to the existingreportFatalpath. Each recovery is appended tologs/renderer-recovery.log, and crash reports gain a memory snapshot section (main process, renderers, system) — the crash report currently carries no memory fields at all, which made field triage very expensive.MutableSessionEventSourcecurrently appends every history page to the resident window and never evicts. On a 22-day / 60,858-event session (164 MB raw) this is the dominant heap driver. A byte-bounded window with tail retention keeps the same UX at ~48 MB peak (measured 164.25 → 47.89 MB; real heap growth 169.26 → 46.09 MB over a full scrollback replay).Evidence
reason: 'oom', but the Windows Resource-Exhaustion-Detector had loggedSystemCommitCharge 127.7/127.9 GiB (99.8%)twice beforehand, with the top commit consumers being unrelated processes — the renderer was a victim of system commit exhaustion, not the culprit. The crash report's missing memory fields made this take a day to establish.Testing
main.js(recoverable/unrecoverable reasons, clean-exit, quitting, destroyed window, budget escalation, time-reset boundaries, audit-log writes, log-failure resilience, memory snapshot).@electron/asarreference implementation (file list equality, main.js byte equality, 30-file random sample, untouched data area).The full toolchain (installer with transaction + auto-rollback, tests, diagnosis notes) is at:
https://github.com/ZhaoZehao10/dsh-phoenix
Questions
oom,crashed,killed) right? We deliberately excludedintegrity-failureandlaunch-failed.Happy to adapt to your conventions; the source patches apply cleanly to current
masterand can be reshaped however you prefer.All reactions