ci: failure in `feature_bind_port_externalip.py` #35343

issue fanquake opened this issue on May 21, 2026
  1. fanquake commented at 10:06 AM on May 21, 2026: member

    https://github.com/bitcoin/bitcoin/actions/runs/26174639836/job/77001441263?pr=32150#step:14:2159:

    node1 2026-05-20T16:50:23.677419Z [initload] [D:\a\bitcoin\bitcoin\src\util\thread.cpp:21] [TraceThread] initload thread exit 
    Error: 2026-05-20T16:50:23.677484Z [init] [D:\a\bitcoin\bitcoin\src\net.cpp:3367] [BindListenPort] [error] Unable to bind to 1.1.1.5:30002 on this computer (bind returned error The requested address is not valid in its context.  (10049)) 
    Error: 2026-05-20T16:50:23.677548Z [init] [D:\a\bitcoin\bitcoin\src\noui.cpp:29] [noui_ThreadSafeMessageBox] [error] Unable to bind to 1.1.1.5:30002 on this computer (bind returned error The requested address is not valid in its context.  (10049)) 
    Error: 2026-05-20T16:50:23.677638Z [init] [D:\a\bitcoin\bitcoin\src\noui.cpp:29] [noui_ThreadSafeMessageBox] [error] Failed to listen on any port. Use -listen=0 if you want this. 
     node1 2026-05-20T16:50:23.677681Z [init] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:448] [InterruptHTTPServer] [http] Interrupting HTTP server 
     node1 2026-05-20T16:50:23.677724Z [http_pool_0] [D:\a\bitcoin\bitcoin\src\util\thread.cpp:21] [TraceThread] http_pool_0 thread exit 
     node1 2026-05-20T16:50:23.677726Z [init] [D:\a\bitcoin\bitcoin\src\httprpc.cpp:357] [InterruptHTTPRPC] [rpc] Interrupting HTTP RPC server 
     node1 2026-05-20T16:50:23.677824Z [init] [D:\a\bitcoin\bitcoin\src\rpc\server.cpp:284] [operator ()] [rpc] Interrupting RPC 
     node1 2026-05-20T16:50:23.677864Z [init] [D:\a\bitcoin\bitcoin\src\init.cpp:295] [Shutdown] Shutdown in progress... 
     node1 2026-05-20T16:50:23.677884Z [shutoff] [D:\a\bitcoin\bitcoin\src\httprpc.cpp:362] [StopHTTPRPC] [rpc] Stopping HTTP RPC server 
     node1 2026-05-20T16:50:23.677902Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:705] [UnregisterHTTPHandler] [http] Unregistering HTTP handler for / (exactmatch 1) 
     node1 2026-05-20T16:50:23.677925Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:705] [UnregisterHTTPHandler] [http] Unregistering HTTP handler for /wallet/ (exactmatch 0) 
     node1 2026-05-20T16:50:23.677944Z [shutoff] [D:\a\bitcoin\bitcoin\src\rpc\server.cpp:296] [operator ()] [rpc] Stopping RPC 
     node1 2026-05-20T16:50:23.677742Z [http_pool_1] [D:\a\bitcoin\bitcoin\src\util\thread.cpp:21] [TraceThread] http_pool_1 thread exit 
     node1 2026-05-20T16:50:23.678088Z [shutoff] [D:\a\bitcoin\bitcoin\src\rpc\server.cpp:298] [operator ()] [rpc] RPC stopped. 
     node1 2026-05-20T16:50:23.678112Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:459] [StopHTTPServer] [http] Stopping HTTP server 
     node1 2026-05-20T16:50:23.678124Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:461] [StopHTTPServer] [http] Waiting for HTTP worker threads to exit 
     node1 2026-05-20T16:50:23.678252Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:486] [StopHTTPServer] [http] Waiting for HTTP event thread to exit 
     node1 2026-05-20T16:50:23.678287Z [http] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:305] [ThreadHTTP] [http] Exited http event loop 
     node1 2026-05-20T16:50:23.678646Z [shutoff] [D:\a\bitcoin\bitcoin\src\httpserver.cpp:491] [StopHTTPServer] [http] Stopped HTTP server 
     node1 2026-05-20T16:50:23.678695Z [scheduler] [D:\a\bitcoin\bitcoin\src\util\thread.cpp:21] [TraceThread] scheduler thread exit 
     node1 2026-05-20T16:50:23.679020Z [shutoff] [D:\a\bitcoin\bitcoin\src\node\mempool_persist.cpp:195] [DumpMempool] Writing 0 mempool transactions to file... 
     node1 2026-05-20T16:50:23.679040Z [shutoff] [D:\a\bitcoin\bitcoin\src\node\mempool_persist.cpp:205] [DumpMempool] Writing 0 unbroadcast transactions to file. 
     node5 2026-05-20T16:50:23.692379Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:250] [CDBWrapper] Opened LevelDB successfully 
     node5 2026-05-20T16:50:23.692427Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:266] [CDBWrapper] Using obfuscation key for D:\a\bitcoin\bitcoin\test_runner_₿_🏃_20260520_163739\feature_bind_port_externalip_73\node5\regtest\blocks\index: 0000000000000000 
     node1 2026-05-20T16:50:23.692475Z [shutoff] [D:\a\bitcoin\bitcoin\src\node\mempool_persist.cpp:221] [DumpMempool] Dumped mempool: 0.000s to copy, 0.014s to dump, 27 bytes dumped to file 
     node1 2026-05-20T16:50:23.692505Z [shutoff] [D:\a\bitcoin\bitcoin\src\policy\fees\block_policy_estimator.cpp:1075] [FlushUnconfirmed] [estimatefee] Recorded 0 unconfirmed txs from mempool in 0.000s 
     node6 2026-05-20T16:50:23.694706Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:250] [CDBWrapper] Opened LevelDB successfully 
     node6 2026-05-20T16:50:23.694753Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:266] [CDBWrapper] Using obfuscation key for D:\a\bitcoin\bitcoin\test_runner_₿_🏃_20260520_163739\feature_bind_port_externalip_73\node6\regtest\blocks\index: 0000000000000000 
     node3 2026-05-20T16:50:23.695641Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:250] [CDBWrapper] Opened LevelDB successfully 
     node3 2026-05-20T16:50:23.695687Z [init] [D:\a\bitcoin\bitcoin\src\dbwrapper.cpp:266] [CDBWrapper] Using obfuscation key for D:\a\bitcoin\bitcoin\test_runner_₿_🏃_20260520_163739\feature_bind_port_externalip_73\node3\regtest\blocks\index: 0000000000000000 
     node5 2026-05-20T16:50:23.695971Z [init] [D:\a\bitcoin\bitcoin\src\script\sigcache.cpp:35] [SignatureCache] Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 
     node1 2026-05-20T16:50:23.696718Z [shutoff] [D:\a\bitcoin\bitcoin\src\policy\fees\block_policy_estimator.cpp:975] [FlushFeeEstimates] [estimatefee] Flushed fee estimates to D:\a\bitcoin\bitcoin\test_runner_₿_🏃_20260520_163739\feature_bind_port_externalip_73\node1\regtest\fee_estimates.dat. 
     node1 2026-05-20T16:50:23.696766Z [shutoff] [D:\a\bitcoin\bitcoin\src\validation.cpp:2770] [FlushStateToDisk] [coindb] Writing chainstate to disk: flush mode=FORCE_FLUSH, prune=0, large=0, critical=0, periodic=0 
     node1 2026-05-20T16:50:23.696845Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] FlushStateToDisk: write block and undo data to disk started 
     node6 2026-05-20T16:50:23.698413Z [init] [D:\a\bitcoin\bitcoin\src\script\sigcache.cpp:35] [SignatureCache] Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 
     node1 2026-05-20T16:50:23.698941Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] FlushStateToDisk: write block and undo data to disk completed (2.05ms) 
     node1 2026-05-20T16:50:23.698979Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] FlushStateToDisk: write block index to disk started 
     node1 2026-05-20T16:50:23.699631Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] FlushStateToDisk: write block index to disk completed (0.63ms) 
     node3 2026-05-20T16:50:23.699660Z [init] [D:\a\bitcoin\bitcoin\src\script\sigcache.cpp:35] [SignatureCache] Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 
     node5 2026-05-20T16:50:23.699711Z [init] [D:\a\bitcoin\bitcoin\src\validation.cpp:2035] [ValidationCache] Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements 
     node1 2026-05-20T16:50:23.699725Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] BatchWrite: write coins cache to disk (0 out of 0 cached coins) started 
     node1 2026-05-20T16:50:23.699751Z [shutoff] [D:\a\bitcoin\bitcoin\src\txdb.cpp:168] [BatchWrite] [coindb] Writing final batch of 0.00 MiB 
     node5 2026-05-20T16:50:23.699768Z [init] [D:\a\bitcoin\bitcoin\src\noui.cpp:54] [noui_InitMessage] init message: Loading block index… 
     node5 2026-05-20T16:50:23.699791Z [init] [D:\a\bitcoin\bitcoin\src\node\chainstate.cpp:157] [LoadChainstate] Validating signatures for all blocks. 
     node1 2026-05-20T16:50:23.699806Z [shutoff] [D:\a\bitcoin\bitcoin\src\txdb.cpp:170] [BatchWrite] [coindb] Committed 0 changed transaction outputs (out of 0) to coin database... 
     node5 2026-05-20T16:50:23.699817Z [init] [D:\a\bitcoin\bitcoin\src\node\chainstate.cpp:159] [LoadChainstate] Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000 
     node1 2026-05-20T16:50:23.699837Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] BatchWrite: write coins cache to disk (0 out of 0 cached coins) completed (0.09ms) 
     node5 2026-05-20T16:50:23.699888Z [init] [D:\a\bitcoin\bitcoin\src\node\blockstorage.cpp:545] [LoadBlockIndexDB] Loading block index db: last block file = 0 
     node1 2026-05-20T16:50:23.699910Z [shutoff] [D:\a\bitcoin\bitcoin\src\validationinterface.cpp:262] [ChainStateFlushed] [validation] Enqueuing ChainStateFlushed: block hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 
     node5 2026-05-20T16:50:23.699926Z [init] [D:\a\bitcoin\bitcoin\src\node\blockstorage.cpp:549] [LoadBlockIndexDB] Loading block index db: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01) 
     node1 2026-05-20T16:50:23.699941Z [shutoff] [D:\a\bitcoin\bitcoin\src\validationinterface.cpp:262] [operator ()] [validation] ChainStateFlushed: block hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 
     node5 2026-05-20T16:50:23.699949Z [init] [D:\a\bitcoin\bitcoin\src\node\blockstorage.cpp:560] [LoadBlockIndexDB] Checking all blk files are present... 
     node1 2026-05-20T16:50:23.699972Z [shutoff] [D:\a\bitcoin\bitcoin\src\validation.cpp:2770] [FlushStateToDisk] [coindb] Writing chainstate to disk: flush mode=FORCE_FLUSH, prune=0, large=0, critical=0, periodic=0 
     node1 2026-05-20T16:50:23.700040Z [shutoff] [D:\a\bitcoin\bitcoin\src\logging/timer.h:58] [Log] [bench] FlushStateToDisk: write block and undo data to disk started 
     test  2026-05-20T16:50:23.701866Z TestFramework (ERROR): Unexpected exception: 
                                       Traceback (most recent call last):
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\test_framework.py", line 139, in main
                                           self.setup()
                                           ~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\test_framework.py", line 272, in setup
                                           self.setup_network()
                                           ~~~~~~~~~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\feature_bind_port_externalip.py", line 56, in setup_network
                                           self.setup_nodes()
                                           ~~~~~~~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\feature_bind_port_externalip.py", line 65, in setup_nodes
                                           self.start_nodes()
                                           ~~~~~~~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\test_framework.py", line 518, in start_nodes
                                           node.wait_for_rpc_connection()
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\test_node.py", line 332, in wait_for_rpc_connection
                                           rpc.getblockcount()
                                           ~~~~~~~~~~~~~~~~~^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\coverage.py", line 50, in __call__
                                           return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\authproxy.py", line 133, in __call__
                                           response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
                                                              ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                         File "D:\a\bitcoin\bitcoin\build\test\functional\test_framework\authproxy.py", line 106, in _request
                                           self.__conn.request(method, path, postdata, headers)
                                           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                         File "C:\hostedtoolcache\windows\Python\3.14.5\x64\Lib\http\client.py", line 1367, in request
                                           self._send_request(method, url, body, headers, encode_chunked)
                                           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                         File "C:\hostedtoolcache\windows\Python\3.14.5\x64\Lib\http\client.py", line 1413, in _send_request
                                           self.endheaders(body, encode_chunked=encode_chunked)
                                           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                         File "C:\hostedtoolcache\windows\Python\3.14.5\x64\Lib\http\client.py", line 1362, in endheaders
                                           self._send_output(message_body, encode_chunked=encode_chunked)
                                           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                         File "C:\hostedtoolcache\windows\Python\3.14.5\x64\Lib\http\client.py", line 1161, in _send_output
                                           self.send(chunk)
                                           ~~~~~~~~~^^^^^^^
                                         File "C:\hostedtoolcache\windows\Python\3.14.5\x64\Lib\http\client.py", line 1086, in send
                                           self.sock.sendall(data)
                                           ~~~~~~~~~~~~~~~~~^^^^^^
                                       ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
    
    
  2. fanquake added the label CI failed on May 21, 2026
  3. fanquake commented at 10:07 AM on May 21, 2026: member

    cc @vasild

  4. maflcko added the label Windows on May 21, 2026
  5. maflcko added this to the milestone 32.0 on May 21, 2026
  6. willcl-ark commented at 10:43 AM on May 21, 2026: member

    My LLM suggests the following:

    <details> <summary>analysis</summary>

    feature_bind_port_externalip.py now runs by default and tries to detect whether 1.1.1.5 is configured by starting nodes with -bind=1.1.1.5..., then converting a FailedToStartError containing Unable to bind to into SkipTest:

    test/functional/feature_bind_port_externalip.py:62

    That works only if wait_for_rpc_connection() first observes that bitcoind exited:

    test/functional/test_framework/test_node.py:316

    On Windows CI, bitcoind fails as expected because 1.1.1.5 is not assigned:

    Unable to bind to 1.1.1.5:30002 ... (10049)

    But intermittently, while the process is shutting down, the RPC probe hits this path first:

    test/functional/test_framework/test_node.py:332

    and Python raises:

    ConnectionAbortedError: [WinError 10053]

    That is an OSError, but wait_for_rpc_connection() only suppresses ECONNRESET, ETIMEDOUT, and ECONNREFUSED during startup:

    test/functional/test_framework/test_node.py:383

    It does not suppress Windows’ ECONNABORTED / WSAECONNABORTED, so the exception escapes before the test can turn the bind failure into a skip. That is why it is intermittent: it depends on whether the loop notices process exit before or after the aborted RPC connection.

    The branch also only configures 1.1.1.5 inside the Docker CI container:

    ci/test/02_run_container.py:102

    Native Windows CI does not get that address, so it relies on this autodetect-and-skip behavior, which is racy.

    </details>

    with a fix:

    <details> <summary>patch</summary>

    diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
    index 541c758b5ec..5af081420ae 100755
    --- a/test/functional/test_framework/test_node.py
    +++ b/test/functional/test_framework/test_node.py
    @@ -378,9 +378,13 @@ class TestNode():
                         # doesn't specify errno.
                         elif isinstance(e, ConnectionResetError):
                             error_num = errno.ECONNRESET
    +                    # Windows can raise this while bitcoind shuts down during startup.
    +                    elif isinstance(e, ConnectionAbortedError):
    +                        error_num = errno.ECONNABORTED
     
                     # Suppress similarly to the above JSONRPCException errors.
                     if error_num not in [
    +                    errno.ECONNABORTED, # Treat identical to ECONNRESET
                         errno.ECONNRESET,   # This might happen when the RPC server is in warmup,
                                             # but shut down before the call to getblockcount succeeds.
                         errno.ETIMEDOUT,    # Treat identical to ECONNRESET
    

    </details>

    As with other windows-related failures, I have no windows machine to test on, I'm afraid. But making “aborted RPC connection during startup” retryable, like reset/refused/timed-out connections already are, seems sane-enough to me. I suppose a startup bug causing intermittent ECONNABORTED followed by eventual successful startup would now be tolerated, but this is already the case for other classes of errors, too.

  7. ryanofsky commented at 12:38 PM on May 21, 2026: contributor

    Explanation in #35343 (comment) makes sense to me and fix seems likely to work

  8. sedited closed this on May 21, 2026

  9. sedited referenced this in commit 7209eb7790 on May 21, 2026
  10. sedited referenced this in commit 37d7ce47c5 on May 21, 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-05-22 20:51 UTC

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