Replies: 2 comments
|
Verified against rc.7 ( 1. Confirmed at source — no fault tolerance on the list path.
Both propagate up through 2. Correction: your "missing header line" pattern is actually skipped, not fatal — the DoS comes from the frame-shape throws.
This matters for the fix: guarding 3. Your fix design is correct, with two additions.
4. Security framing is valid and worth saying loudly. Any process with user-level write access to 5. Family context. This is the third report of the availability-amplifier branch of the session-corruption family: #1473 (malformed first frame → boot abort, same throw path, verified earlier), #1550 (large/corrupt session → cold-load stall + CLOSE_WAIT pileup), and now #2998 (trivial-DoS framing + truncated-file variant). The enumeration path is the common denominator: |
|
补一组发布版 rc.7 的实际 Web 启动 A/B 结果。该复现无模型、无凭据,并只使用一次性 Harness home。 环境:macOS arm64、Node 25.8.2、
注入文件不是随机字节:它包含一个语法有效的 Zstandard frame,但解压后的 plaintext 在要求“第一帧恰好只有一行 header”的位置包含两行。启动错误匹配: 这说明问题不仅存在于源码 throw path:一个 artifact 的 frame 格式错误会实际阻断发布版 Web 的全部启动。边界也需要保留——该 artifact 是测试主动构造的,不代表正常模型或工具一定会生成同样的损坏。 我赞同本帖的处理方向:枚举 session 时按 artifact 隔离失败并给出明确诊断;若要 quarantine,应先保证原文件可恢复,且用户主动打开该 session 时仍然 fail loud,不能静默删除或伪装成正常会话。 |
Uh oh!
There was an error while loading. Please reload this page.
Title: [Bug] Single corrupted session.jsonl.zstd causes full DoS — no graceful degradation
Body:
Bug Summary
When any single
session.jsonl.zstdfile in~/.dsh/sessions/is corrupted,dsh webfails to start entirely with no fallback or graceful degradation.Related to #2649 (force-kill → corrupt session), but this issue focuses on the missing fault tolerance: one bad session should not kill the entire app.
Error
Error: dsh: plugin tree failed to load: failed to apply loader entry include (cordis:include):
failed to apply loader entry workspace (@deepseek-ai/dsh-workspace):
corrupt Zstandard session log: first frame is not exactly one header line
Stack:
assertZstdHeaderFrame → readFirstZstdLine → listArtifacts → list → [cordis.init]Root Cause
$DSH_HOME/sessions/session.jsonl.zstdis decompressed and its first line must be{"type":"session","version":0,...}Two corruption patterns observed in the wild:
{"type":"assistant/chunk",...}instead of{"type":"session",...}— header was overwritten/truncated while data remains (e.g., 99KB file)Security Impact: Trivial DoS
~/.dsh/sessions/with user-level write permissions.zstdfile to make DSH permanently unbootableSteps to Reproduce
~/.dsh/sessions/session.jsonl.zstdwith arbitrary bytes, or truncate itdsh webSuggested Fix
In
assertZstdHeaderFrame/readFirstZstdLine/listArtifacts:This is how browsers handle corrupted localStorage entries: warn + skip + continue.
Environment
All reactions