-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Investigate flaky test-inspector-port-zero-cluster #13343
Comments
/cc @bnoordhuis |
Happened again, this time on ubuntu1604_docker_alpine34-64. https://ci.nodejs.org/job/node-test-commit-linux/10277/nodes=ubuntu1604_docker_alpine34-64/console not ok 1413 inspector/test-inspector-port-zero-cluster
---
duration_ms: 0.329
severity: fail
stack: |-
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
at Object.exports.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604_docker_alpine34-64/test/common/index.js:483:10)
at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604_docker_alpine34-64/test/inspector/test-inspector-port-zero-cluster.js:13:33)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
Debugger listening on ws://127.0.0.1:45189/8f57c8a5-a17f-4f7e-809b-1f1672a54ae3
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:45191/38e5e2f4-cadb-4c0a-a1fd-af925e5e7e36
For help see https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:45190 failed: address already in use
Debugger listening on ws://127.0.0.1:45192/c595ccac-dbea-4443-8c2b-8cd003d52a9a
For help see https://nodejs.org/en/docs/inspector |
In both cases, one worker fails because the port is already in use: Starting inspector on 127.0.0.1:32832 failed: address already in use Starting inspector on 127.0.0.1:45190 failed: address already in use It looks like this is not guaranteeing an available port but perhaps just using sequential ports? |
This failure is replicable by running $ tools/test.py --repeat 10000 test/inspector/test-inspector-port-zero-cluster.js
=== release test-inspector-port-zero-cluster ===
Path: inspector/test-inspector-port-zero-cluster
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
at Object.exports.mustCall (/Users/trott/io.js/test/common/index.js:483:10)
at Object.<anonymous> (/Users/trott/io.js/test/inspector/test-inspector-port-zero-cluster.js:13:33)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
Debugger listening on ws://127.0.0.1:59247/6206a5c6-560a-4d48-85ce-86da803afe59
For help see https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:59248 failed: address already in use
Debugger listening on ws://127.0.0.1:59249/75356721-69d4-47df-bdb9-a856946f42a1
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:59250/8c1ec737-202f-4dd7-9fa8-9765fffed167
For help see https://nodejs.org/en/docs/inspector
Command: out/Release/node --inspect=0 /Users/trott/io.js/test/inspector/test-inspector-port-zero-cluster.js
[snip] |
@refack Yes, AFAICT, the |
Than that's a new "known-issue" since cluster has always set sequential debug ports for it's children (initial port=0 or not) My assumption in #13373 is that there might be an test-internal race. |
Ooof. That seems like a bug to me, albeit one that would cause problems only infrequently and one that might be very tricky to fix. |
OK, so to summarize my understanding thus far:
Sound about right? |
There is discussion in #12941 about how to open For some use-cases all |
Perhaps use |
Failed on linux-fips now too. https://ci.nodejs.org/job/node-test-commit-linux-fips/8796/nodes=ubuntu1404-64/console not ok 1413 inspector/test-inspector-port-zero-cluster
---
duration_ms: 0.513
severity: fail
stack: |-
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
at Object.exports.mustCall (/home/iojs/build/workspace/node-test-commit-linux-fips/nodes/ubuntu1404-64/test/common/index.js:483:10)
at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-fips/nodes/ubuntu1404-64/test/inspector/test-inspector-port-zero-cluster.js:13:33)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
Debugger listening on ws://127.0.0.1:59463/8b9592c9-26b4-4b0a-bb00-380cc41c308e
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:59464/1f88ca44-cbd7-4433-89b0-d36c34b0b4d5
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:59465/55d232eb-bac6-4d3a-9f6a-9eb7d6251cf7
For help see https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:59466 failed: address already in use |
@nodejs/testing @mcollina |
NOOOOO my favorite
https://ci.nodejs.org/job/node-test-commit-linuxone/6296/nodes=rhel72-s390x/ |
I'm a bit lost, is this fixed by #13375? |
@mcollina No, that just marked the test as flaky so CI will be yellow instead of red when this test fails. |
No, it's a feature and one that should be preserved. If the flakiness is caused by concurrent test runs biting each other, we need to figure out a way to make it run exclusively (moving to test/sequential won't be enough) or accept a certain amount of flakiness. |
Does it make sense to preserve that behavior when a port is specified or the default port is used, but not when started with the port If that makes sense, then lets do that. If that doesn't make sense, then the test needs to be changed to allow for unpredictable port collisions. |
I'm personally of the opinion that having predictable port numbers is an important feature for ease-of-use in debugging. I don't expect that users are going to run into port conflicts often, that's just something we'll have to deal with in our test suite. |
With a properly functioning test, it is possible for a cluster worker to fail to launch due to a port collision. For better or for worse, this is working as expected and so the test now accommodates that reality. Fixes: nodejs#13343
Proposed fix: #13711 |
* re-implemented test to parse args instead of post binding (exit 12) * saved failing case as known issue PR-URL: nodejs#13373 Fixes: nodejs#13343 Reviewed-By: James M Snell <[email protected]>
* re-implemented test to parse args instead of post binding (exit 12) * saved failing case as known issue PR-URL: #13373 Fixes: #13343 Reviewed-By: James M Snell <[email protected]>
* re-implemented test to parse args instead of post binding (exit 12) * saved failing case as known issue PR-URL: #13373 Fixes: #13343 Reviewed-By: James M Snell <[email protected]>
https://ci.nodejs.org/job/node-test-commit-linux/10262/nodes=fedora24/console
The text was updated successfully, but these errors were encountered: