ipc (Windows): a server shutdown discards bytes the client has not read (hostd raw terminals may lose the last output)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 69/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- backend, networking
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 3
- Forks
- 1
- Ø Merge
- 9 Std. 51 Min.
- Gemergte PRs (30 T.)
- 310
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codeatlasdev/atlas
-
type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
codeatlasdev/atlas#597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci os: linux type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
codeatlasdev/atlas#496 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#596 ·
Maintainer antworten meist innerhalb von 1 Tag
-
os: linux type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#591 ·
Maintainer antworten meist innerhalb von 1 Tag
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Offenarea: ci os: windows type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
codeatlasdev/atlas#550 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codeatlasdev/atlas
Ähnliche Issues
-
<input type="number"> misses text-entry leaf sizing in layoutEvtl. vergeben @GoCoder7 hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
DioxusLabs/blitz#1675 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: NP 管理器文件编辑器里删除键无效Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
metasequoiaime/msime#11666 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
camunda/orchestration-cluster-api-rust#179 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug drawings help wanted ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
userFRM/egui-charts#3479 ·
Maintainer antworten meist innerhalb von 1 Tag