qa: Failure in `p2p_fingerprint.py` #34331

issue hebasto opened 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:

    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): 
    
    
    
  2. maflcko commented at 8:17 AM on January 19, 2026: member

    From the netinet/in.h:

    /*
     * Local port number conventions:
     *
     * When a user does a bind(2) or connect(2) with a port number of zero,
     * a non-conflicting local port address is chosen.
     * The default range is IPPORT_HIFIRSTAUTO through
     * IPPORT_HILASTAUTO, although that is settable by sysctl.
     *
     * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
     * default assignment range.
     *
     * The value IP_PORTRANGE_DEFAULT causes the default behavior.
     *
     * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
     * into the "high" range.  These are reserved for client outbound connections
     * which do not want to be filtered by any firewalls.
     *
     * The value IP_PORTRANGE_LOW changes the range to the "low" are
     * that is (by convention) restricted to privileged processes.  This
     * convention is based on "vouchsafe" principles only.  It is only secure
     * if you trust the remote host to restrict these ports.
     *
     * The default range of ports and the high range can be changed by
     * sysctl(3).  (net.inet.ip.portrange.{hi,low,}{first,last})
     *
     * Changing those values has bad security implications if you are
     * using a stateless firewall that is allowing packets outside of that
     * range in order to allow transparent outgoing connections.
     *
     * Such a firewall configuration will generally depend on the use of these
     * default values.  If you change them, you may find your Security
     * Administrator looking for you with a heavy object.
     *
     * For a slightly more orthodox text view on this:
     *
     *            ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers
     *
     *    port numbers are divided into three ranges:
     *
     *                0 -  1023 Well Known Ports
     *             1024 - 49151 Registered Ports
     *            49152 - 65535 Dynamic and/or Private Ports
     *
     */
    
    /*
     * Ports < IPPORT_RESERVED are reserved for
     * privileged processes (e.g. root).         (IP_PORTRANGE_LOW)
     */
    #define	IPPORT_RESERVED		1024
    
    /*
     * Default local port range, used by IP_PORTRANGE_DEFAULT
     */
    #define IPPORT_EPHEMERALFIRST	10000
    #define IPPORT_EPHEMERALLAST	65535
    
    /*
     * Dynamic port range, used by IP_PORTRANGE_HIGH.
     */
    #define	IPPORT_HIFIRSTAUTO	49152
    #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.

  16. w0xlt referenced this in commit f041ee6138 on Jan 20, 2026
  17. w0xlt referenced this in commit 79cb8c15af on Jan 20, 2026
  18. w0xlt referenced this in commit bcf1d14090 on Jan 20, 2026
  19. w0xlt referenced this in commit 34bed0ed8c on Jan 20, 2026
  20. hebasto commented at 5:58 PM on January 27, 2026: member

    Another test resulted in seemingly the same error.

    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): 
    
    
    
  21. w0xlt commented at 6:01 PM on January 27, 2026: contributor

    With or without #34346 ?

  22. hebasto commented at 6:04 PM on January 27, 2026: member

    With or without #34346 ?

    The master branch.

  23. bitcoin deleted a comment on Jan 28, 2026
  24. hebasto closed this on Jan 29, 2026

  25. hebasto referenced this in commit f7e0c3d3d3 on Jan 29, 2026

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-04-21 03:12 UTC

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