Repository navigation
inspector: uncaught throw in setState kills the host when the cordis/tree source state reaches the frame budget #11218
Replies: 4 comments
|
The limit is deliberate. Killing the host over it is not.
The defect you found is downstream. The throw happens on the publish path ( One thing worth adding to the report: the budget is computed over all retained topic snapshots, not per topic, so it scales with how many topics the inspector is publishing — which is why ~25 bundles matters. Source read at |
|
Field data from a Web profile (the reports above are desktop), same
One extra data point for the fix: We are now testing the supported workaround ( |
|
You're right that the patch has to restate the whole config — my suggestion named the field without saying that the entry's One thing your web-profile numbers add to the report: the budget is recomputed over every retained topic, so raising it to 1 MiB does not remove the limit, it moves it. With 42 bundles that is worth stating explicitly — otherwise the eventual fix reads as "make the frame bigger" when it has to be "drop the frame and keep the process". 17 host exits in five days from one uncaught throw is also the strongest impact statement in the thread so far; I'd put that number in the first paragraph of the report rather than in a comment. |
|
补充四条前面报告里没有的数据,都与修复范围有关。 1. 干净环境里用发布产物可独立复现
与桌面端 2. 缺口是固定可算的,不是随机 同环境二分:126,915 字节接受,126,916 拒绝,缺口 61 字节。把 3. 跨版本未变,升级不能规避 比对各版本发布产物: 4. 真实 profile 离上限很近 桌面端现场:654 个活 fiber 时再挂 150 个空插件即触发,约 19 KB 余量。不需要极端规模的插件集,正常使用的 profile 就可能贴着这条线。 完整数据和复现步骤在 #11647,那条按重复项关闭,后续讨论留在这里。 |
Uh oh!
There was an error while loading. Please reload this page.
What happened
On 2026-10-26 14:10 UTC the DSH desktop host process exited. The last line of
crash-*-host.logwas:Environment:
@deepseek-ai/dsh-desktop0.2.1-rc.2, Windows 11, desktop profile with ~25 bundles including community plugins. Agent context usage at the time was about 47%, so this is unrelated to the model context window.Mechanism
InspectorSourceBuffer.stateFits()requiresjsonByteLength(all retained topic snapshots) + SOURCE_FRAME_OVERHEAD_BYTES (4096) <= maxSourceFrameBytes(default 128 KiB).cordis/tree.publishCordisTreepasses{ maxNodes: spec.maxCordisNodes, maxBytes: spec.maxSourceFrameBytes - 4096 }toCordisTreeCollector(index.js:2402-2405).jsonByteLength(snapshot) <= maxBytes, i.e. it is allowed to stop exactly at the whole available budget. The record envelope thatsetState()then adds (topic,sequence,monotonicMs) has no headroom reserved.maxSourceFrameBytes,stateFits()fails, andsetState()throws instead of degrading. The uncaught exception inside the publish microtask terminates the Host process.Two defects (as I read the code)
maxSourceFrameBytes - 4096), while the state check also has to fit the record envelope. Please reserve the envelope in the prune target, or measure the budget after wrapping.enqueue()silently drops one oversized record (return, index.js:1070), butsetState()throws when the sum exceeds the limit (index.js:993-996). The over-budget path should degrade non-fatally (drop or roll back the topic, log a warning), consistent withenqueue().Workaround in use
The Config schema already accepts
maxSourceFrameBytes, so a profile patch raises the budget. Note that a user patch replaces the whole config of the matched entry, socaptureFetchmust be restated:The Client bootstrap (
bootstrap.maxFrameBytes) follows the Host value, so raising it on the Host is enough. This avoids the crash but does not fix the underlying budget collision.Expected
A Host inspection plugin exceeding a self-imposed frame budget should log and degrade; it should never be able to take down the Host process.
All reactions