★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/21561Nouvelle recherche | Portail wanayoo
Skip to content
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: fix issues with aborted respondWithFile()s #21561

Closed
wants to merge 2 commits into from

Conversation

Copy link
Member

@addaleax addaleax commented Jun 27, 2018

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

@addaleax addaleax requested review from apapirovski and ryzokuken Jun 27, 2018
@nodejs-github-bot nodejs-github-bot added c++ lib / src labels Jun 27, 2018
@addaleax addaleax added the http2 label Jun 27, 2018
@addaleax
Copy link
Member Author

@addaleax addaleax commented Jun 27, 2018

@addaleax
Copy link
Member Author

@addaleax addaleax commented Jun 27, 2018

Copy link
Member

@apapirovski apapirovski left a comment

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

Copy link
Contributor

@DaAitch DaAitch left a comment

@addaleax cool, could not reproduce crashes.

Copy link
Member

@ryzokuken ryzokuken left a comment

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

@addaleax addaleax added the wip label Jun 29, 2018
@addaleax
Copy link
Member Author

@addaleax addaleax commented Jun 29, 2018

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

@jasnell
Copy link
Member

@jasnell jasnell commented Jun 29, 2018

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

@apapirovski
Copy link
Member

@apapirovski apapirovski commented Jun 30, 2018

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.

@ariran5
Copy link

@ariran5 ariran5 commented Jul 3, 2018

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

@addaleax
Copy link
Member Author

@addaleax addaleax commented Jul 8, 2018

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…

@addaleax
Copy link
Member Author

@addaleax addaleax commented Jul 10, 2018

Maybe ping @nodejs/http2 ?

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

@sebdeckers
Copy link
Contributor

@sebdeckers sebdeckers commented Jul 11, 2018

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
Copy link
Member Author

@addaleax addaleax commented Jul 11, 2018

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

@apapirovski
Copy link
Member

@apapirovski apapirovski commented Jul 15, 2018 •

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
Copy link
Member Author

@addaleax addaleax commented Jul 15, 2018

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/

@addaleax addaleax removed the wip label Jul 15, 2018
@addaleax
Copy link
Member Author

@addaleax addaleax commented Jul 15, 2018

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.

Copy link
Member

@mcollina mcollina left a comment

LGTM

@addaleax
Copy link
Member Author

@addaleax addaleax commented Jul 16, 2018

Landed in d94950e

@addaleax addaleax closed this Jul 16, 2018
@addaleax addaleax deleted the http2-stream-pipe branch Jul 16, 2018
addaleax added a commit that referenced this issue Jul 16, 2018
PR-URL: #21561
Fixes: #20824
Fixes: #21560
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this issue Jul 16, 2018
PR-URL: #21561
Fixes: #20824
Fixes: #21560
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@targos targos mentioned this pull request Jul 17, 2018
addaleax added a commit to addaleax/node that referenced this issue Jul 17, 2018
addaleax added a commit that referenced this issue Jul 23, 2018
Refs: #21836
Refs: #21561

PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
targos pushed a commit that referenced this issue Jul 24, 2018
Refs: #21836
Refs: #21561

PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
@addaleax addaleax mentioned this pull request Oct 20, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ http2 lib / src
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants