Repository navigation
[Bug] Session log grows unbounded -> request body silently truncated at ~1.8 MB -> session permanently bricked #13702
fengxiforcy
started this conversation in
General
Replies: 1 comment
|
Additional context: the reporter has a full evidence package (three error messages with request_ids, bridge log, 91 MB original session log with SHA256, and a decompressed excerpt). Available on request. Also independently observed on a second machine: 113 session logs, 239 MB total — same monotonic growth pattern, just not yet at the trigger size. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[Bug] Session log grows unbounded → request body silently truncated at ~1.8 MB → session permanently bricked (error echo loop)
Summary
A long-lived session's log (
session.v4.jsonl.zstd) grew to 91 MB. The request body eventually exceeded ~1.8 MB and was silently truncated mid-JSON (ending inside a\uescape). DSH then reported "Failed to parse the request body as JSON". The error text itself was written back into the session log, making the next request larger and failing again — the session became permanently unusable (self-lock), with only a full session reset as a workaround.Environment
0.2.2-rc.3, profiledesktop, Windows 11session.v4.jsonl.zstd: 95,509,660 bytes (91.09 MB), 31,764 zstd framesSymptom
Three consecutive wake-ups failed with identical errors, only the column number increasing:
The column increases by ~25 KB each round — exactly the size of the previous error text appended to the log.
Evidence
.1/.oldrotation files.Root cause (analysis)
Defect 1 (High): silent truncation instead of an explicit rejection
Correct behavior on oversize:
413 Payload Too Large, chunked/streaming transfer, or transport compression. Actual: JSON is cut in half and handed to the parser, which can only say "not valid JSON" — the error points at the caller while the truncator is the culprit. This is diagnostic misdirection.Defect 2 (Critical): error echo → self-lock
On failure there is no rollback/isolation; instead:
One failure can escalate to permanent failure. The user has no way to recover except resetting the session (losing context).
Defect 3 (Medium): no quota/rotation for session logs
Logs are append-only with no size limit; the "context compaction" feature acts on model context and does not rewrite this file.
Open item (honest)
The exact truncation point (DSH HTTP layer / Electron transport / other body limit) was not located in code (app.asar not fully inspected). The observed ~1.8 MB is the truncation position, not a confirmed configured threshold.
Expected behavior
Reproduction
session.v4.jsonl.zstdgrow to ~90 MB (58,889 events, 241 MB decompressed).unexpected end of hex escape.Attachments (available on request)
05-原始会话日志.jsonl.zstd— 91.09 MB, SHA2560C0FC8C678E248FE25A447FA3D12F8A2EAFF55723FDCD7CC9C9775F547EB3A82(too large for GitHub attachment; can provide a truncated sample or reproduction script)06-完整解压.jsonl— 58,889 events, decompression method: 31,764 zstd frames decompressed one-by-one and concatenated (single-shot decompression only yields the first frame)error-lines.txt— the three error messages aboveSource
Reported by a DSH community user on 2026-11-18 and prepared for upstream reporting. The full evidence package (error lines, bridge log, original 91 MB session log sample and decompressed excerpt) can be provided on request.
中文版(备用)
摘要
长会话日志涨到 91 MB 后,请求体在约 1.8 MB 处被静默截断(JSON 停在 \u 转义半截),DSH 报"请求体不是合法 JSON";报错文本又被写回会话日志,导致下一轮更大、再失败,会话永久失效(自锁),只能重置会话恢复。
环境
现象
连续三轮唤醒失败,报错一致、列号递增(1754049 → 1778747 → 1803395,每轮 +~25KB = 上一轮错误文本的体量)。
证据
根因
期望行为
复现
复现样本
91.09 MB 原始日志 SHA256 0C0FC8C678E248FE25A447FA3D12F8A2EAFF55723FDCD7CC9C9775F547EB3A82;解压方式:31,764 帧逐帧解压后拼接(一次性解压只得第一帧)。
来源
DSH 社区用户 2026-11-18 整理;本材料为发布用整理稿。完整证据包(报错原文、桥接日志、91MB 原始日志样本与解压摘录)可按需提供。
All reactions