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: fix issues with aborted `respondWithFile()`s by addaleax · Pull Request #21561 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Jun 27, 2018

Copy link
Copy Markdown
Member

Fixes: #20824
Fixes: #21560


@budarin @DaAitch @ariran5 Are you in a position to try this patch and see whether it fully resolves the issues you were experiencing?

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

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

bricss and sebdeckers reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@addaleax
addaleax requested review from apapirovski and ryzokuken June 27, 2018 11:02
@nodejs-github-bot

nodejs-github-bot commented Jun 27, 2018

Copy link
Copy Markdown
Collaborator

@addaleax build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/167/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Jun 27, 2018
@addaleax addaleax added the http2 Issues and PRs related to the http2 subsystem. label Jun 27, 2018
@addaleax

addaleax commented Jun 27, 2018

Copy link
Copy Markdown
Member Author

Full CI: https://ci.nodejs.org/job/node-test-pull-request/15649/

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jun 27, 2018

Copy link
Copy Markdown
Member Author

New CI: https://ci.nodejs.org/job/node-test-pull-request/15651/

@ariran5 Can you download the source for v10.5.0, apply https://patch-diff.githubusercontent.com/raw/nodejs/node/pull/21561.diff and build Node.js yourself?

All reactions

Sorry, something went wrong.

Uh oh!

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

apapirovski
apapirovski approved these changes Jun 27, 2018
View reviewed changes

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code SGTM but I couldn't reproduce on my Mac so I can't confirm the fix.

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax
addaleax force-pushed the http2-stream-pipe branch from b41d6f6 to 9d7dbb9 Compare June 27, 2018 15:42
DaAitch
DaAitch approved these changes Jun 28, 2018
View reviewed changes

@DaAitch DaAitch left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax cool, could not reproduce crashes.

Sorry, something went wrong.

Uh oh!

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

All reactions
ryzokuken
ryzokuken approved these changes Jun 29, 2018
View reviewed changes

@ryzokuken ryzokuken left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax I'll check if the test I wrote still crashes (highly unlikely), but code-wise LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax addaleax added the wip Issues and PRs that are still a work in progress. label Jun 29, 2018
@addaleax

addaleax commented Jun 29, 2018

Copy link
Copy Markdown
Member Author

Thanks for the reviews – I’m labelling this as in progress to make sure we don’t land it until somebody has had time to look into why the test is flaky/how to fix it … We probably need to just attach a no-op error handler somewhere, but I couldn’t reproduce the issue on Linux

All reactions

Sorry, something went wrong.

Uh oh!

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

@jasnell

jasnell commented Jun 29, 2018

Copy link
Copy Markdown
Member

@addaleax I think you're right that a no-op error handler on the client side should help with the flakiness.

All reactions

Sorry, something went wrong.

Uh oh!

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

@apapirovski

apapirovski commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

I can reproduce the failure reliably but don't know how to fix. The test as is doesn't seem to work on MacOS since the destroy causes the error.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ariran5

ariran5 commented Jul 3, 2018

Copy link
Copy Markdown

Yes! Its work for me, fast reload not crush node

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jul 8, 2018

Copy link
Copy Markdown
Member Author

Could somebody from e.g. @nodejs/platform-macos help me figure out the test here? I don’t have easy access to any of the systems on which is is failing…

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jul 10, 2018

Copy link
Copy Markdown
Member Author

Maybe ping @nodejs/http2 ?

I guess alternatively I’ll ask for access to a build machine …

All reactions

Sorry, something went wrong.

Uh oh!

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

@sebdeckers

sebdeckers commented Jul 11, 2018

Copy link
Copy Markdown
Contributor

FWIW I tried adding the following handler to the server in the test case. On macOS High Sierra (10.13.6) it fails to emit the error event about half the time, so this test fails the other half of the time. Not sure why.

  stream.on('error', common.mustCall((error) => {
    const expected = 'ECONNRESET'
    assert.strictEqual(error.errno, expected);
    assert.strictEqual(error.code, expected);
  }));
addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax mentioned this pull request Jul 11, 2018
Request access to macOS machine nodejs/build#1397
Closed
@addaleax

addaleax commented Jul 11, 2018

Copy link
Copy Markdown
Member Author

New CI to see on which hosts exactly it’s failing (?): https://ci.nodejs.org/job/node-test-pull-request/15809/

All reactions

Sorry, something went wrong.

Uh oh!

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

@apapirovski

apapirovski commented Jul 15, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

