[Bug]: SSH reconnect fails for as long as the old remote server is stuck shutting down
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- backend, networking
Direção de pesquisa
Start with the reconnect launch script in packages/ssh/src/tunnel.ts, especially the managed_server_running check and wait_ready path. Trace how the remote server's runtime record and shutdown lifecycle are handled, including the mentioned releaseManagedTunnelOnShutdown path. Run the SSH reconnect tests and add coverage for a live server whose listener has closed; done means reconnect recovers or reports the previous process is still shutting down.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Version: desktop and remote runtime 0.1.11-nightly.20261118.4890. Remote is an arm64 Linux VM reached over SSH.
What happened
The remote t3 serve process received SIGTERM and began shutting down. It closed its HTTP listener, but it could not exit, because one of its worker threads was blocked in an uninterruptible filesystem wait (a slow fsync on the VM). For the next ~22 minutes, every reconnect from the desktop failed with:
Remote T3 server is still running but did not become ready. Retry the connection; the server was left running.
Each retry spent about 70 s inside launchOrReuseRemoteServer before failing. The connection came back only after the old process finally exited.
Cause
In packages/ssh/src/tunnel.ts, the launch script checks managed_server_running "$REMOTE_PID", which tests only kill -0 plus the process's command line. A server that is mid-shutdown passes that check. The script then runs wait_ready, which can never succeed because the listener is closed, and the script exits 1 with "the server was left running". Nothing in the reconnect path can tell "alive but slow" apart from "alive but shutting down", so the desktop retries the same failing path indefinitely.
Observed on the remote during the outage:
- The pid was alive in state
S. Its main thread was inepoll_pwaitand oneWorkerThreadwas inD(wait_for_commit). curl http://127.0.0.1:3773/was refused immediately (no listener).- The trace showed
environment.cloud.releaseManagedTunnelOnShutdownand the rootserver.runServerCommandfibers being interrupted, so teardown had started but not finished.
Expected
The reconnect either recovers or reports what is actually wrong. Options:
- The server marks its runtime record as stopping when teardown begins, and the launcher treats a stopping server as gone: it waits a bounded time, then starts a fresh server or fails with "the previous server (pid N) is still shutting down".
- At minimum, when the port is refused (as opposed to timing out), the launcher should not say the server "did not become ready".
Created with Claude Opus 5.5 in Claude Code.
- Linguagem predominante
- TypeScript
- Estrelas
- 24.8k
- Forks
- 6.4k
- Merge médio
- 4h 29min
- PRs com merge (30d)
- 488
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pingdotgg/t3code
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
needs more info
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
pingdotgg/t3code#39400 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panelTalvez já em andamento @iamdatvt94 assumiu há 1 dia. Abertabug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
Mantenedores costumam responder em até 1 dia
Todas as issues de pingdotgg/t3code
Issues semelhantes
-
area:plugins kind:bug priority:p2 ready
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
Escaped `*` followed by `*` (`\**`) never matchesTalvez já em andamento @bardrop assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 71/100
editorconfig/editorconfig-core-js#172 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
vega/vega-webgpu#40 ·
-
Adjust break point sizingAbertatype: bug 🐛
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
puckeditor/puck#1929 ·
Mantenedores costumam responder em até 1 dia
-
compression() compresses every response at Brotli quality 11Talvez já em andamento @staylor assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia