-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: verify that flooding error happens #17969
Conversation
ping @nodejs/http2 |
3aef309
to
0667401
Compare
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
0667401
to
a881ade
Compare
Seeing some flakiness across platforms. The reason appears to be:
New CI: https://ci.nodejs.org/job/node-test-pull-request/12428/ |
Still flaky... trying again: https://ci.nodejs.org/job/node-test-pull-request/12430/ |
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 |
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. |
77e97cc
to
4ca203c
Compare
@mcollina ... can you take one more look at this. |
}); | ||
})); | ||
|
||
client.on('error', () => {}); |
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.
I would prefer this to be a proper a common.mustCall()
with an error check.
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.
Whether or not an error happens here is dependent entirely on operating system. It's quite flaky.
client.write(kSettings.data, () => { | ||
// Give time to receive the servers settings frame | ||
// so that the first ack below is actually expected. | ||
setImmediate(() => { |
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.
I fear this might be time sensitive. Can we avoid it anyhow? Maybe add a comment here
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.
We can with a bit of dancing between the client and server. Will take another pass.
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.
actually, no dancing required. pretty straight forward :-)
})); | ||
|
||
// We don't care if an error is emitted here, but don't crash | ||
client.on('error', () => {}); |
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.
can you make this a proper function?
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.
In which sense? client.on('error', function() {})
? I can, but I'm curious about why it matters in this case.
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.
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?
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.
Already done :-)
})); | ||
|
||
// We don't care if an error is emitted here, but don't crash | ||
client.on('error', () => {}); |
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.
can you make this a proper function?
New CI before landing: https://ci.nodejs.org/job/node-test-pull-request/12444/ |
ad66c46
to
de9a99a
Compare
New CI: https://ci.nodejs.org/job/node-test-pull-request/12445/ |
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.
3bd5cb0
to
c8287db
Compare
CI is good |
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Landed in 3303987 |
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Can we revert this until the test doesn't fail all the time on Windows? |
(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.) |
I'm good with skipping on windows for now. Just want to make sure we can revisit this. |
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? |
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. |
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* 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 <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
verify protections against ping and settings flooding
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http2