[Bug]: One 5s readiness-probe miss tears down a working SSH tunnel, so a briefly slow remote shows "reconnecting" loops
維護者通常 1 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- node.js, typescript
- 領域
- backend, networking
研究方向
Read packages/ssh/src/tunnel.ts, especially ensureTunnelEntry and the readiness timeout handling. Check how waitForHttpReady distinguishes timeouts from a refused local port and an exited ssh -L process; the linked pull request #39802 is already addressing this issue. Done means a slow, live server keeps its tunnel while a dead tunnel is recreated.
由索引模型根據 Issue 內容生成。
描述
Version: desktop 0.1.11-nightly.20261118.4890. Remote is a Linux VM over SSH whose disk sometimes stalls fsync for tens of seconds.
What happened
The remote environment showed "<host> is reconnecting" every few minutes. Every time, ssh/tunnel.ensureTunnelEntry probed the existing tunnel, got SshReadinessError: Timed out waiting 5000ms for backend readiness, closed the tunnel, and ran the full SSH launch again. The server was alive and unchanged throughout (same pid for the whole period). It was briefly slow, with event-loop stalls of 2–150 s recorded in event-loop-stalls.ndjson.
Cause
In packages/ssh/src/tunnel.ts, ensureTunnelEntry runs one waitForHttpReady with SSH_TUNNEL_READY_PROBE_TIMEOUT_MS = 5_000 against the existing forward. On any failure it deletes the entry and calls closeTunnelEntry, then createTunnelEntry. The new launch hits the same slow server, so it adds SSH round-trips and a second readiness wait instead of helping. It can also fail outright, for example with "still running but did not become ready" or a banner-exchange timeout while the host is stalled.
Expected
A slow but alive server keeps its tunnel. One way to get there:
- Treat a probe timeout as "server slow": keep the forward and retry with backoff.
- Recreate the forward only when the local port is refused or the
ssh -Lprocess has exited, meaning the tunnel itself is dead.
Created with Claude Opus 5.5 in Claude Code.
- 主要語言
- TypeScript
- 星號
- 24.8k
- 分支
- 6.4k
- 平均合併
- 4 小時 29 分鐘
- 30 天內合併 PR
- 488
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
pingdotgg/t3code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
needs more info
難度 2/5 1-3 小時 新手友好度 72/100
pingdotgg/t3code#39400 · 1 則留言 ·
維護者通常 1 天內回覆
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panel可能已有人在做 @iamdatvt94 於 1 天前認領。 未關閉bug needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
bug needs-triage
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆
相似的 Issue
-
area:plugins kind:bug priority:p2 ready
難度 2/5 1-3 小時 新手友好度 90/100
維護者通常 1 天內回覆
-
Escaped `*` followed by `*` (`\**`) never matches可能已有人在做 @bardrop 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 71/100
editorconfig/editorconfig-core-js#172 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
vega/vega-webgpu#40 ·
-
type: bug 🐛
難度 2/5 1-3 小時 新手友好度 63/100
puckeditor/puck#1929 ·
維護者通常 1 天內回覆
-
compression() compresses every response at Brotli quality 11可能已有人在做 @staylor 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