Skip to content

fix(moq-tokio): grant qmux sessions the QUIC stream limit - #5609

Merged
kixelated merged 1 commit into
mainfrom
fix/qmux-max-streams
Oct 15, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/qmux-max-streams

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

qmux grants a peer 100 concurrent streams by default, and moq-tokio uses that default for every qmux transport: the WebSocket fallback, tcp://, tls:// and unix://, on both the dial and accept sides. moq-lite holds a stream open per subscription, so a peer that subscribes to more than about 100 tracks over one of these sessions stalls: every later SUBSCRIBE waits on MAX_STREAMS credit forever, and nothing errors. The same peer over QUIC gets 10,000 (quic::DEFAULT_MAX_STREAMS).

Approach

qmux 0.6.3 lets every builder take a session config (moq-dev/web-transport#426). A crate-private qmux_config() grants quic::DEFAULT_MAX_STREAMS in each direction, and every qmux builder in moq-tokio takes it: ws::{Client, Upgraded} in websocket, tcp::Config and tls::{Client, Server} in tcp, and uds::Config in unix. qmux's own default stays at 100.

The grant is fixed rather than following --quic-max-streams; that setting stays QUIC-only.

Impact

  • Public API: none.
  • Wire: qmux sessions advertise initial_max_streams_* of 10,000 instead of 100, matching QUIC. No new frames or parameters.
  • Dependencies: qmux 0.6.2 to 0.6.3 (the workspace requirement moves to 0.6.3, the first release with the builder config).

Validation

  • tcp::tests::sessions_grant_a_thousand_open_streams dials a moq-tokio TCP listener and has each end open 1,000 bidi and 1,000 uni streams that stay open. Credit is checked with now_or_never, so the test needs no timer. With the old grant it fails: "client stalled on stream credit after opening 100 stream pairs".
  • just check passes locally.

Follow-ups

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

qmux grants a peer 100 concurrent streams by default, and moq-lite holds one
open per subscription, so a WebSocket, tcp://, tls:// or unix:// peer past 100
subscriptions waits on stream credit forever with nothing erroring. Configure
every qmux builder with the same 10,000 streams QUIC grants, through the
session config qmux 0.6.3 added to its builders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a33c23d8-7814-4068-bd4d-ca383da7d9d3
📥 Commits

Reviewing files that changed from the base of the PR and between de6c273 and aad0be1.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 5
  • Cargo.toml
  • rs/moq-tokio/src/lib.rs
  • rs/moq-tokio/src/tcp.rs
  • rs/moq-tokio/src/unix.rs
  • rs/moq-tokio/src/websocket.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T19:53:49.954317Z aad0be1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: aad0be1.

No actionable findings in this repository-scoped review. One private config helper reaches the production WebSocket, TCP, TLS and Unix dial/accept paths, including TLS-name override and upgraded sockets. The TCP regression checks both endpoints' bidi/uni credit while retaining open streams. Sharing the existing QUIC default is simpler than duplicating per-transport constants.

Verification limits: static inspection of moq-dev/moq only. No tests or builds run. High-stream-count regression coverage is TCP-only; other paths were checked by their constructor wiring. The qmux dependency's internal buffering and config-application semantics were outside this review, so the increased transport concurrency is not a complete backend resource/security audit.

@kixelated

Copy link
Copy Markdown
Collaborator Author

The one red check, TS validation, failed video-content ("decoded pictures are not an intact suffix of the source"). The same just test ts passed once locally on this head, neither log shows the WebSocket fallback (the only path this change affects), and the TS workflow passed on every other branch in the same hour. This looks like a flake unrelated to this change, but I have not proven it. I did not re-run CI.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: no code changes from the merge pass.

  • The red TS validation check is the known video-content flake tracked by quest/m1/test-flakes-2/ts-video-content.md (flaky: just test ts loses most of the first video group when it is evicted as Old just after subscribing (4 of 51 CI runs) #5565): it failed in the default just test ts round with "decoded pictures are not an intact suffix of the source", and the capture was 24531556 bytes, the exact size of every failing capture recorded in that quest (one GOP earlier than passing runs). Reran the failed job instead of changing code.
  • Reviews: the OpenAI review and the Codex review of head aad0be1 have no findings.
  • Follow-ups stay as listed in the description: the release backport waits on a qmux 0.5.x with the builder config, and @moq/qmux clients keep qmux's JS default of 100.

Enabling auto-merge on aad0be1.

(Written by Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 258e3bb Oct 15, 2026
13 of 14 checks passed
@kixelated
kixelated deleted the fix/qmux-max-streams branch October 15, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant