Skip to content

Conversation

@apapirovski
Copy link
Contributor

@apapirovskiapapirovski commented May 16, 2018

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@apapirovskiapapirovski added the http2 Issues or PRs related to the http2 subsystem. label May 16, 2018
@nodejs-github-botnodejs-github-bot added dont-land-on-v4.x http2 Issues or PRs related to the http2 subsystem. labels May 16, 2018
@apapirovski

This comment has been minimized.

@apapirovski

This comment has been minimized.

@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch from e9b66cb to 717b70cCompareMay 17, 2018 19:04
@apapirovski

This comment has been minimized.

@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch 2 times, most recently from 143e42a to f066642CompareMay 19, 2018 03:37
@apapirovskiapapirovski changed the title http2: don't prematurely destroy the sockethttp2: send GOAWAY properly & don't continue reading unnecessarilyMay 19, 2018
@apapirovski

This comment has been minimized.

@apapirovski
Copy link
ContributorAuthor

@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 --debug-http2 & run NODE_DEBUG=http2 tools/test.py parallel/test-http2-client-upload-reject (or whatever the Windows equivalent is) and post the debug output from any of the failing runs?

@apapirovski
Copy link
ContributorAuthor

Or if anyone knows how to run a build with debug output on CI, that would also be amazing.

@Trott
Copy link
Member

Or if anyone knows how to run a build with debug output on CI, that would also be amazing.

@nodejs/build

@Trott
Copy link
Member

Or if anyone knows how to run a build with debug output on CI, that would also be amazing.

@nodejs/build

@nodejs/testing too

@mcollina
Copy link
Member

I might be able to get the windows output next week, if it's still needed.

@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch from f066642 to c57784dCompareMay 19, 2018 11:18
@apapirovski
Copy link
ContributorAuthor

Took me forever but managed to build Node on FreeBSD. Let's see what it says... :)

@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch 4 times, most recently from b494797 to a37b938CompareMay 20, 2018 04:24
@apapirovski

This comment has been minimized.

@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch from a37b938 to 3d220c7CompareMay 20, 2018 04:46
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.
@apapirovskiapapirovskiforce-pushed the fix-http2-destroy-socket branch from 3d220c7 to 6cfca8aCompareMay 20, 2018 05:02
@apapirovski
Copy link
ContributorAuthor

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.

kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@kjinkjin mentioned this pull request Sep 19, 2018
3 tasks
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
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#20772Fixes: nodejs#20705Fixes: nodejs#20750Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
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: #20772Fixes: #20705Fixes: #20750Fixes: #20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
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: #20772Fixes: #20705Fixes: #20750Fixes: #20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@BethGriggsBethGriggs mentioned this pull request Oct 30, 2018
@lundibundilundibundi mentioned this pull request Dec 8, 2019
4 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http2Issues or PRs related to the http2 subsystem.

Projects

None yet

5 participants

@apapirovski@Trott@mcollina@jasnell@nodejs-github-bot