resume: a route switch after a header-only payload stall never recovers, and hands a held group out past its max age

Abierto
#10,338 2 comentarios 1 reacción 0 asignados Ver en GitHub

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
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Start with rs/moq-net/tests/integration/route_health.rs, especially the payload_stall reproduction and a_standby_recovers_a_payload_stall_within_its_budget from linked PR #10314. Compare the Stall::Headers behavior with the Upstream and Downstream cases, then trace how resume chooses the switch boundary and handles held groups. Done when the reader recovers after a clean switch and held groups past the 2 s max age are cut as Old.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

quest

Problem

When the serving copy holds group headers whose frames never arrive (a header-only payload stall), resume mishandles the next route switch:

  1. A clean switch never recovers the reader. After a header-only stall on M1 -> E, closing that session cleanly leaves E reading nothing for the rest of the run. One group fails as Old, and the subscription neither ends nor resumes on the healthy route M2. The same close after an Upstream or Downstream stall (no headers held) recovers.
  2. A held group is delivered far past its max age. With a route-health standby moving the track to M2 (https://github.com/moq-dev/moq/pull/10314), group 3, whose header the replaced copy held, is handed out about 8 s after its successors, past the reader's 2 s max age, and is never cut as Old.

Reproduction

The first reproduces on main (cbd27de054) with rs/moq-net/tests/integration/route_health.rs's payload_stall diamond (one-second groups, 2 s max age). In payload_stall, replace the stalled write(span.as_secs()).await with:

if matches!(stall, Stall::Headers) && span.as_secs() == 10 {
	write(2).await;
	m1_e.server.abort(Error::Stream(StreamError::Cancel));
	m1_e.client.abort(Error::Stream(StreamError::Cancel));
	write(span.as_secs() - 2).await;
} else {
	write(span.as_secs()).await;
}

Then run payload_stall(Stall::Headers, Duration::from_secs(10)). E observes 0 frames and one Old failure. Stall::Upstream and Stall::Downstream with the same close observe 80 frames.

The second shows in #10314's a_standby_recovers_a_payload_stall_within_its_budget under Stall::Headers: group 3's frames arrive at the end of the run (stamped about 10.5 s after the stall began), while groups 4 to 11 arrive on time.

Suspect

Both involve a replaced copy that holds a group's header and none of its frames. The switch boundary is "the largest group any copy holds", so such a copy raises it, and its header-only groups are left to a copy that will never deliver them. They are then neither recovered from the serving route in time nor cut at the reader's budget.

(Written by Claude Opus 5.5)

Lenguaje dominante
Rust
Estrellas
1.6k
Forks
251
Merge medio
10 h 10 min
PR fusionados (30 d)
822

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de moq-dev/moq

Todos los issues de moq-dev/moq

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.