Skip to content

release 0.17.3: FETCH of a group a live subscription delivered in part stalls after the cached frames (b425d430f, #4922 backport) #5348

Closed

Description

@bgreenway

Problem

On release (moq-relay 0.17.3), a FETCH of a group that a live subscription on the relay delivered only in part, after that subscription has ended, returns the frames the relay cached and then stalls. Frames the publisher writes afterwards never arrive. 0.17.0, 0.17.2 and main deliver them.

Bisected to b425d43, "fix(moq-net): viewer sessions share a front (backport #4922)". Its parent d2fa8a7 behaves correctly, and so does main 5897d91, where the original be8d0bb landed. The release adaptation's commit message says it "also applies the effective horizon to the front pin check", which is the obvious difference from main. We have not established the mechanism.

Reproduction (upstream pieces only)

Relay config: default, plus [auth] public = ["anon/**"] and a self-signed certificate. The publisher is the repo's clock example: one group per minute, one frame per second.

# publisher
cargo run --release -p moq-tokio --example clock -- \
  --connect https://localhost:4463/anon --broadcast clock publish

# viewer A: subscribes, reads the newest group's first frame, exits
G=$(moq --connect https://localhost:4463/anon --broadcast clock fetch --json seconds \
      | head -1 | jq .group)

# viewer B: FETCH that same group by sequence
moq --connect https://localhost:4463/anon --broadcast clock fetch --json --group "$G" seconds | wc -l

TLS flags are omitted above; we used --connect-tls-fingerprint. moq is the CLI 0.14.3 from the same tag.

Relay Viewer B
moqdev/moq-relay:0.17.0 receives frames as the publisher writes them: 35 in 30 s, ended by the CLI's 30 s fetch deadline (rs/moq-cli/src/fetch.rs TIMEOUT)
moqdev/moq-relay:0.17.3 receives the 5 frames cached before viewer A left, then nothing until the deadline

Measurements with video (2 s GOPs, H.264, 31 frames per group)

The same shape, with the newest group of a live video track FETCHed straight after a one-frame subscription:

Relay Complete groups
0.17.0 10 of 10, each within the group's remaining duration
0.17.2 10 of 10
d2fa8a7 (parent) 5 of 5
b425d43 0 of 5: returned 4–28 frames, then stalled
0.17.3 0 of 10
main 5897d91 6 of 6

With a viewer kept subscribed for the whole run, 0.17.3 completes 8 of 8. The trigger is a subscription that ended mid-group.

Not affected (0.17.3, same harness)

  • FETCH of a group the relay forwards upstream to an on-demand origin (Producer::dynamic / GroupRequest::accept): 31 of 31 frames, ~1.1 s.
  • Two viewers FETCHing the same not-yet-cached group, the second joining while it is filled: both complete.
  • A FETCH abandoned mid-group, then the same group FETCHed from a new session: complete.

Impact

Any client that SUBSCRIBEs a track and FETCHes its recent groups, such as live rewind or scrubbing back into the last minute. The relay's HTTP /fetch/{path} with its default group=latest (subscribe, FETCH the newest group, drop the subscriber) has the same shape.

We run 0.17.3 in production for the #4799 memory fix. Our clients never subscribe and FETCH the same track, so we are not blocked. We found this in pre-promotion testing.

Activity

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

    @kixelated
    Collaborator

    Thanks for the bisect. We traced the mechanism, and it isn't the pin check. The backport puts every viewer on one front, so viewer B's FETCH joins viewer A's parked front. When A's subscription ends mid-group, the park's warm copy rebuilds the open group, and nothing writes to it again. FETCH's cache lookup accepts any group that isn't aborted, so B gets the cached frames and then waits until the 30 s linger. main removed the warm copy in #4741 and is unaffected.

    Decision: a release-only fix in which an unfinished group in a warm segment is a cache miss for FETCH, so the FETCH goes upstream. It comes with a regression test, and it ships with the next scheduled 0.17.x rather than a dedicated cut. It is tracked by quest/m1/release-warm-fetch.md, planned in #5358.

    Anyone who wants to donate tokens can run /quest-start quest/m1/release-warm-fetch.

    (Written by Claude Opus 5.5)

  3. kixelated commented on Oct 13, 2026

    @kixelated
    Collaborator

    Fixed on release by #5365 (1c65161), with the guard on main in #5366. Closing by hand because Closes only fires on the default branch.

    (Written by Claude Opus 5.5)

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