[Bug] Manual /compact aborts after 5–15s with "DeepSeek request aborted by caller" — 22/23 attempts fail (rc.7 & rc.8)
#3542
Replies: 4 comments
|
这类"启动后固定 5-15 秒被 caller 中止"的模式,和我们核验过的 compaction 专用链路缺陷 #1944 高度吻合: |
|
I turned this report into a source-backed cancellation-chain runbook and kept the lifecycle conclusion deliberately narrower than the hypothesis. The durable event sequence plus the DeepSeek adapter establishes that the summarization options signal was aborted, but the Remote install token remains a candidate owner until its exact generation is observed disposing during the same command. The runbook adds first-abort reason instrumentation, command/compaction identity joins, a one-attempt Web-versus-non-Web A/B matrix, and a safe continuity path that avoids repeated potentially billable summary attempts: https://sandbaseai.github.io/deepseek-harness-handbook/manual-compaction-aborted.html Canonical incident bundle and regression gates: A repair should make the accepted call lifetime stable without removing authentic user or Host cancellation. |
|
Thanks to @zoahdev and @denial123789 for the replies — both shaped this investigation.
Root causeThe abort is not a compaction-parameter problem, not an api-gateway token lifecycle race, not a proxy, and not a plugin. It is Firefox reaping idle HTTP keep-alive connections.
The abort path, confirmed by instrumentation: Evidence
The single success (14:59:45 → 15:00:25) completed between two reaping bursts; it was luck, not a configuration difference. Suggested fixThe client cannot be made to stop reaping connections, so dsh should treat a transient connection loss as recoverable:
Workarounds until the fix
Environment
Diagnostic methodSocket lifecycle events ( |
|
收到,也感谢把排查闭环做得这么扎实。你给出的 Chrome/Firefox A/B、socket END/DESTROY 栈和 writableEnded 统计已经把故障定位到 Firefox 对长连接的回收;这组直接证据推翻了我之前关于 compaction 请求参数/路由头的假设,应以你现在的 transport-layer 根因为准。#1944 的 header 继承问题仍是独立缺陷,但不应再被用来解释本讨论中的固定中止。建议后续修复也保持你提出的边界:区分显式用户取消与连接被动断开,并确保重试/续跑是幂等且不会造成重复计费。 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Running
/compactmanually on an idle agent almost always fails. The compaction starts, then ~5–15 seconds later the command is aborted withThis operation was abortedand the compaction ends withDeepSeek request aborted by caller. 23 attempts across rc.7 and rc.8, 22 failures, 1 success. This is not a network, proxy, or user-cancellation issue — it appears to be a framework-level abort during the summarization LLM stream.Environment
http://127.0.0.1:3080@deepseek-ai/dsh@0.1.0-rc.7(initial) and0.1.0-rc.8— reproduced on bothcordisdeepseek-official/deepseek-v4-flash, reasoningEfforthighSteps to reproduce
turn/endlogged)./compact(no arguments) — either via the UI command or the command channel.compaction/startis appended, then after ~5–15 s the command aborts.Expected behavior
/compactruns the summarization LLM stream to completion and replaces the selected history with a checkpoint summary (the one successful run took 31 s end-to-end and worked).Actual behavior
From the session log (event stream, seq order shown):
Attempt log (all manual, user-triggered):
Total: 23 attempts across rc.7 and rc.8, 22 aborted, 1 success.
Root-cause analysis (from code + runtime checks)
The summarization stream is created in
dsh-compaction-basiccompactNow():and the DeepSeek adapter (
dsh-llm-deepseek) throws exactly this error when the caller signal is aborted:So the failure is an ABORTED (caller signal aborted), not:
TIMEOUT, reasonLLM_STREAM_IDLE_TIMEOUT),[DONE](STREAM_CLOSED),abortError(signal)would carry a reason; heresignal.reasonis empty → "This operation was aborted"),compaction/startproves the lock was acquired).The command's cancellation signal originates in
dsh-api-gatewayinvoke():For
/compactno caller signal is passed, so the signal is the Remote install token's abort signal (token.abort.signal). That token is aborted only when the Remote service is installed/disposed (install()/ its returned disposer). With zero session activity, no cancel events, no inbox changes, and a stable WebSocket events stream (verified 30 s stable), the only plausible abort source is that install token being disposed/remounted mid-compaction — a lifecycle race in the RPC layer, not a user/network condition.What I verified (to rule out environment causes)
setGlobalDispatcher/proxy agent indsh-llm-deepseek)./goal) return in 0.2 s via the same/api/commands/executepath./api/events.muxstayed open 30 s with no drops.Suggested investigation
token.abort.signal) for long-running commands: is anything disposing/re-installing thecommandsservice (or its containing scope) while a command is in flight?agentSignalonly, or scope the token to the call rather than the install).Impact
Manual context compaction is effectively unusable (95% failure rate); users must retry many times or work around it. Automatic pressure/overflow compaction may be affected too.
All reactions