The socket destroy is what causes the ECONNRESET. I don't really see a good way to get around it but I'll try to dig in today & tomorrow.

(The test might need to be rewritten to work on macOS from what I can tell.)

addaleax reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@addaleax
http2: fix issues with aborted respondWithFile()s
bb4e94a
Fixes: nodejs#20824
Fixes: nodejs#21560
@addaleax
addaleax force-pushed the http2-stream-pipe branch from 9d7dbb9 to bb4e94a Compare July 15, 2018 19:54
@addaleax
[squash] hack around error in test
6a04dbe
@addaleax

addaleax commented Jul 15, 2018

Copy link
Copy Markdown
Member Author

I’ve pushed a change that might help get this back on track, even if it’s just a workaround.

If this is approved & lands with the hack in the test, I’ll open a new issue, since I think this is an API defect in the HTTP/2 API. (@apapirovski I still really appreciate you taking the time to do this – I’d assign that issue to you, if that’s okay, at least as long as I can’t really debug it myself. :/)

CI: https://ci.nodejs.org/job/node-test-pull-request/15888/

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax removed the wip Issues and PRs that are still a work in progress. label Jul 15, 2018
@addaleax

addaleax commented Jul 15, 2018

Copy link
Copy Markdown
Member Author

CI is green. Can somebody take a look at the added changes (only 6a04dbe)? I think it’s okay to do this because it addresses the most important issue, which is that this should not hard-crash the process.

All reactions

Sorry, something went wrong.

Uh oh!

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

mcollina
mcollina approved these changes Jul 16, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax

addaleax commented Jul 16, 2018

Copy link
Copy Markdown
Member Author

Landed in d94950e

DaAitch reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax closed this Jul 16, 2018
@addaleax
addaleax deleted the http2-stream-pipe branch July 16, 2018 18:27
addaleax added a commit that referenced this pull request Jul 16, 2018
@addaleax
http2: fix issues with aborted respondWithFile()s
d94950e
PR-URL: #21561
Fixes: #20824
Fixes: #21560
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax addaleax mentioned this pull request Jul 16, 2018
http2: need a way to deal with aborted connections #21836
Closed
targos pushed a commit that referenced this pull request Jul 16, 2018
@addaleax @targos
http2: fix issues with aborted respondWithFile()s
0b3c80c
PR-URL: #21561
Fixes: #20824
Fixes: #21560
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@targos targos mentioned this pull request Jul 17, 2018
v10.7.0 proposal #21851
Merged
addaleax added a commit to addaleax/node that referenced this pull request Jul 17, 2018
@addaleax
test: fix http2 connection abort test
7f998d9
Refs: nodejs#21836
Refs: nodejs#21561
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
addaleax added a commit that referenced this pull request Jul 23, 2018
@addaleax
test: fix http2 connection abort test
daa15b5
Refs: #21836
Refs: #21561

PR-URL: #21861
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
targos pushed a commit that referenced this pull request Jul 24, 2018
@addaleax @targos
test: fix http2 connection abort test
eea199b
Refs: #21836
Refs: #21561

PR-URL: #21861
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@kjin kjin mentioned this pull request Sep 19, 2018
[8.x] Backport http2 changes from 10.x #22850
Closed
3 of 4 tasks
@addaleax addaleax mentioned this pull request Oct 20, 2018
http2: simplify timeout tracking #19206
Closed
2 tasks done
@snyk-bot snyk-bot mentioned this pull request Mar 18, 2020
[Snyk] Upgrade: gatsby, gatsby-image, gatsby-plugin-catch-links, gatsby-plugin-manifest, gatsby-plugin-no-sourcemaps, gatsby-plugin-offline, gatsby-plugin-react-helmet, gatsby-plugin-sharp, gatsby-plugin-styled-components, gatsby-remark-autolink-headers, gatsby-remark-prismjs, gatsby-source-filesystem, gatsby-transformer-remark O330oei/node#3
Open
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
+3 more reviewers
@apapirovski apapirovski apapirovski approved these changes
@DaAitch DaAitch DaAitch approved these changes
@ryzokuken ryzokuken ryzokuken approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues and PRs related to the http2 subsystem. lib / src Issues and PRs involving general changes in the lib/ or src/ directories.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

http2 server + fast reload page the Stream is closed if app pushes unused assets

Uh oh!

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

9 participants

@addaleax @nodejs-github-bot @jasnell @apapirovski @ariran5 @sebdeckers @mcollina @DaAitch @ryzokuken
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.