GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — quic: fix h3 session close on early stream destroy by Ethan-Arrowood · Pull Request #67446 · nodejs/node Conversation
Contributor
If the stream is destroyed right after sendHeaders(), nghttp3 still has the response headers queued. On the next write it asks for the removed stream's body, the read callback fails, and the whole session closes without notifying the peer. In an HTTP/3 session, before clearing nghttp3's pointer to a stream when the stream is destroyed, shut down nghttp3's writes for that stream so that other requests can continue to complete. This PR adds regression tests to cover the issue. Discovered this while reviewing #66007, which adds AI-assisted (Claude Opus 5.5, my setup). The words are my own, per the Human Voice policy.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsIf the stream is destroyed right after sendHeaders(), nghttp3 still has the response headers queued. On the next write it asks for the removed stream's body, the read callback fails, and the whole session closes without notifying the peer. In an HTTP/3 session, before clearing nghttp3's pointer to a stream when the stream is destroyed, shut down nghttp3's writes for that stream so that other requests can continue to complete. Assisted-by: Claude Opus 5.5 <[email protected]> Signed-off-by: Ethan Arrowood <[email protected]>
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #67446 +/- ## ========================================== - Coverage 90.68% 90.68% -0.01% ========================================== Files 801 801 Lines 281889 281889 Branches 54318 54319 +1 ========================================== - Hits 255645 255641 -4 - Misses 16358 16360 +2 - Partials 9886 9888 +2 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Commit Queue failedThe pull request was removed from the Commit Queue and labeled
commit-queue-failed
Full Commit Queue output |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 88b034f |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If the stream is destroyed right after sendHeaders(), nghttp3 still has the response headers queued. On the next write it asks for the removed stream's body, the read callback fails, and the whole session closes without notifying the peer. In an HTTP/3 session, before clearing nghttp3's pointer to a stream when the stream is destroyed, shut down nghttp3's writes for that stream so that other requests can continue to complete. Assisted-by: Claude Opus 5.5 <[email protected]> Signed-off-by: Ethan Arrowood <[email protected]> PR-URL: #67446 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tim Perry <[email protected]>
|
Sorry, that I comment on a closed PR, but I rebased my yesterday my webtransport PR and it showed that webtransport close capsules are not sent. (These are scheduled right before the session stream is closed). I found the reason here: it prevents already scheduled data in a stream to be sent, including the session close capsule in case of webtransport. That is just my first feedback, I will try to understand why this was added and comeback later. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This fixes the fix from the PR nodejs#67446. The previous PR did not allow already submitted data, such as a Webtransport close capsule to be transmitted to ngtcp2. This PR instead uses the nullptr reader, to detect a closed stream and signals eof. This is of course only an intermediate solution, instead quic RESET_AT semantics are a far better solution. Signed-off-by: Marten Richter <[email protected]>
This fixes the fix from the PR nodejs#67446. The previous PR did not allow already submitted data, such as a Webtransport close capsule to be transmitted to ngtcp2. This PR instead uses the nullptr reader, to detect a closed stream and signals eof. This is of course only an intermediate solution, instead quic RESET_AT semantics are a far better solution. Signed-off-by: Marten Richter <[email protected]>
This fixes the fix from the PR nodejs#67446. The previous PR did not allow already submitted data, such as a Webtransport close capsule to be transmitted to ngtcp2. This PR instead uses the nullptr reader, to detect a closed stream and signals eof. This is of course only an intermediate solution, instead quic RESET_AT semantics are a far better solution. Signed-off-by: Marten Richter <[email protected]>
This fixes the fix from the PR #67446. The previous PR did not allow already submitted data, such as a Webtransport close capsule to be transmitted to ngtcp2. This PR instead uses the nullptr reader, to detect a closed stream and signals eof. This is of course only an intermediate solution, instead quic RESET_AT semantics are a far better solution. Signed-off-by: Marten Richter <[email protected]> PR-URL: #67706 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
If the stream is destroyed right after sendHeaders(), nghttp3 still has the response headers queued. On the next write it asks for the removed stream's body, the read callback fails, and the whole session closes without notifying the peer. In an HTTP/3 session, before clearing nghttp3's pointer to a stream when the stream is destroyed, shut down nghttp3's writes for that stream so that other requests can continue to complete. Assisted-by: Claude Opus 5.5 <[email protected]> Signed-off-by: Ethan Arrowood <[email protected]> PR-URL: nodejs#67446 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tim Perry <[email protected]>
This fixes the fix from the PR nodejs#67446. The previous PR did not allow already submitted data, such as a Webtransport close capsule to be transmitted to ngtcp2. This PR instead uses the nullptr reader, to detect a closed stream and signals eof. This is of course only an intermediate solution, instead quic RESET_AT semantics are a far better solution. Signed-off-by: Marten Richter <[email protected]> PR-URL: nodejs#67706 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.