Segmentation fault in `psbt_wallet_tests.cpp` #20356

issue EyeOfPython opened this issue on November 9, 2020
  1. EyeOfPython commented at 6:22 PM on November 9, 2020: none

    I was running the following commands on 7e373294a5ae819099c39d9d03d1f5a311d63cfc on Mac OS 10.15.7, Xcode 12.1 (Build version 12A7403):

    ./autogen.sh
    ./configure
    make
    make check
    
    Running tests: psbt_wallet_tests from wallet/test/psbt_wallet_tests.cpp
    /bin/sh: line 1: 15175 Segmentation fault: 11  test/test_bitcoin --catch_system_errors=no -l test_suite -t "`cat wallet/test/psbt_wallet_tests.cpp | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" -- DEBUG_LOG_OUT > wallet/test/psbt_wallet_tests.cpp.log 2>&1
    Running 2 test cases...
    

    Expected behavior

    It should not throw a segmentation fault (Rust, anyone?)

    Actual behavior

    It caused a segmentation fault.

    Complete log

    $ make check
    Making check in src
    /Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS check-local
    PASS: qt/test/test_bitcoin-qt
    ============================================================================
    Testsuite summary for Bitcoin Core 0.20.99
    ============================================================================
    # TOTAL: 1
    # PASS:  1
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  0
    # XPASS: 0
    # ERROR: 0
    ============================================================================
    Running tests: arith_uint256_tests from test/arith_uint256_tests.cpp
    Running tests: addrman_tests from test/addrman_tests.cpp
    Running tests: amount_tests from test/amount_tests.cpp
    Running tests: allocator_tests from test/allocator_tests.cpp
    Running tests: base32_tests from test/base32_tests.cpp
    Running tests: base58_tests from test/base58_tests.cpp
    Running tests: base64_tests from test/base64_tests.cpp
    Running tests: bech32_tests from test/bech32_tests.cpp
    Running tests: bip32_tests from test/bip32_tests.cpp
    Running tests: blockchain_tests from test/blockchain_tests.cpp
    Running tests: blockencodings_tests from test/blockencodings_tests.cpp
    Running tests: blockfilter_tests from test/blockfilter_tests.cpp
    Running tests: blockfilter_index_tests from test/blockfilter_index_tests.cpp
    Running tests: bloom_tests from test/bloom_tests.cpp
    Running tests: bswap_tests from test/bswap_tests.cpp
    Running tests: checkqueue_tests from test/checkqueue_tests.cpp
    Running tests: coins_tests from test/coins_tests.cpp
    Running tests: compilerbug_tests from test/compilerbug_tests.cpp
    Running tests: compress_tests from test/compress_tests.cpp
    Running tests: crypto_tests from test/crypto_tests.cpp
    Running tests: cuckoocache_tests from test/cuckoocache_tests.cpp
    Running tests: denialofservice_tests from test/denialofservice_tests.cpp
    Running tests: descriptor_tests from test/descriptor_tests.cpp
    Running tests: flatfile_tests from test/flatfile_tests.cpp
    Running tests: fs_tests from test/fs_tests.cpp
    Running tests: getarg_tests from test/getarg_tests.cpp
    Running tests: hash_tests from test/hash_tests.cpp
    Running tests: interfaces_tests from test/interfaces_tests.cpp
    Running tests: key_io_tests from test/key_io_tests.cpp
    Running tests: key_tests from test/key_tests.cpp
    Running tests: logging_tests from test/logging_tests.cpp
    Running tests: dbwrapper_tests from test/dbwrapper_tests.cpp
    Running tests: validation_tests from test/validation_tests.cpp
    Running tests: mempool_tests from test/mempool_tests.cpp
    Running tests: merkle_tests from test/merkle_tests.cpp
    Running tests: merkleblock_tests from test/merkleblock_tests.cpp
    Running tests: miner_tests from test/miner_tests.cpp
    Running tests: multisig_tests from test/multisig_tests.cpp
    Running tests: net_tests from test/net_tests.cpp
    Running tests: netbase_tests from test/netbase_tests.cpp
    Running tests: pmt_tests from test/pmt_tests.cpp
    Running tests: policy_fee_tests from test/policy_fee_tests.cpp
    Running tests: policyestimator_tests from test/policyestimator_tests.cpp
    Running tests: pow_tests from test/pow_tests.cpp
    Running tests: prevector_tests from test/prevector_tests.cpp
    Running tests: raii_event_tests from test/raii_event_tests.cpp
    Running tests: random_tests from test/random_tests.cpp
    Running tests: ref_tests from test/ref_tests.cpp
    Running tests: reverselock_tests from test/reverselock_tests.cpp
    Running tests: rpc_tests from test/rpc_tests.cpp
    Running tests: sanity_tests from test/sanity_tests.cpp
    Running tests: scheduler_tests from test/scheduler_tests.cpp
    Running tests: script_p2sh_tests from test/script_p2sh_tests.cpp
    Running tests: script_tests from test/script_tests.cpp
    Running tests: script_standard_tests from test/script_standard_tests.cpp
    Running tests: scriptnum_tests from test/scriptnum_tests.cpp
    Running tests: serialize_tests from test/serialize_tests.cpp
    Running tests: settings_tests from test/settings_tests.cpp
    Running tests: sighash_tests from test/sighash_tests.cpp
    Running tests: sigopcount_tests from test/sigopcount_tests.cpp
    Running tests: skiplist_tests from test/skiplist_tests.cpp
    Running tests: streams_tests from test/streams_tests.cpp
    Running tests: sync_tests from test/sync_tests.cpp
    Running tests: system_tests from test/system_tests.cpp
    Running tests: util_threadnames_tests from test/util_threadnames_tests.cpp
    Running tests: timedata_tests from test/timedata_tests.cpp
    Running tests: torcontrol_tests from test/torcontrol_tests.cpp
    Running tests: transaction_tests from test/transaction_tests.cpp
    Running tests: txindex_tests from test/txindex_tests.cpp
    Running tests: txrequest_tests from test/txrequest_tests.cpp
    Running tests: txvalidation_tests from test/txvalidation_tests.cpp
    Running tests: txvalidationcache_tests from test/txvalidationcache_tests.cpp
    Running tests: uint256_tests from test/uint256_tests.cpp
    Running tests: util_tests from test/util_tests.cpp
    Running tests: validation_block_tests from test/validation_block_tests.cpp
    Running tests: validation_chainstate_tests from test/validation_chainstate_tests.cpp
    Running tests: validation_chainstatemanager_tests from test/validation_chainstatemanager_tests.cpp
    Running tests: validation_flush_tests from test/validation_flush_tests.cpp
    Running tests: validationinterface_tests from test/validationinterface_tests.cpp
    Running tests: versionbits_tests from test/versionbits_tests.cpp
    Running tests: db_tests from wallet/test/db_tests.cpp
    Running tests: psbt_wallet_tests from wallet/test/psbt_wallet_tests.cpp
    /bin/sh: line 1: 15175 Segmentation fault: 11  test/test_bitcoin --catch_system_errors=no -l test_suite -t "`cat wallet/test/psbt_wallet_tests.cpp | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" -- DEBUG_LOG_OUT > wallet/test/psbt_wallet_tests.cpp.log 2>&1
    Running 2 test cases...
    Entering test module "Bitcoin Core Test Suite"
    test/arith_uint256_tests.cpp:18: Test suite "arith_uint256_tests" is skipped because disabled
    test/addrman_tests.cpp:123: Test suite "addrman_tests" is skipped because disabled
    test/amount_tests.cpp:11: Test suite "amount_tests" is skipped because disabled
    test/allocator_tests.cpp:14: Test suite "allocator_tests" is skipped because disabled
    test/base32_tests.cpp:10: Test suite "base32_tests" is skipped because disabled
    test/base58_tests.cpp:19: Test suite "base58_tests" is skipped because disabled
    test/base64_tests.cpp:10: Test suite "base64_tests" is skipped because disabled
    test/bech32_tests.cpp:11: Test suite "bech32_tests" is skipped because disabled
    test/bip32_tests.cpp:124: Test suite "bip32_tests" is skipped because disabled
    test/blockchain_tests.cpp:50: Test suite "blockchain_tests" is skipped because disabled
    test/blockencodings_tests.cpp:17: Test suite "blockencodings_tests" is skipped because disabled
    test/blockfilter_tests.cpp:17: Test suite "blockfilter_tests" is skipped because disabled
    test/blockfilter_index_tests.cpp:19: Test suite "blockfilter_index_tests" is skipped because disabled
    test/bloom_tests.cpp:24: Test suite "bloom_tests" is skipped because disabled
    test/bswap_tests.cpp:10: Test suite "bswap_tests" is skipped because disabled
    test/checkqueue_tests.cpp:23: Test suite "checkqueue_tests" is skipped because disabled
    test/coins_tests.cpp:100: Test suite "coins_tests" is skipped because disabled
    test/compilerbug_tests.cpp:8: Test suite "compilerbug_tests" is skipped because disabled
    test/compress_tests.cpp:25: Test suite "compress_tests" is skipped because disabled
    test/crypto_tests.cpp:25: Test suite "crypto_tests" is skipped because disabled
    test/cuckoocache_tests.cpp:25: Test suite "cuckoocache_tests" is skipped because disabled
    test/denialofservice_tests.cpp:69: Test suite "denialofservice_tests" is skipped because disabled
    test/descriptor_tests.cpp:282: Test suite "descriptor_tests" is skipped because disabled
    test/flatfile_tests.cpp:13: Test suite "flatfile_tests" is skipped because disabled
    test/fs_tests.cpp:11: Test suite "fs_tests" is skipped because disabled
    test/getarg_tests.cpp:25: Test suite "getarg_tests" is skipped because disabled
    test/hash_tests.cpp:13: Test suite "hash_tests" is skipped because disabled
    test/interfaces_tests.cpp:16: Test suite "interfaces_tests" is skipped because disabled
    test/key_io_tests.cpp:20: Test suite "key_io_tests" is skipped because disabled
    test/key_tests.cpp:32: Test suite "key_tests" is skipped because disabled
    test/logging_tests.cpp:13: Test suite "logging_tests" is skipped because disabled
    test/dbwrapper_tests.cpp:24: Test suite "dbwrapper_tests" is skipped because disabled
    test/validation_tests.cpp:14: Test suite "validation_tests" is skipped because disabled
    test/mempool_tests.cpp:15: Test suite "mempool_tests" is skipped because disabled
    test/merkle_tests.cpp:10: Test suite "merkle_tests" is skipped because disabled
    test/merkleblock_tests.cpp:12: Test suite "merkleblock_tests" is skipped because disabled
    test/miner_tests.cpp:37: Test suite "miner_tests" is skipped because disabled
    test/multisig_tests.cpp:19: Test suite "multisig_tests" is skipped because disabled
    test/net_tests.cpp:86: Test suite "net_tests" is skipped because disabled
    test/netbase_tests.cpp:19: Test suite "netbase_tests" is skipped because disabled
    test/pmt_tests.cpp:29: Test suite "pmt_tests" is skipped because disabled
    test/policy_fee_tests.cpp:12: Test suite "policy_fee_tests" is skipped because disabled
    test/policyestimator_tests.cpp:15: Test suite "policyestimator_tests" is skipped because disabled
    test/pow_tests.cpp:12: Test suite "pow_tests" is skipped because disabled
    test/prevector_tests.cpp:16: Test suite "prevector_tests" is skipped because disabled
    test/raii_event_tests.cpp:16: Test suite "raii_event_tests" is skipped because disabled
    test/random_tests.cpp:14: Test suite "random_tests" is skipped because disabled
    test/ref_tests.cpp:9: Test suite "ref_tests" is skipped because disabled
    test/reverselock_tests.cpp:10: Test suite "reverselock_tests" is skipped because disabled
    test/rpc_tests.cpp:51: Test suite "rpc_tests" is skipped because disabled
    test/sanity_tests.cpp:11: Test suite "sanity_tests" is skipped because disabled
    test/scheduler_tests.cpp:14: Test suite "scheduler_tests" is skipped because disabled
    test/script_p2sh_tests.cpp:48: Test suite "script_p2sh_tests" is skipped because disabled
    test/script_tests.cpp:125: Test suite "script_tests" is skipped because disabled
    test/script_standard_tests.cpp:14: Test suite "script_standard_tests" is skipped because disabled
    test/scriptnum_tests.cpp:13: Test suite "scriptnum_tests" is skipped because disabled
    test/serialize_tests.cpp:15: Test suite "serialize_tests" is skipped because disabled
    test/settings_tests.cpp:44: Test suite "settings_tests" is skipped because disabled
    test/sighash_tests.cpp:117: Test suite "sighash_tests" is skipped because disabled
    test/sigopcount_tests.cpp:26: Test suite "sigopcount_tests" is skipped because disabled
    test/skiplist_tests.cpp:14: Test suite "skiplist_tests" is skipped because disabled
    test/streams_tests.cpp:10: Test suite "streams_tests" is skipped because disabled
    test/sync_tests.cpp:34: Test suite "sync_tests" is skipped because disabled
    test/system_tests.cpp:15: Test suite "system_tests" is skipped because disabled
    test/util_threadnames_tests.cpp:20: Test suite "util_threadnames_tests" is skipped because disabled
    test/timedata_tests.cpp:19: Test suite "timedata_tests" is skipped because disabled
    test/torcontrol_tests.cpp:18: Test suite "torcontrol_tests" is skipped because disabled
    test/transaction_tests.cpp:98: Test suite "transaction_tests" is skipped because disabled
    test/txindex_tests.cpp:13: Test suite "txindex_tests" is skipped because disabled
    test/txrequest_tests.cpp:17: Test suite "txrequest_tests" is skipped because disabled
    test/txvalidation_tests.cpp:14: Test suite "txvalidation_tests" is skipped because disabled
    test/txvalidationcache_tests.cpp:18: Test suite "txvalidationcache_tests" is skipped because disabled
    test/uint256_tests.cpp:17: Test suite "uint256_tests" is skipped because disabled
    test/util_tests.cpp:43: Test suite "util_tests" is skipped because disabled
    test/validation_block_tests.cpp:33: Test suite "validation_block_tests" is skipped because disabled
    test/validation_chainstate_tests.cpp:16: Test suite "validation_chainstate_tests" is skipped because disabled
    test/validation_chainstatemanager_tests.cpp:18: Test suite "validation_chainstatemanager_tests" is skipped because disabled
    test/validation_flush_tests.cpp:12: Test suite "validation_flush_tests" is skipped because disabled
    test/validationinterface_tests.cpp:13: Test suite "validationinterface_tests" is skipped because disabled
    test/versionbits_tests.cpp:159: Test suite "versionbits_tests" is skipped because disabled
    wallet/test/db_tests.cpp:14: Test suite "db_tests" is skipped because disabled
    wallet/test/psbt_wallet_tests.cpp:14: Entering test suite "psbt_wallet_tests"
    wallet/test/psbt_wallet_tests.cpp:16: Entering test case "psbt_updater_test"
    make[3]: *** [wallet/test/psbt_wallet_tests.cpp.test] Error 1
    make[2]: *** [check-am] Error 2
    make[1]: *** [check-recursive] Error 1
    make: *** [check-recursive] Error 1
    
  2. EyeOfPython added the label Bug on Nov 9, 2020
  3. hebasto commented at 7:51 PM on November 9, 2020: member

    Tested 7e373294a5ae819099c39d9d03d1f5a311d63cfc on macOS 10.15.7 (19H2), and cannot reproduce this issue. @EyeOfPython Did you install all dependencies? It seems you are not using GNU make installed via brew.

  4. RandyMcMillan commented at 9:51 PM on November 9, 2020: contributor

    @EyeOfPython - Please post boost info

    brew info boost

    THEN

    try reinstalling OR relinking boost

    brew reinstall boost

    brew unlink boost && brew link boost

    THEN

    repost boost info

    brew info boost

  5. MarcoFalke added the label macOS on Nov 10, 2020
  6. MarcoFalke commented at 6:18 AM on November 10, 2020: member

    See also #18776

  7. MarcoFalke commented at 6:20 AM on November 10, 2020: member

    I'd guess this is a compiler, dependency or macOS issue.

    So:

    • What is your compiler version? Does it happen with other compilers?
    • What are the dependency versions? Especially bdb and boost. Does it happen when they are upgraded?
  8. EyeOfPython commented at 3:29 PM on November 10, 2020: none

    Thanks, that fixed it!

    $ brew info boost
    boost: stable 1.74.0 (bottled), HEAD
    Collection of portable C++ source libraries
    https://www.boost.org/
    /usr/local/Cellar/boost/1.73.0 (14,538 files, 509.6MB) *
      Poured from bottle on 2020-09-19 at 13:01:27
    From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/boost.rb
    License: BSL-1.0
    ==> Dependencies
    Required: icu4c ✔
    ==> Options
    --HEAD
    	Install HEAD version
    ==> Caveats
    Building of Boost.Log is disabled because it requires newer GCC or Clang.
    ==> Analytics
    install: 68,796 (30 days), 161,750 (90 days), 586,729 (365 days)
    install-on-request: 21,406 (30 days), 51,338 (90 days), 201,799 (365 days)
    build-error: 0 (30 days)
    $ brew reinstall boost
    $ brew info boost
    boost: stable 1.74.0 (bottled), HEAD
    Collection of portable C++ source libraries
    https://www.boost.org/
    /usr/local/Cellar/boost/1.74.0 (14,695 files, 524.4MB) *
      Poured from bottle on 2020-11-10 at 13:54:38
    From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/boost.rb
    License: BSL-1.0
    ==> Dependencies
    Required: icu4c ✔
    ==> Options
    --HEAD
    	Install HEAD version
    ==> Analytics
    install: 68,796 (30 days), 161,750 (90 days), 586,729 (365 days)
    install-on-request: 21,406 (30 days), 51,338 (90 days), 201,799 (365 days)
    build-error: 0 (30 days)
    $ brew install make
    $ git clean -dfX
    $ ./autogen.sh
    $ ./configure
    $ make
    [...]
    $ make check
    [...]
    
  9. EyeOfPython closed this on Nov 10, 2020

  10. ghost commented at 9:10 AM on May 4, 2021: none

    This only started happening last month after upgrading brew for security reasons

    Warning: automake 1.16.3_1 is already installed and up-to-date.
    To reinstall 1.16.3_1, run:
      brew reinstall automake
    Warning: libtool 2.4.6_3 is already installed and up-to-date.
    To reinstall 2.4.6_3, run:
      brew reinstall libtool
    Warning: boost 1.75.0_3 is already installed and up-to-date.
    To reinstall 1.75.0_3, run:
      brew reinstall boost
    Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
    To reinstall 0.29.2_3, run:
      brew reinstall pkg-config
    Warning: libevent 2.1.12 is already installed and up-to-date.
    To reinstall 2.1.12, run:
      brew reinstall libevent
    
  11. DrahtBot locked this on Aug 18, 2022

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:14 UTC

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