ipc (Windows): a server shutdown discards bytes the client has not read (hostd raw terminals may lose the last output)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 69/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend, networking
Línea de trabajo
Start in the Windows implementation of atlas_core::ipc's Stream::Server::poll_shutdown and inspect how it calls NamedPipeServer::disconnect(). Check the Win32 pipe shutdown behavior and add a bounded wait for the client to read the pending bytes or close. Add a cfg(windows) IPC test where a slow client reads all N bytes before EOF; verify it passes, including the existing broken-pipe EOF handling.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What
On Windows, atlas_core::ipc's server end discards data the client has not read yet when it shuts down. Stream::Server::poll_shutdown calls NamedPipeServer::disconnect() (DisconnectNamedPipe), and per the Win32 docs that discards anything still in the pipe buffer unless the server first waits for the client (FlushFileBuffers) or for it to close.
Found while fixing the Windows askpass in #525, where it made the password never arrive (3 tests failed on windows-latest: the helper read nothing).
Where else it can bite
crates/atlas-host/src/server.rs, raw terminal connections (attach_raw loop, around L1470-1483 on main at time of writing): when the PTY ends (rrx closes) the loop breaks and calls w.shutdown().await right after the last write_all. On Windows the last chunk of terminal output before the process exits can be lost for a client that has not read it yet. Not reproduced; found by reading the code.
To check: crates/atlas-desktop/src/ctl.rs:123 and debug.rs:145 write a reply and drop the stream (no explicit shutdown). Whether CloseHandle alone loses unread data was not verified.
Proposed fix
Make the semantics safe in one place instead of at each call site: on Windows, poll_shutdown of a server stream waits until the client has read what was written (or has closed) before disconnecting, with a bound. Test under cfg(windows) in ipc tests: server writes N bytes then shuts down; a slow client still reads all N bytes, then EOF. #525 already maps ERROR_BROKEN_PIPE/ERROR_PIPE_NOT_CONNECTED to EOF on the sync client.
- Lenguaje dominante
- Rust
- Estrellas
- 3
- Forks
- 1
- Merge medio
- 9 h 51 min
- PR fusionados (30 d)
- 310
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 codeatlasdev/atlas
-
type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
codeatlasdev/atlas#597 ·
Los mantenedores suelen responder en 1 día
-
area: ci os: linux type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
codeatlasdev/atlas#496 ·
Los mantenedores suelen responder en 1 día
-
area: ci type: bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
codeatlasdev/atlas#596 ·
Los mantenedores suelen responder en 1 día
-
os: linux type: bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
codeatlasdev/atlas#591 ·
Los mantenedores suelen responder en 1 día
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Abiertoarea: ci os: windows type: bug
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
codeatlasdev/atlas#550 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de codeatlasdev/atlas
Issues similares
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kinqsradio/orbyn-engineering#729 ·
-
Plans page scenario races Shift+Tab against the plan list being drawn again in Firefox and WebKitAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
nledford/Ladderback#1091 ·
Los mantenedores suelen responder en 1 día
-
bug fix packaging ui user-sprint
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Vondor/KassenSturz#1197 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día