-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: fix flaky child-process-fork-regr-gh-2847 #5422
Conversation
CI: https://ci.nodejs.org/job/node-test-pull-request/1734/ The CI infrastructure isn't all back up yet, but some nodes are. |
LGTM if CI is green. I de-ES6-ized it and made sure it still failed on io.js v3 so it still catches the regression it's designed to catch. |
2 failures out of 9999. Things have improved but not completely :( |
fa836e7
to
a83b311
Compare
Updated the PR so it ignores errors when sending the 2nd handle to the worker |
var s = send(function(err) { | ||
// Ignore errors when sending the second handle because the worker | ||
// may already have exited. | ||
if (err) { |
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.
Perhaps it would be better to at least check that it's a possibly expected error?
2dfbfe9
to
4e8a0ca
Compare
PR update to address @mscdex comment. Thanks |
New stress test: https://ci.nodejs.org/job/node-stress-single-test/526/ |
// Ignore errors when sending the second handle because the worker | ||
// may already have exited. | ||
if (err) { | ||
assert.strictEqual(err.code, |
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.
Nit: Might be good just to follow the format of the previous case of swallowing ECONNREFUSED
in the file: https://github.com/santigimeno/node/blob/regre-gh-2847/test/parallel/test-child-process-fork-regr-gh-2847.js#L19-L23
If it passes CI and stress test, LGTM. (Left a nit, but like all nits, it can be ignored. Up to you.) |
Oh, and I ran the current version (with ES6-isms replaced) against iojs v3 and it fails as expected, so that's good. |
@santigimeno Maybe try the logging first? |
4e8a0ca
to
e1a3059
Compare
Ok, I have followed @Trott recommendations and throw if error is different from |
New stress test: https://ci.nodejs.org/job/node-stress-single-test/527/ |
@santigimeno I think it will work if you swallow |
@Trott yes, but there are other
I will push a new PR with more logs |
e1a3059
to
1ba5d2b
Compare
Can somebody run the stress test again? Thanks |
New stress test: https://ci.nodejs.org/job/node-stress-single-test/546/ |
And just in case it's challenging to find the corresponding console log: https://ci.nodejs.org/job/node-stress-single-test/546/nodes=ppcbe-fedora20/console |
1ba5d2b
to
f192900
Compare
I think (hope) it's now fixed. Can you run the stress test? Thanks! |
New stress test: https://ci.nodejs.org/job/node-stress-single-test/551/ |
That looks like it worked. |
The test is still failing sometimes because when trying to establish the second connection, the server is already closed. Bring back the code that handled this case and was removed in the last refactoring of the test. Also ignore the errors that might happen when sending the second handle to the worker because it may already have exited.
f192900
to
1e36bc0
Compare
Fixed linting error. |
CI is green. |
The test is still failing sometimes because when trying to establish the second connection, the server is already closed. Bring back the code that handled this case and was removed in the last refactoring of the test. Also ignore the errors that might happen when sending the second handle to the worker because it may already have exited. PR-URL: nodejs#5422 Reviewed-By: Rich Trott <[email protected]>
Landed in 98b721e |
The test is still failing sometimes because when trying to establish the second connection, the server is already closed. Bring back the code that handled this case and was removed in the last refactoring of the test. Also ignore the errors that might happen when sending the second handle to the worker because it may already have exited. PR-URL: #5422 Reviewed-By: Rich Trott <[email protected]>
The test is still failing sometimes because when trying to establish the second connection, the server is already closed. Bring back the code that handled this case and was removed in the last refactoring of the test. Also ignore the errors that might happen when sending the second handle to the worker because it may already have exited. PR-URL: #5422 Reviewed-By: Rich Trott <[email protected]>
The test is still failing sometimes because when trying to establish the second connection, the server is already closed. Bring back the code that handled this case and was removed in the last refactoring of the test. Also ignore the errors that might happen when sending the second handle to the worker because it may already have exited. PR-URL: #5422 Reviewed-By: Rich Trott <[email protected]>
According to the explanation in nodejs#3635#issuecomment-157714683 And as a continuation to nodejs#5422 we also ignore EMFILE "No more file descriptors are available,so no more files can be opened" PR-URL: nodejs#12698 Fixes: nodejs#10286 Refs: nodejs#3635 (comment) Refs: nodejs#5178 Refs: nodejs#5179 Refs: nodejs#4005 Refs: nodejs#5121 Refs: nodejs#5422 Refs: nodejs#12621 (comment) Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
According to the explanation in #3635#issuecomment-157714683 And as a continuation to #5422 we also ignore EMFILE "No more file descriptors are available,so no more files can be opened" PR-URL: #12698 Fixes: #10286 Refs: #3635 (comment) Refs: #5178 Refs: #5179 Refs: #4005 Refs: #5121 Refs: #5422 Refs: #12621 (comment) Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Pull Request check-list
Please make sure to review and check all of these items:
make -j8 test
(UNIX) orvcbuild test nosign
(Windows) pass withthis change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
test
Description of change
The test is still failing sometimes because when trying to establish the
second connection, the server is already closed. Bring back the code
that handled this case and was removed in the last refactoring of the
test: 4e4b260.