Skip to content

A group that beats its SUBSCRIBE_OK on a reused track alias is dropped #8044

Closed

Description

@michaelstuurman

Problem
After the relay cancels a moq-transport subscription, its alias stays Alias::Retired so late groups are discarded quickly (ietf/subscriber.rs). The tombstone is only evicted by count (RETIRED_ALIAS_CAPACITY), so on a quiet session it outlives the round trip it is meant for. If a later SUBSCRIBE for the same track gets the same alias back and its first group arrives before the SUBSCRIBE_OK, ResolveAlias drops that group as a straggler. For a one-group catalog the new copy then waits forever.

Seen with moq-relay (#8041 applied) and openmoq/moqxr v0.4.15, drafts 18 and 22. moqxr answers every SUBSCRIBE with track alias 0. The third catalog fetch in a row hung in 2 of 3 runs. The log shows dropping group for a cancelled subscription track_alias=0 just before received subscribe ok ... track_alias: 0.

Spec

  • Draft 18 §11.1 forbids one alias for two different tracks at the same time, and asks subscribers to keep enough state to discard objects that arrive after a cancel. It does not forbid reusing an alias for the same track later.
  • Draft 22 §3.1.3 (unchanged in draft 23) discourages reuse only for a different track. For concurrent subscriptions to the same track, it names this race ("missed delivery if objects for the new subscription arrive before the control message establishing the shared Alias") and lets the subscriber assume the alias is reused.

So moqxr's reuse is allowed, and the tombstone has to give way to a new subscription for the same track.

Options

  1. A retired alias remembers its track. While a SUBSCRIBE for that same track is unanswered, a group on the alias waits for the answer, as on Alias::Resuming. The same alias delivers it; another alias or an error drops it.
  2. Every retired alias waits while any SUBSCRIBE on the session is unanswered. Less code, but stragglers are held longer on a busy relay.

Which shape do you prefer? I can make it a PR.

(Written with Claude Opus 5.5)

Activity

  1. coderabbitai commented on Nov 6, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #6843 - refactor(net)!: Path and Relative lose their lifetime [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    questBeing tracked/planned in a quest. See `quest/`
    on Nov 10, 2026
  3. kixelated commented on Nov 10, 2026

    @kixelated
    Collaborator

    Thanks for the detailed report and the spec references. Planned as quest/m1/ietf-alias-reuse.md in moq-dev/moq#8415.

    Decision: a variant of your option 1 without the waiting. Alias::Retired records its track, and sending a SUBSCRIBE for that track removes its tombstone. An early group on the reused alias then takes the existing unknown-alias wait (TRACK_ALIAS_TIMEOUT) until the SUBSCRIBE_OK maps it. This needs no unanswered-request bookkeeping, and stragglers on other tracks' tombstones are still dropped immediately. Rejected: clearing every tombstone on any SUBSCRIBE, which brings back the wait and warning that #2993 removed, and your options 1 and 2, which both need to track unanswered SUBSCRIBEs.

    Your PR is welcome. Run /quest-start quest/m1/ietf-alias-reuse to claim it, or open a PR from the quest/m1/ietf-alias-reuse branch. The quest's PR will close this issue.

    (Written by Opus 5.5 with high)

  4. added a commit that references this issue on Nov 11, 2026
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