Skip to content

Same-epoch resume after a relay loss continues at a later group, not the first frame lacked #6062

Closed

Description

@t0ms

On main f13283b30 with moq-lite 07 on every link, losing a relay between one publisher and its subscribers moves each subscription to the other route without an error, as documented, but the subscription continues at a later group: what was published while the loss was being detected never arrives. doc/concept/moq-lite.md (Same epoch resumes) and the broadcast-epoch quest say it continues from the first frame it lacks.

Setup, one Linux host over loopback: moq import ts into relay O; relays M1 and M2 each --cluster-connect to O; relay E connects to both; two moq export ts on E. Every relay runs --quic-idle-timeout 6s --quic-keep-alive 2s, every process MOQ_CONNECT_VERSION / MOQ_LISTEN_VERSION=moq-lite-07-wip, and every relay logs its sessions as moq-lite-07-wip. SIGKILL the middle relay serving E, then restart it 10 s later.

Observed, 6 of 6 runs (3 at the default --delay, 3 at --delay 10s): no error, no restart and no new subscription at either exporter. Each logs media skipped upstream; resuming at the next group on every track (video skipped=6.62s, others 2.3–7.2 s), and the output's video PTS steps forward 7.02 s with no discontinuity indicator, at the same packet in every run. At --delay 10s the output never stalls, so the exporter's staleness bound is not what drops the frames; they are not delivered. With --passthrough the exporter also stays up, and drops the late objects.

Expected: the move continues from the first frame E lacks. Relay O should still hold those groups (its default 30 s cache, the importer's default 30 s --max-age).

On moq-lite 06 the same loss is a restart that export ts --stitch follows as a marked switch, 8.2 s of programme lost: the 07 path loses about as much, without the mark. Logs and the rig on request.

(Written by Claude Opus 5.5)

Activity

  1. added
    questBeing tracked/planned in a quest. See `quest/`
    on Oct 20, 2026
  2. kixelated commented on Oct 20, 2026

    @kixelated
    Collaborator

    Thanks for the detailed report. It's now tracked by the quest quest/m1/resume-outage.md, planned in #6065.

    Triage (code reading on 5284d969bf):

    • A same-epoch resume already asks upstream for the first group the reader lacks, and a cold relay forwards that start to the origin.
    • Every hop then applies the subscriber's max age. For moq export ts that is --delay / 2. It expires the backlog that built up while the QUIC idle timeout was detecting the dead relay. The lite draft requires this: a resume floor is not a request. So at the default --delay, losing most of the ~6.6 s window is intended.
    • Your --delay 10s result is not explained. The code predicts most of the gap would be recovered at that delay, so this may be a real bug.
    • fix(net): read lower buffered groups across route copies #6019 and fix(net): let resumed subscriber forks follow route swaps #6024 do not touch this path.

    Decision:

    • Keep the max-age semantics.
    • Add a mock-time regression test in moq-net for a resume through an outage that hasn't been detected yet, with a cold alternate route. If moq-net passes, add a consumer test in moq-mux.
    • Fix any bug either test exposes at its source.
    • Correct doc/concept/moq-lite.md, which overclaims "from the first frame it lacks".
    • Shortening the detection window itself is now part of route health, which will fail over before the idle timeout.

    This issue stays open until the quest's PR closes it. Anyone who wants to donate tokens can run /quest-start quest/m1/resume-outage.

    (Written by Claude Opus 5.5)

  3. added a commit that references this issue on Oct 21, 2026
    c58b07a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questBeing tracked/planned in a quest. See `quest/`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions