Skip to content

Conversation

@jasnell
Copy link
Member

verify protections against ping and settings flooding

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

http2

@jasnelljasnell added http2 Issues or PRs related to the http2 subsystem. test Issues and PRs related to the tests. labels Jan 3, 2018
@jasnell
Copy link
MemberAuthor

ping @nodejs/http2

@jasnelljasnellforce-pushed the http2-verifyflooding branch from 3aef309 to 0667401CompareJanuary 3, 2018 22:40
Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

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

LGTM

@jasnell
Copy link
MemberAuthor

@jasnelljasnellforce-pushed the http2-verifyflooding branch from 0667401 to a881adeCompareJanuary 5, 2018 21:14
@jasnell
Copy link
MemberAuthor

Seeing some flakiness across platforms. The reason appears to be:

  1. Some platforms respond to pings/settings at different rates therefore making the exact timing of a ping/settings flood error a bit difficult to predict. Hopefully writing them at a faster pace will ensure we hit it on all platforms.

  2. There is some variance on windows in the timing of the ECONNRESET error that I'm still tracking down.

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

@jasnell
Copy link
MemberAuthor

Still flaky... trying again: https://ci.nodejs.org/job/node-test-pull-request/12430/

@jasnell
Copy link
MemberAuthor

Trying once again... https://ci.nodejs.org/job/node-test-pull-request/12431/

It's entirely possible that we won't be able to reliable test for ping and settings flood generically on all systems. In which case, I will move the tests out of parallel and have to mark them flaky

@jasnell
Copy link
MemberAuthor

So close... but still seeing flakiness on the flood tests on Windows. Moved to sequential and marked flaky. Those are going to be generally unreliable as a rule due to the nature of the error and the code that triggers it. We need the coverage either way but will have to investigate some way of making them less flaky later.

@jasnell
Copy link
MemberAuthor

@jasnelljasnellforce-pushed the http2-verifyflooding branch 2 times, most recently from 77e97cc to 4ca203cCompareJanuary 6, 2018 00:46
@jasnell
Copy link
MemberAuthor

@mcollina ... can you take one more look at this.

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer this to be a proper a common.mustCall() with an error check.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Whether or not an error happens here is dependent entirely on operating system. It's quite flaky.

Copy link
Member

Choose a reason for hiding this comment

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

I fear this might be time sensitive. Can we avoid it anyhow? Maybe add a comment here

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We can with a bit of dancing between the client and server. Will take another pass.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

actually, no dancing required. pretty straight forward :-)

Copy link
Member

Choose a reason for hiding this comment

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

can you make this a proper function?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

In which sense? client.on('error', function(){}) ? I can, but I'm curious about why it matters in this case.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, handling/checking the error, you answered on another file. Why don't you put a note about the fact that the error can or cannot happen depending on the OS?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Already done :-)

Copy link
Member

Choose a reason for hiding this comment

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

can you make this a proper function?

@jasnell
Copy link
MemberAuthor

@jasnelljasnellforce-pushed the http2-verifyflooding branch from ad66c46 to de9a99aCompareJanuary 8, 2018 19:06
@jasnell
Copy link
MemberAuthor

New CI: https://ci.nodejs.org/job/node-test-pull-request/12445/
Had to adjust a couple of the tests because of another PR that landed

@jasnell
Copy link
MemberAuthor

Once more... with feeling https://ci.nodejs.org/job/node-test-pull-request/12446/

* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks.
@jasnelljasnellforce-pushed the http2-verifyflooding branch from 3bd5cb0 to c8287dbCompareJanuary 8, 2018 21:09
@jasnell
Copy link
MemberAuthor

CI is good

jasnell added a commit that referenced this pull request Jan 8, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. PR-URL: #17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@jasnell
Copy link
MemberAuthor

Landed in 3303987

@jasnelljasnell closed this Jan 8, 2018
MylesBorins pushed a commit to jasnell/node that referenced this pull request Jan 9, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. PR-URL: nodejs#17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. Backport-PR-URL: #18050 PR-URL: #17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 10, 2018
MylesBorins pushed a commit that referenced this pull request Jan 10, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. Backport-PR-URL: #18050 PR-URL: #17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@Trott
Copy link
Member

Can we revert this until the test doesn't fail all the time on Windows?

@Trott
Copy link
Member

(If the problem is Windows and not the code here, then the solution is probably not to mark the test as flaky but to not bother running the test on Windows at all. Skip it instead. There is no point in running a test if the results are meaningless.)

@jasnell
Copy link
MemberAuthor

I'm good with skipping on windows for now. Just want to make sure we can revisit this.

@Trott
Copy link
Member

Maybe skip on Windows and open an issue in the issue tracker about how it probably could be made to work on Windows and put as much info there as you can?

@jasnell
Copy link
MemberAuthor

I'll (1) open a PR that skips on windows, (2) add a known-issue test that skips everything but windows, and (3) open an issue that discusses it. The key thing to remember here is that the failure is not an actual failure, the code is working as it is supposed to on Windows, the test just does not have the ability to trigger the error condition on Windows.

kjin pushed a commit to kjin/node that referenced this pull request May 1, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. Backport-PR-URL: nodejs#18050 PR-URL: nodejs#17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 2, 2018
* verify protections against ping and settings flooding * Strictly handle and verify handling of unsolicited ping and settings frame acks. Backport-PR-URL: #18050 Backport-PR-URL: #20456 PR-URL: #17969 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request May 2, 2018
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.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@jasnell@Trott@apapirovski@mcollina@addaleax@MylesBorins