GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http2: send GOAWAY properly & don't continue reading unnecessarily by apapirovski · Pull Request #20772 · nodejs/node

Conversation

@apapirovski

@apapirovski apapirovski commented May 16, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss, benjamingr, sebdeckers, syuilo, and webcarrot reacted with thumbs up emoji
All reactions
  • 👍 5 reactions
@apapirovski apapirovski added the http2 Issues and PRs related to the http2 subsystem. label May 16, 2018
@nodejs-github-bot nodejs-github-bot added dont-land-on-v4.x http2 Issues and PRs related to the http2 subsystem. labels May 16, 2018
@apapirovski

This comment has been minimized.

Sign in to view
@apapirovski

This comment has been minimized.

Sign in to view
@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch from e9b66cb to 717b70c Compare May 17, 2018 19:04
@apapirovski

This comment has been minimized.

Sign in to view
@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch 2 times, most recently from 143e42a to f066642 Compare May 19, 2018 03:37
@apapirovski apapirovski changed the title http2: don't prematurely destroy the socket http2: send GOAWAY properly & don't continue reading unnecessarily May 19, 2018
@apapirovski

This comment has been minimized.

Sign in to view
@apapirovski

apapirovski commented May 19, 2018

Copy link
Copy Markdown
Contributor Author

@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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented May 19, 2018

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced May 19, 2018
Revert "http2: fix end without read" #20832
Closed
Flaky parallel/test-http2-client-upload-reject #20808
Closed
@Trott

Trott commented May 19, 2018

Copy link
Copy Markdown
Member

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

@nodejs/build

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented May 19, 2018

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented May 19, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch from f066642 to c57784d Compare May 19, 2018 11:18
@apapirovski

apapirovski commented May 19, 2018

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch 4 times, most recently from b494797 to a37b938 Compare May 20, 2018 04:24
@apapirovski

This comment has been minimized.

Sign in to view
@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch from a37b938 to 3d220c7 Compare May 20, 2018 04:46
@apapirovski
http2: submit Goaway frames & handle ECONNRESET
6cfca8a
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.
@apapirovski
apapirovski force-pushed the fix-http2-destroy-socket branch from 3d220c7 to 6cfca8a Compare May 20, 2018 05:02
@apapirovski

apapirovski commented May 20, 2018

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
@apapirovski @kjin
http2: fix several serious bugs
5ef54f2
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]>
kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
@apapirovski @kjin
test: fix flaky http2-session-unref
2c3178f
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]>
@kjin kjin mentioned this pull request Sep 19, 2018
http2: fix responses to long payload reqs #20084
Closed
3 tasks done
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
@apapirovski @kjin
http2: fix several serious bugs
bc9f4b6
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]>
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
@apapirovski @kjin
test: fix flaky http2-session-unref
357afab
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]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
@apapirovski @kjin
http2: fix several serious bugs
2151bf3
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]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
@apapirovski @kjin
test: fix flaky http2-session-unref
e825eed
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]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
@apapirovski @BethGriggs
http2: fix several serious bugs
0a6672f
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]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
@apapirovski @BethGriggs
test: fix flaky http2-session-unref
5d29e2c
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]>
@BethGriggs BethGriggs mentioned this pull request Oct 30, 2018
v8.13.0 proposal #23974
Merged
@beevelop beevelop mentioned this pull request Nov 20, 2018
2018-11-20 Version 8.13.0 'Carbon' (LTS) @MylesBorins prepared by @BethGriggs beevelop/docker-android-nodejs#250
Closed
@lundibundi lundibundi mentioned this pull request Dec 8, 2019
http2: fix graceful session close #30854
Closed
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@Trott Trott Trott approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

http2 Issues and PRs related to the http2 subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

http2: Edge and IE broken response flaky: parallel/test-http2-* on Windows http2: [Node 10+] WebKit Internal Error (WebKitErrorDomain:300) on Safari (iOS & Mac) and Chrome (iOS)

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@apapirovski @Trott @mcollina @jasnell @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.