bug(sandbox): scp and sftp stall for 30 s and exit 74 after a successful transfer
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 83/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend, networking, testing
Direzione di ricerca
Inizia da crates/openshell-sandbox/src/boundary_exec.rs, dove viene mantenuta la copia del socket di output dell’helper SFTP, e ispeziona il normale percorso di uscita dell’helper insieme a signal. Poi leggi trusted_sftp_helper_round_trips_through_boundary_streams e la gestione dello svuotamento dell’output in crates/openshell-sandbox/src/main_session.rs. Il lavoro è completato quando un test unitario conferma che l’output dell’helper raggiunge EOF dopo una normale uscita e i trasferimenti SFTP e scp dell’issue terminano correttamente senza l’attesa di 30 secondi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Rust
- Stelle
- 21.5k
- Fork
- 2.1k
- Merge medio
- 2g 20h
- PR unite (30g)
- 246
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/OpenShell#5638 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureForse già presa @TaylorMutch l’ha presa 1 giorno fa. Apertastate:accepted state:pr-opened
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/OpenShell#5588 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
ai_p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ClickHouse/ClickHouse#132519 ·
I maintainer di solito rispondono entro 1 giorno
-
Pattern-clip compiler tests miss the clip cap, sort order, muted output and count/emit agreementApertaarea: engine type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
YuriiMurha/grooviq#224 ·
I maintainer di solito rispondono entro 1 giorno
-
state:needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
zed-industries/zed#67109 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
storytold/photocraft#15500 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue language priority/low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ZanattaMichael/meridian-core#143 ·
I maintainer di solito rispondono entro 1 giorno