test: functional test failures under -DENABLE_WALLET=OFF #32347

issue fanquake openend this issue on April 25, 2025
  1. fanquake commented at 9:58 am on April 25, 2025: member
     0make -C depends/
     1cmake -B build --toolchain /root/bitcoin/depends/aarch64-unknown-linux-gnu/toolchain.cmake -DENABLE_WALLET=OFF
     2cmake --build build
     3./build/test/functional/test_runner.py
     4<snip>
     5wallet_watchonly.py --legacy-wallet                                  | ○ Skipped | 1 s
     6wallet_watchonly.py --usecli --legacy-wallet                         | ○ Skipped | 0 s
     7feature_rbf.py                                                       | ✖ Failed  | 10 s
     8interface_bitcoin_cli.py --legacy-wallet                             | ✖ Failed  | 2 s
     9rpc_rawtransaction.py --legacy-wallet                                | ✖ Failed  | 4 s
    10
    11ALL                                                                  | ✖ Failed  | 1649 s (accumulated) 
    12Runtime: 109 s
    
     0./build/test/functional/test_runner.py feature_rbf.py
     1Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095628
     2Remaining jobs: [feature_rbf.py]
     31/1 - feature_rbf.py failed, Duration: 9 s
     4
     5stdout:
     62025-04-25T09:56:28.807000Z TestFramework (INFO): PRNG seed is: 5062381283780844628
     72025-04-25T09:56:28.810000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095628/feature_rbf_0
     82025-04-25T09:56:29.888000Z TestFramework (INFO): Running test simple doublespend...
     92025-04-25T09:56:29.900000Z TestFramework (INFO): Running test doublespend chain...
    102025-04-25T09:56:31.122000Z TestFramework (INFO): Running test doublespend tree...
    112025-04-25T09:56:35.126000Z TestFramework (INFO): Running test replacement feeperkb...
    122025-04-25T09:56:35.198000Z TestFramework (INFO): Running test spends of conflicting outputs...
    132025-04-25T09:56:35.273000Z TestFramework (INFO): Running test new unconfirmed inputs...
    142025-04-25T09:56:35.313000Z TestFramework (INFO): Running test too many replacements...
    152025-04-25T09:56:36.130000Z TestFramework (INFO): Running test too many replacements using default mempool params...
    162025-04-25T09:56:37.759000Z TestFramework (INFO): Running test RPC...
    172025-04-25T09:56:37.766000Z TestFramework (ERROR): JSONRPC error
    18Traceback (most recent call last):
    19  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
    20    self.run_test()
    21    ~~~~~~~~~~~~~^^
    22  File "/root/bitcoin/build/test/functional/feature_rbf.py", line 69, in run_test
    23    self.test_rpc()
    24    ~~~~~~~~~~~~~^^
    25  File "/root/bitcoin/build/test/functional/feature_rbf.py", line 571, in test_rpc
    26    self.init_wallet(node=0)
    27    ~~~~~~~~~~~~~~~~^^^^^^^^
    28  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
    29    n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
    30    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    31  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
    32    return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
    33           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    34  File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
    35    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    36  File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
    37    raise JSONRPCException(response['error'], status)
    38test_framework.authproxy.JSONRPCException: Method not found (-32601)
    392025-04-25T09:56:37.819000Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    
     0./build/test/functional/test_runner.py "interface_bitcoin_cli.py --legacy-wallet"
     1Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095732
     2Remaining jobs: [interface_bitcoin_cli.py --legacy-wallet]
     31/1 - interface_bitcoin_cli.py --legacy-wallet failed, Duration: 2 s
     4
     5stdout:
     62025-04-25T09:57:32.579000Z TestFramework (INFO): PRNG seed is: 8443230222166435487
     72025-04-25T09:57:32.580000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095732/interface_bitcoin_cli_0
     82025-04-25T09:57:32.936000Z TestFramework (INFO): Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`
     92025-04-25T09:57:32.944000Z TestFramework (INFO): Test named arguments
    102025-04-25T09:57:32.963000Z TestFramework (INFO): Test that later cli named arguments values silently overwrite earlier ones
    112025-04-25T09:57:32.978000Z TestFramework (INFO): Test -stdinrpcpass option
    122025-04-25T09:57:33.243000Z TestFramework (INFO): Test -stdin and -stdinrpcpass
    132025-04-25T09:57:33.505000Z TestFramework (INFO): Test connecting to a non-existing server
    142025-04-25T09:57:33.512000Z TestFramework (INFO): Test handling of invalid ports in rpcconnect
    152025-04-25T09:57:33.531000Z TestFramework (INFO): Checking for IPv6
    162025-04-25T09:57:33.556000Z TestFramework (INFO): Test handling of invalid ports in rpcport
    172025-04-25T09:57:33.575000Z TestFramework (INFO): Test port usage preferences
    182025-04-25T09:57:33.622000Z TestFramework (INFO): Test connecting with non-existing RPC cookie file
    192025-04-25T09:57:33.879000Z TestFramework (INFO): Test connecting without RPC cookie file and with password arg
    202025-04-25T09:57:33.884000Z TestFramework (INFO): Test -getinfo with arguments fails
    212025-04-25T09:57:33.888000Z TestFramework (INFO): Test -getinfo with -color=never does not return ANSI escape codes
    222025-04-25T09:57:33.895000Z TestFramework (INFO): Test -getinfo with -color=always returns ANSI escape codes
    232025-04-25T09:57:33.906000Z TestFramework (INFO): Test -getinfo with invalid value for -color option
    242025-04-25T09:57:33.915000Z TestFramework (INFO): Test -getinfo returns expected network and blockchain info
    252025-04-25T09:57:33.917000Z TestFramework (ERROR): JSONRPC error
    26Traceback (most recent call last):
    27  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
    28    self.run_test()
    29    ~~~~~~~~~~~~~^^
    30  File "/root/bitcoin/build/test/functional/interface_bitcoin_cli.py", line 184, in run_test
    31    self.import_deterministic_coinbase_privkeys()
    32    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    33  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 493, in import_deterministic_coinbase_privkeys
    34    self.init_wallet(node=i)
    35    ~~~~~~~~~~~~~~~~^^^^^^^^
    36  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
    37    n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
    38    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    39  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
    40    return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
    41           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    42  File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
    43    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    44  File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
    45    raise JSONRPCException(response['error'], status)
    46test_framework.authproxy.JSONRPCException: Method not found (-32601)
    472025-04-25T09:57:33.971000Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    
     0./build/test/functional/test_runner.py "rpc_rawtransaction.py --legacy-wallet"
     1Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095758
     2Remaining jobs: [rpc_rawtransaction.py --legacy-wallet]
     31/1 - rpc_rawtransaction.py --legacy-wallet failed, Duration: 4 s
     4
     5stdout:
     62025-04-25T09:57:58.860000Z TestFramework (INFO): PRNG seed is: 1212977684088360964
     72025-04-25T09:57:58.861000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095758/rpc_rawtransaction_0
     82025-04-25T09:58:01.196000Z TestFramework (INFO): Test getrawtransaction with -txindex
     92025-04-25T09:58:01.214000Z TestFramework (INFO): Test getrawtransaction without -txindex
    102025-04-25T09:58:02.260000Z TestFramework (INFO): Test getrawtransaction with -txindex, with blockhash
    112025-04-25T09:58:02.262000Z TestFramework (INFO): Test getrawtransaction with -txindex, without blockhash: 'in_active_chain' should be absent
    122025-04-25T09:58:02.282000Z TestFramework (INFO): Test getrawtransaction without -txindex, with blockhash
    132025-04-25T09:58:02.284000Z TestFramework (INFO): Test getrawtransaction without -txindex, without blockhash: expect the call to raise
    142025-04-25T09:58:02.298000Z TestFramework (INFO): Test getrawtransaction on genesis block coinbase returns an error
    152025-04-25T09:58:02.302000Z TestFramework (INFO): Test createrawtransaction
    162025-04-25T09:58:02.409000Z TestFramework (INFO): Test sendrawtransaction with missing input
    172025-04-25T09:58:02.422000Z TestFramework (INFO): Test sendrawtransaction exceeding, falling short of, and equaling maxburnamount
    182025-04-25T09:58:02.452000Z TestFramework (INFO): Test sendrawtransaction/testmempoolaccept with maxfeerate
    192025-04-25T09:58:02.468000Z TestFramework (INFO): Test sendrawtransaction/testmempoolaccept with tx outputs already in the utxo set
    202025-04-25T09:58:02.490000Z TestFramework (INFO): Test decoderawtransaction
    212025-04-25T09:58:02.498000Z TestFramework (INFO): Test transaction version numbers
    222025-04-25T09:58:02.505000Z TestFramework (ERROR): JSONRPC error
    23Traceback (most recent call last):
    24  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
    25    self.run_test()
    26    ~~~~~~~~~~~~~^^
    27  File "/root/bitcoin/build/test/functional/rpc_rawtransaction.py", line 95, in run_test
    28    self.import_deterministic_coinbase_privkeys()
    29    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    30  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 493, in import_deterministic_coinbase_privkeys
    31    self.init_wallet(node=i)
    32    ~~~~~~~~~~~~~~~~^^^^^^^^
    33  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
    34    n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
    35    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    36  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
    37    return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
    38           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    39  File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
    40    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    41  File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
    42    raise JSONRPCException(response['error'], status)
    43test_framework.authproxy.JSONRPCException: Method not found (-32601)
    442025-04-25T09:58:02.559000Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    
  2. maflcko commented at 10:33 am on April 25, 2025: member

    The no wallet CI task passes: https://cirrus-ci.com/task/5884997988515840?logs=ci#L3274

    What is the configure summary?

  3. fanquake commented at 10:40 am on April 25, 2025: member
     0Configure summary
     1=================
     2Executables:
     3  bitcoind ............................ ON
     4  bitcoin-node (multiprocess) ......... OFF
     5  bitcoin-qt (GUI) .................... ON
     6  bitcoin-gui (GUI, multiprocess) ..... OFF
     7  bitcoin-cli ......................... ON
     8  bitcoin-tx .......................... ON
     9  bitcoin-util ........................ ON
    10  bitcoin-wallet ...................... OFF
    11  bitcoin-chainstate (experimental) ... OFF
    12  libbitcoinkernel (experimental) ..... OFF
    13Optional features:
    14  wallet support ...................... OFF
    15  external signer ..................... ON
    16  ZeroMQ .............................. ON
    17  IPC ................................. OFF
    18  USDT tracing ........................ ON
    19  QR code (GUI) ....................... ON
    20  DBus (GUI, Linux only) .............. ON
    21Tests:
    22  test_bitcoin ........................ ON
    23  test_bitcoin-qt ..................... ON
    24  bench_bitcoin ....................... OFF
    25  fuzz binary ......................... OFF
    26
    27Cross compiling ....................... FALSE
    28C++ compiler .......................... GNU 15.0.1, /usr/lib64/ccache/g++
    29CMAKE_BUILD_TYPE ...................... RelWithDebInfo
    30Preprocessor defined macros ........... 
    31C++ compiler flags .................... -pipe -std=c++20 -O2 -O2 -g -std=c++20 -fPIC -fno-extended-identifiers -fdebug-prefix-map=/root/bitcoin/src=. -fmacro-prefix-map=/root/bitcoin/src=. -fstack-reuse=none -Wall -Wextra -Wformat -Wformat-security -Wvla -Wredundant-decls -Wdate-time -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wbidi-chars=any -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fstack-clash-protection -mbranch-protection=standard
    32Linker flags .......................... -pipe -std=c++20 -O2 -O2 -g -fstack-reuse=none -fstack-protector-all -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
    33
    34NOTE: The summary above may not exactly match the final applied build flags
    35      if any additional CMAKE_* or environment variables have been modified.
    36      To see the exact flags applied, build with the --verbose option.
    37
    38Attempt to harden executables ......... ON
    39Treat compiler warnings as errors ..... OFF
    40Use ccache for compiling .............. ON
    41
    42
    43-- Configuring done (33.7s)
    44-- Generating done (0.2s)
    45-- Build files have been written to: /root/bitcoin/build
    
  4. davidgumberg commented at 10:29 pm on April 30, 2025: contributor

    I couldn’t reproduce this on x86_64 linux, could you share the build/test/config.ini file?

    AFAICT, none of these lines that result in a crash should be running when is_wallet_compiled() == false, and that’s based on the contents of config.ini:

    https://github.com/bitcoin/bitcoin/blob/68ac9f116c0228a277f18f60ba2278b56356e6ac/test/functional/test_framework/test_framework.py#L268-L270

    https://github.com/bitcoin/bitcoin/blob/68ac9f116c0228a277f18f60ba2278b56356e6ac/test/functional/test_framework/test_framework.py#L1036-L1038

  5. fanquake commented at 9:58 am on May 1, 2025: member

    could you share the build/test/config.ini file?

     0# Copyright (c) 2013-2016 The Bitcoin Core developers
     1# Distributed under the MIT software license, see the accompanying
     2# file COPYING or http://www.opensource.org/licenses/mit-license.php.
     3
     4# These environment variables are set by the build process and read by
     5# test/*/test_runner.py and test/util/rpcauth-test.py
     6
     7[environment]
     8CLIENT_NAME=Bitcoin Core
     9CLIENT_BUGREPORT=https://github.com/bitcoin/bitcoin/issues
    10SRCDIR=/root/bitcoin
    11BUILDDIR=/root/bitcoin/build
    12EXEEXT=
    13RPCAUTH=/root/bitcoin/share/rpcauth/rpcauth.py
    14
    15[components]
    16# Which components are enabled. These are commented out by cmake if they were disabled during configuration.
    17#ENABLE_WALLET=true
    18USE_BDB=true
    19ENABLE_CLI=true
    20ENABLE_BITCOIN_UTIL=true
    21#ENABLE_BITCOIN_CHAINSTATE=true
    22#ENABLE_WALLET_TOOL=true
    23ENABLE_BITCOIND=true
    24#ENABLE_FUZZ_BINARY=true
    25ENABLE_ZMQ=true
    26ENABLE_EXTERNAL_SIGNER=true
    27ENABLE_USDT_TRACEPOINTS=true
    

    Looks like this was “fixed” after #31250. I still see the failure if I checkout 971952588daebf0d4d08a7e0eeef1734fcd8a9b1 and run the same steps.

  6. davidgumberg commented at 8:11 pm on May 1, 2025: contributor

    I think #31250 genuinely fixed this, https://github.com/bitcoin/bitcoin/pull/31250/commits/c847dee1488a294c9a9632a00ba1134b21e41947, changed the logic for whether or not tests are run in all the crash cases exhibited here.

    It seems that the old is_specified_wallet_compiled used in these spots made the mistake of assuming that if BDB was enabled in the build, the wallet was enabled, when this is not the case.

     0diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
     1index 659d62530d..17cb803eb9 100755
     2--- a/test/functional/test_framework/test_framework.py
     3+++ b/test/functional/test_framework/test_framework.py
     4@@ -1067,14 +1037,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
     5-    def is_specified_wallet_compiled(self):
     6-        """Checks whether wallet support for the specified type
     7-           (legacy or descriptor wallet) was compiled."""
     8-        if self.options.descriptors:
     9-            return self.is_wallet_compiled()
    10-        else:
    11-            return self.is_bdb_compiled()
    
     0diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
     1index c7f0cc5e43..ee79a27392 100755
     2--- a/test/functional/feature_rbf.py
     3+++ b/test/functional/feature_rbf.py
     4@@ -567,7 +565,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
     5         assert_equal(json0["vin"][0]["sequence"], 4294967293)
     6         assert_equal(json1["vin"][0]["sequence"], 4294967295)
     7 
     8-        if self.is_specified_wallet_compiled():
     9+        if self.is_wallet_compiled():
    10             self.init_wallet(node=0)
    
     0diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py
     1index 2618c12e9f..5b27f0b850 100755
     2--- a/test/functional/interface_bitcoin_cli.py
     3+++ b/test/functional/interface_bitcoin_cli.py
     4BitcoinCli(BitcoinTestFramework):
     5         assert_raises_process_error(1, "Invalid value for -color option. Valid values: always, auto, never.", self.nodes[0].cli('-getinfo', '-color=foo').send_cli)
     6 
     7         self.log.info("Test -getinfo returns expected network and blockchain info")
     8-        if self.is_specified_wallet_compiled():
     9+        if self.is_wallet_compiled():
    10             self.import_deterministic_coinbase_privkeys()
    11             self.nodes[0].encryptwallet(password)
    12         cli_get_info_string = self.nodes[0].cli('-getinfo').send_cli()
    
     0diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py
     1index 3c3eb9fcb6..0f0224daaa 100755
     2--- a/test/functional/rpc_rawtransaction.py
     3+++ b/test/functional/rpc_rawtransaction.py
     4@@ -91,12 +89,8 @@ class RawTransactionsTest(BitcoinTestFramework):
     5         self.sendrawtransaction_testmempoolaccept_tests()
     6         self.decoderawtransaction_tests()
     7         self.transaction_version_number_tests()
     8-        if self.is_specified_wallet_compiled() and not self.options.descriptors:
     9-            self.import_deterministic_coinbase_privkeys()
    10-            self.raw_multisig_transaction_legacy_tests()
    
  7. maflcko commented at 9:39 am on May 2, 2025: member

    genuinely fixed this

    I agree: With the removal of is_specified_wallet_compiled this should no longer happen. Closing for now, but feel free to re-open if the issue still exists.

  8. maflcko closed this on May 2, 2025

  9. maflcko added the label Tests on May 2, 2025
  10. maflcko added the label Wallet on May 2, 2025
  11. maflcko added this to the milestone 30.0 on May 2, 2025

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: 2025-05-05 12:12 UTC

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