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

issue fanquake opened this issue on April 25, 2025
  1. fanquake commented at 9:58 AM on April 25, 2025: member
    make -C depends/
    cmake -B build --toolchain /root/bitcoin/depends/aarch64-unknown-linux-gnu/toolchain.cmake -DENABLE_WALLET=OFF
    cmake --build build
    ./build/test/functional/test_runner.py
    <snip>
    wallet_watchonly.py --legacy-wallet                                  | ○ Skipped | 1 s
    wallet_watchonly.py --usecli --legacy-wallet                         | ○ Skipped | 0 s
    feature_rbf.py                                                       | ✖ Failed  | 10 s
    interface_bitcoin_cli.py --legacy-wallet                             | ✖ Failed  | 2 s
    rpc_rawtransaction.py --legacy-wallet                                | ✖ Failed  | 4 s
    
    ALL                                                                  | ✖ Failed  | 1649 s (accumulated) 
    Runtime: 109 s
    
    ./build/test/functional/test_runner.py feature_rbf.py
    Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095628
    Remaining jobs: [feature_rbf.py]
    1/1 - feature_rbf.py failed, Duration: 9 s
    
    stdout:
    2025-04-25T09:56:28.807000Z TestFramework (INFO): PRNG seed is: 5062381283780844628
    2025-04-25T09:56:28.810000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095628/feature_rbf_0
    2025-04-25T09:56:29.888000Z TestFramework (INFO): Running test simple doublespend...
    2025-04-25T09:56:29.900000Z TestFramework (INFO): Running test doublespend chain...
    2025-04-25T09:56:31.122000Z TestFramework (INFO): Running test doublespend tree...
    2025-04-25T09:56:35.126000Z TestFramework (INFO): Running test replacement feeperkb...
    2025-04-25T09:56:35.198000Z TestFramework (INFO): Running test spends of conflicting outputs...
    2025-04-25T09:56:35.273000Z TestFramework (INFO): Running test new unconfirmed inputs...
    2025-04-25T09:56:35.313000Z TestFramework (INFO): Running test too many replacements...
    2025-04-25T09:56:36.130000Z TestFramework (INFO): Running test too many replacements using default mempool params...
    2025-04-25T09:56:37.759000Z TestFramework (INFO): Running test RPC...
    2025-04-25T09:56:37.766000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
        self.run_test()
        ~~~~~~~~~~~~~^^
      File "/root/bitcoin/build/test/functional/feature_rbf.py", line 69, in run_test
        self.test_rpc()
        ~~~~~~~~~~~~~^^
      File "/root/bitcoin/build/test/functional/feature_rbf.py", line 571, in test_rpc
        self.init_wallet(node=0)
        ~~~~~~~~~~~~~~~~^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
        n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
        ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
        return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
        raise JSONRPCException(response['error'], status)
    test_framework.authproxy.JSONRPCException: Method not found (-32601)
    2025-04-25T09:56:37.819000Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    
    ./build/test/functional/test_runner.py "interface_bitcoin_cli.py --legacy-wallet"
    Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095732
    Remaining jobs: [interface_bitcoin_cli.py --legacy-wallet]
    1/1 - interface_bitcoin_cli.py --legacy-wallet failed, Duration: 2 s
    
    stdout:
    2025-04-25T09:57:32.579000Z TestFramework (INFO): PRNG seed is: 8443230222166435487
    2025-04-25T09:57:32.580000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095732/interface_bitcoin_cli_0
    2025-04-25T09:57:32.936000Z TestFramework (INFO): Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`
    2025-04-25T09:57:32.944000Z TestFramework (INFO): Test named arguments
    2025-04-25T09:57:32.963000Z TestFramework (INFO): Test that later cli named arguments values silently overwrite earlier ones
    2025-04-25T09:57:32.978000Z TestFramework (INFO): Test -stdinrpcpass option
    2025-04-25T09:57:33.243000Z TestFramework (INFO): Test -stdin and -stdinrpcpass
    2025-04-25T09:57:33.505000Z TestFramework (INFO): Test connecting to a non-existing server
    2025-04-25T09:57:33.512000Z TestFramework (INFO): Test handling of invalid ports in rpcconnect
    2025-04-25T09:57:33.531000Z TestFramework (INFO): Checking for IPv6
    2025-04-25T09:57:33.556000Z TestFramework (INFO): Test handling of invalid ports in rpcport
    2025-04-25T09:57:33.575000Z TestFramework (INFO): Test port usage preferences
    2025-04-25T09:57:33.622000Z TestFramework (INFO): Test connecting with non-existing RPC cookie file
    2025-04-25T09:57:33.879000Z TestFramework (INFO): Test connecting without RPC cookie file and with password arg
    2025-04-25T09:57:33.884000Z TestFramework (INFO): Test -getinfo with arguments fails
    2025-04-25T09:57:33.888000Z TestFramework (INFO): Test -getinfo with -color=never does not return ANSI escape codes
    2025-04-25T09:57:33.895000Z TestFramework (INFO): Test -getinfo with -color=always returns ANSI escape codes
    2025-04-25T09:57:33.906000Z TestFramework (INFO): Test -getinfo with invalid value for -color option
    2025-04-25T09:57:33.915000Z TestFramework (INFO): Test -getinfo returns expected network and blockchain info
    2025-04-25T09:57:33.917000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
        self.run_test()
        ~~~~~~~~~~~~~^^
      File "/root/bitcoin/build/test/functional/interface_bitcoin_cli.py", line 184, in run_test
        self.import_deterministic_coinbase_privkeys()
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 493, in import_deterministic_coinbase_privkeys
        self.init_wallet(node=i)
        ~~~~~~~~~~~~~~~~^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
        n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
        ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
        return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
        raise JSONRPCException(response['error'], status)
    test_framework.authproxy.JSONRPCException: Method not found (-32601)
    2025-04-25T09:57:33.971000Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    
    ./build/test/functional/test_runner.py "rpc_rawtransaction.py --legacy-wallet"
    Temporary test directory at /tmp/test_runner_₿_🏃_20250425_095758
    Remaining jobs: [rpc_rawtransaction.py --legacy-wallet]
    1/1 - rpc_rawtransaction.py --legacy-wallet failed, Duration: 4 s
    
    stdout:
    2025-04-25T09:57:58.860000Z TestFramework (INFO): PRNG seed is: 1212977684088360964
    2025-04-25T09:57:58.861000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250425_095758/rpc_rawtransaction_0
    2025-04-25T09:58:01.196000Z TestFramework (INFO): Test getrawtransaction with -txindex
    2025-04-25T09:58:01.214000Z TestFramework (INFO): Test getrawtransaction without -txindex
    2025-04-25T09:58:02.260000Z TestFramework (INFO): Test getrawtransaction with -txindex, with blockhash
    2025-04-25T09:58:02.262000Z TestFramework (INFO): Test getrawtransaction with -txindex, without blockhash: 'in_active_chain' should be absent
    2025-04-25T09:58:02.282000Z TestFramework (INFO): Test getrawtransaction without -txindex, with blockhash
    2025-04-25T09:58:02.284000Z TestFramework (INFO): Test getrawtransaction without -txindex, without blockhash: expect the call to raise
    2025-04-25T09:58:02.298000Z TestFramework (INFO): Test getrawtransaction on genesis block coinbase returns an error
    2025-04-25T09:58:02.302000Z TestFramework (INFO): Test createrawtransaction
    2025-04-25T09:58:02.409000Z TestFramework (INFO): Test sendrawtransaction with missing input
    2025-04-25T09:58:02.422000Z TestFramework (INFO): Test sendrawtransaction exceeding, falling short of, and equaling maxburnamount
    2025-04-25T09:58:02.452000Z TestFramework (INFO): Test sendrawtransaction/testmempoolaccept with maxfeerate
    2025-04-25T09:58:02.468000Z TestFramework (INFO): Test sendrawtransaction/testmempoolaccept with tx outputs already in the utxo set
    2025-04-25T09:58:02.490000Z TestFramework (INFO): Test decoderawtransaction
    2025-04-25T09:58:02.498000Z TestFramework (INFO): Test transaction version numbers
    2025-04-25T09:58:02.505000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 182, in main
        self.run_test()
        ~~~~~~~~~~~~~^^
      File "/root/bitcoin/build/test/functional/rpc_rawtransaction.py", line 95, in run_test
        self.import_deterministic_coinbase_privkeys()
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 493, in import_deterministic_coinbase_privkeys
        self.init_wallet(node=i)
        ~~~~~~~~~~~~~~~~^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 500, in init_wallet
        n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
        ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/test_node.py", line 943, in createwallet
        return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/root/bitcoin/test/functional/test_framework/authproxy.py", line 151, in __call__
        raise JSONRPCException(response['error'], status)
    test_framework.authproxy.JSONRPCException: Method not found (-32601)
    2025-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
    Configure summary
    =================
    Executables:
      bitcoind ............................ ON
      bitcoin-node (multiprocess) ......... OFF
      bitcoin-qt (GUI) .................... ON
      bitcoin-gui (GUI, multiprocess) ..... OFF
      bitcoin-cli ......................... ON
      bitcoin-tx .......................... ON
      bitcoin-util ........................ ON
      bitcoin-wallet ...................... OFF
      bitcoin-chainstate (experimental) ... OFF
      libbitcoinkernel (experimental) ..... OFF
    Optional features:
      wallet support ...................... OFF
      external signer ..................... ON
      ZeroMQ .............................. ON
      IPC ................................. OFF
      USDT tracing ........................ ON
      QR code (GUI) ....................... ON
      DBus (GUI, Linux only) .............. ON
    Tests:
      test_bitcoin ........................ ON
      test_bitcoin-qt ..................... ON
      bench_bitcoin ....................... OFF
      fuzz binary ......................... OFF
    
    Cross compiling ....................... FALSE
    C++ compiler .......................... GNU 15.0.1, /usr/lib64/ccache/g++
    CMAKE_BUILD_TYPE ...................... RelWithDebInfo
    Preprocessor defined macros ........... 
    C++ 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
    Linker 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
    
    NOTE: The summary above may not exactly match the final applied build flags
          if any additional CMAKE_* or environment variables have been modified.
          To see the exact flags applied, build with the --verbose option.
    
    Attempt to harden executables ......... ON
    Treat compiler warnings as errors ..... OFF
    Use ccache for compiling .............. ON
    
    
    -- Configuring done (33.7s)
    -- Generating done (0.2s)
    -- 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?

    # Copyright (c) 2013-2016 The Bitcoin Core developers
    # Distributed under the MIT software license, see the accompanying
    # file COPYING or http://www.opensource.org/licenses/mit-license.php.
    
    # These environment variables are set by the build process and read by
    # test/*/test_runner.py and test/util/rpcauth-test.py
    
    [environment]
    CLIENT_NAME=Bitcoin Core
    CLIENT_BUGREPORT=https://github.com/bitcoin/bitcoin/issues
    SRCDIR=/root/bitcoin
    BUILDDIR=/root/bitcoin/build
    EXEEXT=
    RPCAUTH=/root/bitcoin/share/rpcauth/rpcauth.py
    
    [components]
    # Which components are enabled. These are commented out by cmake if they were disabled during configuration.
    #ENABLE_WALLET=true
    USE_BDB=true
    ENABLE_CLI=true
    ENABLE_BITCOIN_UTIL=true
    #ENABLE_BITCOIN_CHAINSTATE=true
    #ENABLE_WALLET_TOOL=true
    ENABLE_BITCOIND=true
    #ENABLE_FUZZ_BINARY=true
    ENABLE_ZMQ=true
    ENABLE_EXTERNAL_SIGNER=true
    ENABLE_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.

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

Milestone
30.0


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 18:12 UTC

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