[Bug]: Durable SSH terminal remains falsely Attached and non-interactive after RPC stream timeout
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go, typescript
- Área
- backend, frontend, networking
Línea de trabajo
Start by tracing pkg/jobmanager/mainserverconn.go and pkg/wshutil/wshrpc.go from SendData through timeout handling, then compare the connected-state logic in frontend/app/block/durable-session-flyover.tsx. Use the listed durable SSH timeout sequence and inspect frontend/app/view/term/term-model.ts with pkg/blockcontroller/durableshellcontroller.go; done means a failed stream cannot remain Attached, recovery reconnects without terminating the durable session, and Force Restart matches its documented effect.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current Behavior
A durable SSH terminal intermittently becomes completely non-interactive:
- Terminal output stops updating.
- Keyboard input has no effect.
- The shield continues to show Durable Session (Attached).
- Wave reports the SSH connection as connected.
- The remote shell and foreground application remain healthy.
- Fully quitting and reopening Wave successfully reattaches to the original session and restores interactivity.
In the captured occurrence, a Codex process was running in the terminal. After the Wave block stopped responding, Codex continued working remotely and completed its task. The original processes remained alive:
PID 1964 wsh jobmanager
PID 1973 bash
PID 3100 codex
After restarting Wave, the same PIDs were preserved and the existing session became responsive again.
The remote durable-session log recorded:
2026/07/20 16:09:19 SendData: error sending stream data: timeout sending request
Wave did not mark the job disconnected after this error. The shield remained Attached and automatic reconnection did not occur.
When Wave was restarted, the remote log showed:
2026/07/20 18:57:45 AuthenticateToJobManager: authentication successful
2026/07/20 18:57:45 SetAttachedClient: kicking out existing client
2026/07/20 18:57:45 connectToStreamHelper: disconnecting existing client
2026/07/20 18:57:45 connectToStreamHelper: detached old stream id=cf519bf0-ae5e-4a93-9119-53c63534e019
2026/07/20 18:57:45 PrepareConnect: streamid=b21b548f-887d-4e49-8d3d-025521da369c clientSeq=19863439 serverSeq=19863439 streamDone=false streamError="" hasExited=false
2026/07/20 18:57:45 StartStream: streamid=b21b548f-887d-4e49-8d3d-025521da369c rwnd=65536 streaming started
clientSeq and serverSeq were identical and totalGap=0 in the local Wave log, indicating the backend had the complete terminal stream even though the terminal block was frozen.
There was an earlier local WebSocket timeout for the exact tab and block:
2026-07-20 15:35:21.507 [websocket] WritePump error
write tcp 127.0.0.1:45359->127.0.0.1:33439: i/o timeout
wshrouter unbind route "feblock:777680bf-221f-4bba-9cb3-5689b245b1f3"
wshrouter unregister link 6#[ws:tab:9c4d3ecd-3fda-4dd1-99bc-dc1aa0879e74]
Wave immediately created another WebSocket link and rebound the block, but the terminal later became unresponsive.
Similar remote SendData: timeout sending request errors occurred on July 15, July 19, and twice on July 20 across durable sessions.
Expected Behavior
When the durable job's RPC or stream path stops accepting data:
- Wave should mark the durable job Detached or Stalled.
- The shield should not continue showing Attached.
- Wave should close the stale route and automatically reconnect to the existing job manager.
- Output and input health should be checked end-to-end rather than relying only on route registration.
- Recovery should not require restarting the entire Wave application.
Steps To Reproduce
The failure is intermittent:
- Run Wave v0.14.5 on Windows.
- Open an SSH terminal to a Linux host.
- Enable Durable Session.
- Run a long-lived interactive TUI that produces sustained output, such as Codex CLI.
- Leave the session running for several hours.
- Eventually, the terminal may stop updating and accepting input.
- Observe that the shield still says Durable Session (Attached) and the SSH connection still says connected.
- Verify from another SSH session that the remote shell/application remains alive.
- Fully quit and reopen Wave.
- Observe that Wave reattaches to the original shell and application and the terminal becomes responsive.
Environment details
Wave Version: v0.14.5 (build 202604161539), Electron 41.1.0, remote wsh v0.14.5
Platform: Windows x64
Remote SSH host: Linux 6.8.0-136-generic x86_64
Additional investigation
The v0.14.5 source appears to explain why the state remains falsely Attached.
routedDataSender.SendData logs and ignores errors.
The RPC enqueue times out after five seconds.
The frontend displays Attached solely when the stored job status is connected.
The observed sequence suggests:
- The job manager's bounded outbound channel or downstream Unix-socket writer stopped draining.
SendDatatimed out.- The error was logged but did not close the stale connection.
- No route-down event was generated.
- The job status remained
connected, leaving the shield falsely Attached. - Restarting Wave rebuilt the router and reconnected the original job successfully.
There is also a related recovery problem: the documentation recommends Advanced -> Force Restart Controller for a session that will not reconnect, but in v0.14.5 that action destroys the controller. Destroying a durable controller calls TerminateAndDetachJob.
In practice, Force Restart Controller terminates the preserved session and opens a new bash shell. This should either reconnect non-destructively or be labeled as terminating the existing session.
Full logs are available, but the raw waveapp.log contains Wave routing tokens and would need to be redacted before attachment.
- Lenguaje dominante
- Go
- Estrellas
- 22.3k
- Forks
- 1.1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wavetermdev/waveterm
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
wavetermdev/waveterm#3481 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wavetermdev/waveterm#3435 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
wavetermdev/waveterm#3432 ·
-
enhancement triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
wavetermdev/waveterm#3431 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
wavetermdev/waveterm#3428 ·
Todos los issues de wavetermdev/waveterm
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
crossplane/crossplane#7859 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bazel-contrib/rules_go#4721 · 2 comentarios ·
-
needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
bug carvel-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
carvel-dev/kapp-controller#1861 ·
-
area/logging kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100