bug(sandbox): scp and sftp stall for 30 s and exit 74 after a successful transfer
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 83/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- rust
- Domaine
- backend, networking, testing
Piste de recherche
Commencez par crates/openshell-sandbox/src/boundary_exec.rs, où la copie du socket de sortie de l’assistant SFTP est conservée, et examinez le chemin de sortie normal de l’assistant ainsi que signal. Lisez ensuite trusted_sftp_helper_round_trips_through_boundary_streams et la gestion du vidage de la sortie dans crates/openshell-sandbox/src/main_session.rs. Le travail est terminé lorsqu’un test unitaire confirme que la sortie de l’assistant atteint EOF après une sortie normale, et que les transferts SFTP et scp de l’issue se terminent avec succès sans l’attente de 30 secondes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Rust
- Étoiles
- 21.5k
- Forks
- 2.1k
- Merge moyen
- 2 j 20 h
- PR mergées (30 j)
- 246
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/OpenShell
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NVIDIA/OpenShell#5638 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failurePeut-être pris @TaylorMutch l’a pris il y a 1 jour. Ouvertestate:accepted state:pr-opened
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NVIDIA/OpenShell#5588 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de NVIDIA/OpenShell
Issues similaires
-
ai_p2
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
ClickHouse/ClickHouse#132519 ·
Les mainteneurs répondent en général sous 1 jour
-
Pattern-clip compiler tests miss the clip cap, sort order, muted output and count/emit agreementOuvertearea: engine type: test
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
YuriiMurha/grooviq#224 ·
Les mainteneurs répondent en général sous 1 jour
-
state:needs triage
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
zed-industries/zed#67109 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug priority: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
storytold/photocraft#15500 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug good first issue language priority/low
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
ZanattaMichael/meridian-core#143 ·
Les mainteneurs répondent en général sous 1 jour