Repository navigation
Closed
Description
On FreeBSD 15.0, https://github.com/hebasto/bitcoin-core-nightly/actions/runs/21105606197/job/60696569283:
386/456 - p2p_fingerprint.py failed, Duration: 0 s
stdout:
2026-01-18T04:34:49.101209Z TestFramework (INFO): PRNG seed is: 4679507874993432966
2026-01-18T04:34:49.102528Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20260118_042715/p2p_fingerprint_63
2026-01-18T04:34:49.360239Z TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 138, in main
self.setup()
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 269, in setup
self.setup_network()
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 360, in setup_network
self.setup_nodes()
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 382, in setup_nodes
self.start_nodes()
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 528, in start_nodes
node.wait_for_rpc_connection()
File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_node.py", line 316, in wait_for_rpc_connection
raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization. Error: Unable to bind to 127.0.0.1:11756 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
************************
2026-01-18T04:34:49.423831Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
2026-01-18T04:34:49.424142Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20260118_042715/p2p_fingerprint_63
2026-01-18T04:34:49.424336Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20260118_042715/p2p_fingerprint_63/test_framework.log
2026-01-18T04:34:49.424671Z TestFramework (ERROR):
2026-01-18T04:34:49.425017Z TestFramework (ERROR): Hint: Call /home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20260118_042715/p2p_fingerprint_63' to consolidate all logs
2026-01-18T04:34:49.425220Z TestFramework (ERROR):
2026-01-18T04:34:49.425516Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2026-01-18T04:34:49.425685Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
2026-01-18T04:34:49.425795Z TestFramework (ERROR):
Activity
maflcko commentedon Jan 19, 2026
From the netinet/in.h:
So I guess this may have been broken after #34186?
w0xlt commentedon Jan 19, 2026
Yes, possibly. FreeBSD’s ephemeral port range (10000–65535) overlaps with the test framework’s static port range (11000–26000).
Setting
TEST_RUNNER_PORT_MIN=2000in the external bitcoin-core-nightly FreeBSD CI workflow should mitigate this.maflcko commentedon Jan 19, 2026
An alternative could be to set
IP_PORTRANGE_HIGH, but I don't know how to do this on freebsd.hebasto commentedon Jan 19, 2026
cc @vasild
w0xlt commentedon Jan 19, 2026
A suggestion: #34336
vasild commentedon Jan 19, 2026
Is it correct that the failing test
p2p_fingerprint.py(ran as 386/456) is not usingport=0which was introduced in #34186?So, it is probably because
feature_proxy.py(280/456) ran before it and used port11756and left it inTIME_WAITstate (p2p_private_broadcast.pywas 398/456 andfeature_anchors.pywas 425/456, after the failure ofp2p_fingerprint.py), right?maflcko commentedon Jan 19, 2026
Ah, good observation. I'd presume that the port was still in use, but it being in
TIME_WAITsounds plausible.I think if this only affects freebsd, and all freebsd people are fine to use one of the workarounds, this seems fine. However, I think ideally the tests work out of the box as-is.
test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
w0xlt commentedon Jan 19, 2026
Updated the solution in #34346 to cover IPv6 sockets used by
feature_proxy.py.hebasto commentedon Jan 27, 2026
Another test resulted in seemingly the same error.
w0xlt commentedon Jan 27, 2026
With or without #34346 ?
hebasto commentedon Jan 27, 2026
The master branch.
Merge #34346: test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port…
test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
Merge bitcoin/bitcoin#34346: test: use IP_PORTRANGE_HIGH on FreeBSD f…
test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
Merge bitcoin/bitcoin#34346: test: use IP_PORTRANGE_HIGH on FreeBSD f…
test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
Merge bitcoin/bitcoin#34346: test: use IP_PORTRANGE_HIGH on FreeBSD f…