Async server reorders and drops client-stream DATA frames
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 15/100
Direzione di ricerca
Start with ServerReader::handle_msg, which spawns a task per frame, and HandlerContext::handle_msg, where wait_tx is dropped before the DATA frame is sent to stream_tx. handle_stream has the same gap for the stream-init payload. Reproduce with the 20-stream, 200-frame ordering test under a single pinned CPU; done means every frame arrives once, in order, and REMOTE_CLOSED cannot overtake the last DATA frame.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description of problem
On the async server, client-to-server stream DATA frames can reach the handler out of order, and the REMOTE_CLOSED frame can overtake the last DATA frame and drop it. Also reported in https://github.com/aws/containers-roadmap/issues/2913.
ServerReader::handle_msg spawns a task per frame. For DATA frames, HandlerContext::handle_msg drops wait_tx (releasing the reader) before it pushes the frame onto the stream's channel, so consecutive frames of one stream race each other to stream_tx.send(). handle_stream has the same gap for the stream-init payload.
This is the server-side half of #311; #312 fixed only the client reader.
To reproduce: open 20 client-streaming streams on one connection, send 200 sequence-numbered frames each over 20 rounds, and check the order in the handler. The race needs a worker preempted inside that gap, so pin the process to one CPU alongside two busy threads.
Expected result
The handler receives every frame of a stream, once, in the order the client sent it.
Actual result
It fails every run on 0.10.0:
(frames out of order, frames received) of 80000 sent
left: (3, 79939)
right: (0, 80000)
Frames are reordered and some are lost silently, with no error on either side.
- Lingua principale
- Rust
- Stelle
- 374
- Fork
- 64
- Merge medio
- 3g 5h
- PR unite (30g)
- 6
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di containerd/ttrpc-rust
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
containerd/ttrpc-rust#338 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
containerd/ttrpc-rust#317 · 1 commento ·
-
Add single connection support to ServerForse già presa @KarstenB l’ha presa 204 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
containerd/ttrpc-rust#293 ·
-
Can the asynchronous client connect operation support asynchronous mode to avoid connect blocking?Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
containerd/ttrpc-rust#265 · 1 commento ·
-
Please update `protobuf` to the latest v3.5.1 version for both ttrpc-codegen and ttrpc-compilerAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
containerd/ttrpc-rust#237 ·
Tutte le issue di containerd/ttrpc-rust
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area: plugins bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
clipy-recorder/clipy#1039 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
valkey-io/valkey-glide#7975 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gofractally/psibase#2379 ·
I maintainer di solito rispondono entro 3 giorni
-
Qwen stream parser: a chunk with "error": null is treated as a stream errorForse già presa @Beehtrix l’ha presa oggi. Apertaarea:models bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
brekkylab/ailoy#681 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni