-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http2: send GOAWAY properly & don't continue reading unnecessarily #20772
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e9b66cb
to
717b70c
Compare
This comment has been minimized.
This comment has been minimized.
143e42a
to
f066642
Compare
This comment has been minimized.
This comment has been minimized.
@nodejs/http2 @addaleax This PR is mostly getting there in fixing several important bugs in http2 but I'm tripped up on Windows and FreeBSD. Does anyone here have a Windows system handy? If so, could you build it with |
Or if anyone knows how to run a build with debug output on CI, that would also be amazing. |
@nodejs/build |
@nodejs/testing too |
I might be able to get the windows output next week, if it's still needed. |
f066642
to
c57784d
Compare
Took me forever but managed to build Node on FreeBSD. Let's see what it says... :) |
b494797
to
a37b938
Compare
This comment has been minimized.
This comment has been minimized.
a37b938
to
3d220c7
Compare
Currently http2 does not properly submit Goaway frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a Goaway frame, even though it should.
3d220c7
to
6cfca8a
Compare
Ok, we're mostly there. Windows is the only system outstanding and I actually think it's an issue with the two tests, rather than a bug in http2. Long-term I'm planning to do a more significant refactoring of how http2 end/close/destroy flow works but for now this should be good enough. |
Currently http2 does not properly submit GOAWAY frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a GOAWAY frame, even though it should. Edge, IE & Safari are currently unable to handle empty TRAILERS frames despite them being correctly to spec. Instead send an empty DATA frame with END_STREAM flag in those situations. Fix and adjust several flaky and/or incorrect tests. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
It's possible for the connections to take too long and since the server is already unrefed, the process will just exit. Instead adjust the test so that server unref only happens after all sessions have been successfuly established and unrefed. That still tests the same condition but will not fail under load. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently http2 does not properly submit GOAWAY frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a GOAWAY frame, even though it should. Edge, IE & Safari are currently unable to handle empty TRAILERS frames despite them being correctly to spec. Instead send an empty DATA frame with END_STREAM flag in those situations. Fix and adjust several flaky and/or incorrect tests. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
It's possible for the connections to take too long and since the server is already unrefed, the process will just exit. Instead adjust the test so that server unref only happens after all sessions have been successfuly established and unrefed. That still tests the same condition but will not fail under load. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently http2 does not properly submit GOAWAY frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a GOAWAY frame, even though it should. Edge, IE & Safari are currently unable to handle empty TRAILERS frames despite them being correctly to spec. Instead send an empty DATA frame with END_STREAM flag in those situations. Fix and adjust several flaky and/or incorrect tests. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
It's possible for the connections to take too long and since the server is already unrefed, the process will just exit. Instead adjust the test so that server unref only happens after all sessions have been successfuly established and unrefed. That still tests the same condition but will not fail under load. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently http2 does not properly submit GOAWAY frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a GOAWAY frame, even though it should. Edge, IE & Safari are currently unable to handle empty TRAILERS frames despite them being correctly to spec. Instead send an empty DATA frame with END_STREAM flag in those situations. Fix and adjust several flaky and/or incorrect tests. Backport-PR-URL: #22850 PR-URL: #20772 Fixes: #20705 Fixes: #20750 Fixes: #20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
It's possible for the connections to take too long and since the server is already unrefed, the process will just exit. Instead adjust the test so that server unref only happens after all sessions have been successfuly established and unrefed. That still tests the same condition but will not fail under load. Backport-PR-URL: #22850 PR-URL: #20772 Fixes: #20705 Fixes: #20750 Fixes: #20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix an issue where http2 wasn't correctly submitting Goaway frames for the session, as well as handle the case where ECONNRESET occurs after such a Goaway frame is received.
Fixes: #20705
Fixes: #20750
Fixes: #20850
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes