Skip to content

Fix HTTP/3 large body handling - #385

Merged
bneradt merged 1 commit into
yahoo:masterfrom
bneradt:pv-h3-flow-control
May 29, 2026
Merged

bneradt merged 1 commit into
yahoo:masterfrom
bneradt:pv-h3-flow-control

Conversation

@bneradt

@bneradt bneradt commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Large HTTP/3 replay bodies could stall after the initial send or receive
windows were exhausted. Proxy Verifier consumed DATA but did not
consistently drive QUIC flow-control, pacing, and timer work back into
the egress path, so high-volume requests or responses could stop until
the replay timed out.

This returns consumed DATA credit to ngtcp2, treats QUIC timer wakeups
separately from application read timeouts, resumes egress after ACKs
drain the socket, and uses ngtcp2's nanosecond duration units for
handshake and idle timers. This also updates the package version to
3.1.3 for the release that carries the fix.

This expands the HTTP/3 AuTest to a 300 KB request and response body and
compares small filtered transcripts instead of volatile, body-heavy
async logs. That keeps the regression precise without making gold
comparison expensive.

Copilot AI review requested due to automatic review settings May 29, 2026 04:02
@bneradt bneradt self-assigned this May 29, 2026
@bneradt bneradt added the bug Something isn't working label May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes HTTP/3 response stalls in Proxy Verifier by restoring QUIC flow-control credit when HTTP/3 DATA payload bytes are consumed by the application, ensuring large responses continue progressing beyond the initial receive window.

Changes:

  • Pass conn_user_data into the HTTP/3 DATA receive callback and recover the H3Session*.
  • Extend QUIC stream- and connection-level receive windows by the consumed DATA payload size (buflen) after appending it to the response body.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bneradt
bneradt force-pushed the pv-h3-flow-control branch 3 times, most recently from 77e9031 to dad8168 Compare May 29, 2026 18:27
@bneradt bneradt changed the title Restore HTTP/3 DATA receive credit Fix HTTP/3 large body handling May 29, 2026
Large HTTP/3 replay bodies could stall after the initial send or receive
windows were exhausted. Proxy Verifier consumed DATA but did not
consistently drive QUIC flow-control, pacing, and timer work back into
the egress path, so high-volume requests or responses could stop until
the replay timed out.

This returns consumed DATA credit to ngtcp2, treats QUIC timer wakeups
separately from application read timeouts, resumes egress after ACKs
drain the socket, and uses ngtcp2's nanosecond duration units for
handshake and idle timers. This also updates the package version to
3.1.3 for the release that carries the fix.

This expands the HTTP/3 AuTest to a 300 KB request and response body and
compares small filtered transcripts instead of volatile, body-heavy
async logs. That keeps the regression precise without making gold
comparison expensive.
@bneradt
bneradt force-pushed the pv-h3-flow-control branch from dad8168 to ff8f716 Compare May 29, 2026 19:17
@bneradt
bneradt merged commit 6c42199 into yahoo:master May 29, 2026
@bneradt
bneradt deleted the pv-h3-flow-control branch May 29, 2026 19:17
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request May 29, 2026
HTTP/3 over the quiche/BoringSSL path could stall or tear down under
larger request and response bodies. Proxy Verifier now has coverage for
body sizes that exceed initial flow-control windows, which exposed ATS
leaving UDP bursts unread and consuming stream write data before quiche
accepted it.

This keeps QUIC stream write buffers pending until quiche reports bytes
accepted, schedules packet writes when stream state changes, and keeps
H3 transactions alive until request and response cleanup is safe. This
also drains recvmmsg batches on edge-triggered UDP sockets so large
bursts do not wait for an event that may never arrive.

This adds replay coverage for H3 curl and Proxy Verifier scenarios,
including multiple connections, large GET and POST bodies, and timeout
and lifetime cleanup cases. The large-body Proxy Verifier test depends
on yahoo/proxy-verifier#385.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants