Repository navigation
fix(h3): defer a drain requested from inside ngtcp2's packet read (#428) - #429
Merged
Merged
Conversation
Contributor
CoverageTotal lines: 85.89% → 85.92% (+0.03 pp)
|
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.
Fixes #428.
A static or
sendFile()response on HTTP/3 finishes when nghttp3 closes its stream, which happens insidengtcp2_conn_read_pktwhile an ACK is processed. The dispose tail then calledhttp3_connection_drain_out→ngtcp2_conn_writev_stream, whichngtcp2.hforbids from a callback, and could re-enter a drain in progress.http3_connection_t.in_read_pktis set around the onengtcp2_conn_read_pktcall.http3_connection_drain_outcalled while it is set marks the connection (http3_listener_mark_flush+http3_listener_request_flush) and returns; the read path flushes it after the datagram. Inside a poll tick or a reactor drain the request only links the listener, soh3/101andh3/102still read 0 flush wakes.ngtcp2_conn_write_connection_close.Evidence (ZTS DEBUG, local): with only the assertion, 9 h3 tests fail (
039,052,053,054,090,091,099,101,102); with the deferral, full phpt 629 passed, 2 skipped, 0 failed; cmocka 24 of 24.Also:
dev/PLAN.mdcloses stage S6 (#412) and queues #428 and #426.