qa: Failure in p2p_fingerprint.py #34331

issue hebasto openend this issue on January 18, 2026
  1. hebasto commented at 12:22 pm on January 18, 2026: member

    On FreeBSD 15.0, https://github.com/hebasto/bitcoin-core-nightly/actions/runs/21105606197/job/60696569283:

     0386/456 - p2p_fingerprint.py failed, Duration: 0 s
     1
     2stdout:
     32026-01-18T04:34:49.101209Z TestFramework (INFO): PRNG seed is: 4679507874993432966
     42026-01-18T04:34:49.102528Z TestFramework (INFO): Initializing test directory /tmp/test_runner__🏃_20260118_042715/p2p_fingerprint_63
     52026-01-18T04:34:49.360239Z TestFramework (ERROR): Unexpected exception
     6Traceback (most recent call last):
     7  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 138, in main
     8    self.setup()
     9  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 269, in setup
    10    self.setup_network()
    11  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 360, in setup_network
    12    self.setup_nodes()
    13  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 382, in setup_nodes
    14    self.start_nodes()
    15  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 528, in start_nodes
    16    node.wait_for_rpc_connection()
    17  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_node.py", line 316, in wait_for_rpc_connection
    18    raise FailedToStartError(self._node_msg(
    19test_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.
    20Error: Failed to listen on any port. Use -listen=0 if you want this.
    21************************
    22
    232026-01-18T04:34:49.423831Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    242026-01-18T04:34:49.424142Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner__🏃_20260118_042715/p2p_fingerprint_63
    252026-01-18T04:34:49.424336Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner__🏃_20260118_042715/p2p_fingerprint_63/test_framework.log
    262026-01-18T04:34:49.424671Z TestFramework (ERROR): 
    272026-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
    282026-01-18T04:34:49.425220Z TestFramework (ERROR): 
    292026-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.
    302026-01-18T04:34:49.425685Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
    312026-01-18T04:34:49.425795Z TestFramework (ERROR): 
    
  2. maflcko commented at 8:17 am on January 19, 2026: member

    From the netinet/in.h:

     0/*
     1 * Local port number conventions:
     2 *
     3 * When a user does a bind(2) or connect(2) with a port number of zero,
     4 * a non-conflicting local port address is chosen.
     5 * The default range is IPPORT_HIFIRSTAUTO through
     6 * IPPORT_HILASTAUTO, although that is settable by sysctl.
     7 *
     8 * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
     9 * default assignment range.
    10 *
    11 * The value IP_PORTRANGE_DEFAULT causes the default behavior.
    12 *
    13 * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
    14 * into the "high" range.  These are reserved for client outbound connections
    15 * which do not want to be filtered by any firewalls.
    16 *
    17 * The value IP_PORTRANGE_LOW changes the range to the "low" are
    18 * that is (by convention) restricted to privileged processes.  This
    19 * convention is based on "vouchsafe" principles only.  It is only secure
    20 * if you trust the remote host to restrict these ports.
    21 *
    22 * The default range of ports and the high range can be changed by
    23 * sysctl(3).  (net.inet.ip.portrange.{hi,low,}{first,last})
    24 *
    25 * Changing those values has bad security implications if you are
    26 * using a stateless firewall that is allowing packets outside of that
    27 * range in order to allow transparent outgoing connections.
    28 *
    29 * Such a firewall configuration will generally depend on the use of these
    30 * default values.  If you change them, you may find your Security
    31 * Administrator looking for you with a heavy object.
    32 *
    33 * For a slightly more orthodox text view on this:
    34 *
    35 *            ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers
    36 *
    37 *    port numbers are divided into three ranges:
    38 *
    39 *                0 -  1023 Well Known Ports
    40 *             1024 - 49151 Registered Ports
    41 *            49152 - 65535 Dynamic and/or Private Ports
    42 *
    43 */
    44
    45/*
    46 * Ports < IPPORT_RESERVED are reserved for
    47 * privileged processes (e.g. root).         (IP_PORTRANGE_LOW)
    48 */
    49#define	IPPORT_RESERVED		1024
    50
    51/*
    52 * Default local port range, used by IP_PORTRANGE_DEFAULT
    53 */
    54#define IPPORT_EPHEMERALFIRST	10000
    55#define IPPORT_EPHEMERALLAST	65535
    56
    57/*
    58 * Dynamic port range, used by IP_PORTRANGE_HIGH.
    59 */
    60#define	IPPORT_HIFIRSTAUTO	49152
    61#define	IPPORT_HILASTAUTO	65535
    

    So I guess this may have been broken after #34186?

  3. w0xlt commented at 8:42 am on January 19, 2026: contributor
    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=2000 in the external bitcoin-core-nightly FreeBSD CI workflow should mitigate this.
  4. maflcko commented at 8:53 am on January 19, 2026: member
    An alternative could be to set IP_PORTRANGE_HIGH, but I don’t know how to do this on freebsd.
  5. maflcko added the label Tests on Jan 19, 2026
  6. maflcko added the label CI failed on Jan 19, 2026
  7. w0xlt referenced this in commit 6779f68729 on Jan 19, 2026
  8. w0xlt referenced this in commit d73b792c5b on Jan 19, 2026
  9. hebasto commented at 10:26 am on January 19, 2026: member
    cc @vasild
  10. w0xlt commented at 10:33 am on January 19, 2026: contributor
  11. vasild commented at 2:07 pm on January 19, 2026: contributor

    Is it correct that the failing test p2p_fingerprint.py (ran as 386/456) is not using port=0 which was introduced in #34186?

    So, it is probably because feature_proxy.py (280/456) ran before it and used port 11756 and left it in TIME_WAIT state (p2p_private_broadcast.py was 398/456 and feature_anchors.py was 425/456, after the failure of p2p_fingerprint.py), right?

  12. maflcko commented at 3:01 pm on January 19, 2026: member

    So, it is probably because feature_proxy.py (280/456) ran before it and used port 11756 and left it in TIME_WAIT state (p2p_private_broadcast.py was 398/456 and feature_anchors.py was 425/456, after the failure of p2p_fingerprint.py), right?

    Ah, good observation. I’d presume that the port was still in use, but it being in TIME_WAIT sounds plausible.

    root# sysctl net.inet.ip.portrange.first=32768

    Setting TEST_RUNNER_PORT_MIN=2000 …

    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.

  13. w0xlt referenced this in commit befde74d72 on Jan 19, 2026
  14. w0xlt referenced this in commit 01875b1122 on Jan 19, 2026
  15. w0xlt commented at 6:07 pm on January 19, 2026: contributor

    ideally the tests work out of the box as-is.

    Updated the solution in #34346 to cover IPv6 sockets used by feature_proxy.py.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-27 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me