Description
- Version: 13.0.0-pre (master branch)
- Platform: all, although observed on various Linux in CI
- Subsystem: cluster test
test-cluster-net-listen-ipv6only-none has faulty logic in its Countdown callback. The check there assumes that if a port is unavailable for IPv4 but available for IPv6, that the operating system won't supply that port for IPv6. This is apparently incorrect as seen in https://ci.nodejs.org/job/node-test-commit-linux/nodes=centos7-64-gcc6/29869/testReport/junit/(root)/test/parallel_test_cluster_net_listen_ipv6only_none/:
Error: listen EADDRINUSE: address already in use 0.0.0.0:44400
at Server.setupListenHandle [as _listen2] (net.js:1298:14)
at listenInCluster (net.js:1346:12)
at doListen (net.js:1485:7)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1325:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '0.0.0.0',
port: 44400
}
One option to fix it would be to remove the check entirely. But then we're perhaps not checking that it's not opening the port on IPv4, which is part of the test.
In my opinion, a better option would be to switch to using common.PORT
rather than an operating-system-allocated port. That would mean moving the test to sequential
.
We'd also want to check the other tests in parallel
that use ipv6Only
to make sure they don't suffer from the same issue.