bug(sandbox): scp and sftp stall for 30 s and exit 74 after a successful transfer
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 83/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- backend, networking, testing
調査の方向性
SFTP ヘルパーの出力ソケットのコピーが保持されている crates/openshell-sandbox/src/boundary_exec.rs から始め、signal と併せてヘルパーの通常終了経路を調べます。次に trusted_sftp_helper_round_trips_through_boundary_streams と、crates/openshell-sandbox/src/main_session.rs にある出力のドレイン処理を読みます。通常終了後にヘルパーの出力が EOF に達することを単体テストで確認し、issue の SFTP および scp 転送が 30 秒の停止なしに正常に完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
User Story
I ran a mini scale test of OpenShell on Kubernetes. Plain ssh into a sandbox worked, but every scp and sftp transfer stalled for about 30 seconds and then failed with exit code 74. I need SFTP to work so file copy tools and editors like VS Code Remote can use a sandbox.
Problem Statement
An SFTP session (from scp, sftp, or VS Code Remote) finishes its work, then hangs for about 30 seconds and fails with:
openshell: exec output could not be delivered intact
The exit code is 74, even when the file was copied correctly.
Why This Happens
The supervisor hands the sftp subsystem to a helper built into the sandbox runtime. When the helper finishes, OpenShell waits for the helper's output stream to close before it reports the exit status.
The output stream never closes. The helper keeps a second copy of its output socket so it can be cancelled later (boundary_exec.rs). That copy is only closed when the helper is killed (signal), not when it exits normally. Because one copy is still open, the reader never sees end-of-file.
After 30 seconds the runtime gives up waiting (REMOTE_OUTPUT_DRAIN_TIMEOUT), marks the output as lost, and returns 74.
I confirmed this with a unit test on main (624aceea3). The test runs a real SFTP session through the helper and closes it. The helper exits 0, but its output never closes. Closing the extra socket copy when the helper exits makes the test pass. The existing test trusted_sftp_helper_round_trips_through_boundary_streams misses this because it checks only the exit status, not end-of-file on the output.
Impact / Why This Matters
scp,sftp, and anything built on SFTP (such as VS Code Remote) fail or hang against every sandbox.- Scripts treat the transfer as failed because of exit code 74, even when the file arrived.
- The workaround is
openshell sandbox uploadandopenshell sandbox download, which don't use SFTP. They don't help tools that expect plain SSH file transfer.scp -O(legacy mode) doesn't help either, because sandbox images usually have noscpbinary.
Acceptance Criteria
-
scpandsftpto a sandbox exit 0 as soon as the transfer finishes, with no 30-second stall. - A unit test checks that the SFTP helper's output reaches end-of-file after a normal exit.
Reproduction Steps
- Create a sandbox:
openshell sandbox create --name mybox - Add its SSH config:
openshell sandbox ssh-config mybox >> ~/.ssh/config - Copy a file:
time scp ./somefile openshell-mybox.default:/tmp/ - The command hangs for about 30 seconds and exits 74 with "exec output could not be delivered intact".
Environment
- OpenShell: mini scale test build; code path confirmed on
mainat 624aceea3 - Deployment: Kubernetes (Helm), shared supervisor pool
- 主要言語
- Rust
- スター
- 21.5k
- フォーク
- 2.1k
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 246
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/OpenShell#5638 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failure対応中かも @TaylorMutch が 1 日前に担当しました。 オープンstate:accepted state:pr-opened
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/OpenShell#5588 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
ai_p2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ClickHouse/ClickHouse#132519 ·
メンテナーはふだん 1 日以内に返信
-
Pattern-clip compiler tests miss the clip cap, sort order, muted output and count/emit agreementオープンarea: engine type: test
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
YuriiMurha/grooviq#224 ·
メンテナーはふだん 1 日以内に返信
-
state:needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
zed-industries/zed#67109 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
storytold/photocraft#15500 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue language priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ZanattaMichael/meridian-core#143 ·
メンテナーはふだん 1 日以内に返信