-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Stuck Session Recovery 机制双重失效 + Session 预处理每次耗时过长 #76038
Copy link
Copy link
Closed as not planned
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug 报告
🔴 核心 Bug:Stuck Session Recovery 机制双重失效
问题描述:
Session 长时间停留在 `processing` 状态,事件循环完全阻塞,导致 Gateway 无响应,最终被 systemd 超时强杀。
两种情况均不恢复(根因):
情况 A — 有活跃工作时:
```
stuck session recovery skipped: reason=active_reply_work action=keep_lane
age=289s, 385s... 持续多分钟,系统选择"保持 lane 占用"不处理
```
情况 B — 无活跃工作时:
```
stuck session recovery no-op: reason=no_active_work action=none
lane=session:agent:main:main
系统什么都不做(action=none)
```
结果:无论哪种情况,系统都不执行真正恢复操作。Session 卡住直到 systemd 超时强杀。
触发频率:全天多次 SIGKILL,最长卡死 385 秒。
🔴 Session 预处理每次都极慢(176-307 秒)
问题描述:用户每次发消息,session 预处理耗时高达 3-5 分钟,体验极差。
实测数据(多次记录):
每次固定耗时拆解:
核心问题:这些阶段每次都重复执行,没有缓存机制,导致用户每次发消息都要等 3-5 分钟才能得到首个回复。
🔴 问题三:4.29 升级导致配置丢失
触发场景:从 4.27 升级到 4.29 后,systemd override.conf 配置出现问题。
表现:
建议:升级流程中保留用户自定义配置,避免覆盖 systemd override 文件。
建议修复方向
环境信息