-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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-open on Linux #14316
Comments
So this assertion checks that when you close and reopen you don't get the same port. However AIUI node just picks a free port, so there is a (very small) chance you'll get the same port. cc/ @sam-github as you wrote the original test. |
If it's asking the operating system to supply a free port (which I imagine it is), then that really should not ever happen. AFAIK, every operating system increments to the next free port on each request for a free port. This deterministic nature seems to be confirmed for me when I run this test and see the output showing that the two ports are apart by 4 every time. 59323 and 59327 the first run. 59329 and 59333 the next one. And so on and so forth. At the same time, there it is above happening. So ¯\(ツ)/¯. Maybe this assertion is actually masking the real problem? (In which case, the correct course of action is probably still the same: Remove the assertion.) |
Gibson's hypothesis seems plausible enough to me. Try narrowing the ephemeral port range and see what happens (and keep in mind that the port allocation scheme is platform and kernel specific - the centos7 bot runs linux 3.10.) |
Test checks that if you open the inspector with '0' (pick a random free port), close it, then reopen it, you get a different port. However this isn't necessarily true. PR-URL: nodejs#14320 Fixes: nodejs#14316 Refs: nodejs#14316 (comment) Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Test checks that if you open the inspector with '0' (pick a random free port), close it, then reopen it, you get a different port. However this isn't necessarily true. PR-URL: #14320 Fixes: #14316 Refs: #14316 (comment) Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
https://ci.nodejs.org/job/node-test-commit-linux/11219/nodes=centos7-64/console
The text was updated successfully, but these errors were encountered: