Repository navigation
h3: single-worker QUIC migration + HEAD/rejected-stream fixes + tests (#59) - #73
Merged
Merged
Conversation
…tats non-zero (#59) 030: setHttp3SocketBufferBytes had zero coverage — default/range/0-accept/locked guard. 031: handshake_completed / h3_init_ok / packets_sent / bytes_sent / datagrams_received were only ever asserted ==0 (008); drive a GET and assert they actually advance.
Read path feeds the datagram's real source into ngtcp2_conn_read_pkt so a migrated / NAT-rebound client is detected; conn->peer is re-pointed to ngtcp2's current path after each read (new quic_path_migrations counter). The drain now sends each GSO batch to the destination ngtcp2 reports in ps.path (flushing on path change) so PATH_CHALLENGE reaches the new path — previously it always went to the stale conn->peer, deadlocking validation. admit_peer keeps per-peer budget accounting keyed on the admission address across a migration. h3client gains H3CLIENT_MIGRATE_AFTER=N (rebind to a fresh source port; the old socket is retired-not-closed to avoid spurious ICMP a real NAT never sends). Test 032 drives a single-conn migration. Single-worker scope; multi-worker needs CID-steering (eBPF), tracked separately. h3 suite 32/32.
…igration shipped (#59) - Deployment section: SO_*BUF needs net.core.{r,w}mem_max raised or the kernel clamps it to ~208 KiB → RcvbufErrors under burst; note the reactor throttle fix. - Migration section: single-worker NAT-rebind migration shipped (27f073c); cross-worker steering (CID + eBPF) remains. - Phase 3 ngtcp2 blocker already recorded (#71).
- http3_stream_submit_response: a HEAD response now omits the body bytes (RFC 9110 §9.3.2), mirroring the H1 path which already suppressed it; the H3 handler path previously emitted the body unconditionally. Test 033. - Test 034: stateless-reset size boundaries — reject inbound <41 (no reply, counter unchanged), reply length = clamp(inbound-1, 22, 1200) incl. the 1200 ceiling. Complements 013's happy path. h3 suite 34/34.
Relocate the sendmsg-errno bucketing out of the static account_send_error in http3_listener.c into a public http3_packet_account_send_error in http3_packet.c (portable errno guards), so it is reachable without the unlinkable listener TU. New tests/unit/http3/ target (cmocka, guarded by a QUIC pkg-config probe) drives: stateless-reset token determinism + HMAC oracle, the reset size gate (refuse <41), and the errno->bucket mapping. One stub (http3_listener_send_packet). h3 phpt suite green; HTTP3Packet unit 4/4.
…#59) A request stream rejected AFTER dispatch (e.g. body-size overflow) left its handler suspended in $request->awaitBody() forever: h3_end_stream_cb skips finalize on a rejected stream, so the body_event never fired, the coroutine never disposed, and its stream-pool slot + HttpRequest wrapper leaked (http3_stream_pool_cleanup live_count!=0 assert in debug; silent slot leak in release). h3_reject_request_stream now finalizes the request body for a dispatched stream, waking the waiter so the coroutine completes and releases. Test 035 (17 MiB POST over a 20 MiB window) is the regression guard; 021 (header-overflow, reject before dispatch) confirms the pre-dispatch path is unaffected. h3 suite 35/35.
Contributor
CoverageTotal lines: 81.02% → 81.28% (+0.26 pp)
❌ Regression in touched files (> 1.0 pp drop)
Add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remaining HTTP/3 "finish-all" work from the #59 roadmap. Single-worker scope; cross-worker migration is tracked separately in #72.
Commits
27f073cQUIC connection migration / NAT rebinding (RFC 9000 §9). Read path feeds ngtcp2 the datagram's real source;conn->peerre-pointed; drain emits onps.path(the key PATH_CHALLENGE fix);admit_peer;quic_path_migrationscounter; h3client gainsH3CLIENT_MIGRATE_AFTER. Test 032.a309ed7docs(h3). Deployment notes (rmem_maxforSO_RCVBUF) + single-worker migration section in the H3 roadmap.ba300f2HEAD body suppression.http3_stream_submit_responsehonours HEAD like H1 (status + headers, no body). Tests 033 + 034 (SR-reset size clamps: reject <41, reply clamped to [22,1200]).0a8cdd7unit harness. cmocka coverage for the purehttp3_packethelpers (SR token/clamp/errno buckets);account_send_errorpromoted to publichttp3_packet_account_send_error.2fcf227rejected-stream slot leak fix. A stream dispatched then rejected leaked a pool slot (awaitBody hung). Finalize the body on reject. Test 035.4c751cftests.setHttp3SocketBufferBytesvalidation + success-path stats non-zero after a GET.Verification (local)
tests/phpt/server/h3: 35/35.tests/phpt/server/h1+h2: 48/48 (no collateral).