Early-response RST_STREAM(NO_ERROR) counts toward max_local_error_reset_streams

Aperta Adatta ai principianti
#974 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
80/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

Parti da Actions::send_reset e maybe_cancel nel codice sorgente di h2. Individua dove viene incrementato il contatore locale dei reset dovuti a errori e aggiungi una condizione per saltare il conteggio quando il motivo è NO_ERROR e il percorso di risposta anticipata (is_send_closed() && is_recv_streaming()) è attivo. Aggiungi un test che attivi una risposta anticipata e verifichi che il limite non venga influenzato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Actions::send_reset counts every library-initiated reset toward max_local_error_reset_streams (default 1024), including the RST_STREAM(NO_ERROR) that maybe_cancel sends when a server has fully responded before consuming the request body (RFC 9113 §8.1, the "early response" case the code comment cites). That reset is not an error and is not triggered by peer misbehaviour, but it counts like one.

Observed with a gRPC server (NativeLink, hyper 1.7 / h2 0.4.19, also present in 0.4.20) on a long-lived connection carrying CAS uploads. When a blob already exists, the server answers ByteStream.Write immediately (HEADERS + DATA + trailers with END_STREAM) and drops the request body; h2 then sends RST_STREAM(NO_ERROR). A packet capture of one connection showed 1,637 such NO_ERROR resets plus 903 STREAM_CLOSED, then GOAWAY(ENHANCE_YOUR_CALM, "too_many_internal_resets"), which tore down every in-flight upload on the connection. The client sent no DATA on any already-closed stream, and there was no REFUSED_STREAM or FLOW_CONTROL. The connection was well-behaved; the guard fired only because legitimate early responses accumulated.

Suggestion: do not count Reason::NO_ERROR resets produced by the early-response path (maybe_cancel with is_send_closed() && is_recv_streaming()) toward the local error reset limit, or count them separately. Related: #856, #966.

Lingua principale
Rust
Stelle
1.6k
Fork
406
Merge medio
6h 3m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperium/h2

Tutte le issue di hyperium/h2

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.