Segfault when running `make check` with gui package enabled on Ubuntu 21.04 #23442

issue willcl-ark opened this issue on November 5, 2021
  1. willcl-ark commented at 11:23 AM on November 5, 2021: member

    I am using Ubuntu 21.04 and have a system BDB installed (5.3): dpkg_bdbd.log and QT5: dpkg_qt.log.

    Bitcoin source is at a0988140b71485ad12c3c3a4a9573f7c21b1eff8 (tag v22.0)

    make check runs successfully to completion when using

    ./contrib/install_db4.sh `pwd`
    export BDB_PREFIX="/home/will/src/bitcoin/db4"
    ./autogen.sh
    ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --without-gui
    make check -j`nproc`
    

    However, if I enable the gui package then it will fail with a segmentation fault inside a wallet test:

    $ rg Error make_check.log
    212:2021-11-05Tmake[3]: *** [Makefile:18087: wallet/test/psbt_wallet_tests.cpp.test] Error 1
    3088:Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    3094:2021-11-05T10:16:58.271290Z [test] [noui.cpp:43] [noui_ThreadSafeMessageBox] Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    5964:Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    5970:2021-11-05T10:16:58.309941Z [test] [noui.cpp:43] [noui_ThreadSafeMessageBox] Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    8793:Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    8799:2021-11-05T10:16:58.333933Z [test] [noui.cpp:43] [noui_ThreadSafeMessageBox] Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    11533:Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    11539:2021-11-05T10:16:58.356529Z [test] [noui.cpp:43] [noui_ThreadSafeMessageBox] Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    11559:2021-11-05T10:16:58.357477Z [test] [txmempool.cpp:633] [check] Checking mempool with 0 make[3]: *** [Makefile:18086: wallet/test/wallet_tests.cpp.test] Error 1
    

    make_check.log

    config.log

    This is causing make to hang indefinitely, but one time it ran (somewhat) to completion and wrote the following to test-suite.log (which is usually more empty than this, containing only up to FAIL):

    =============================================
       Bitcoin Core 22.0.0: src/test-suite.log
    =============================================
    
    # TOTAL: 1
    # PASS:  0
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  1
    # XPASS: 0
    # ERROR: 0
    
    .. contents:: :depth: 2
    
    FAIL: qt/test/test_bitcoin-qt
    =============================
    
    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    ********* Start testing of AppTests *********
    Config: Using QtTest library 5.15.2, Qt 5.15.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.3.0), ubuntu 21.04
    PASS   : AppTests::initTestCase()
    Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    QINFO  : AppTests::appTests() Backing up GUI settings to "/tmp/test_common_Bitcoin Core/321e4f587b345b4b1fb1314fd08629f45fc98e29e97937449a178d78d0cce606/regtest/guisettings.ini.bak"
    Error: A version conflict was detected between the run-time BerkeleyDB library and the one used during compilation.
    QWARN  : AppTests::appTests() This plugin does not support propagateSizeHints()
    
    === Received signal at function time: 300000ms, total time: 300000ms, dumping stack ===
    GNU gdb (Ubuntu 10.1-2ubuntu2) 10.1.90.20210411-git
    Copyright (C) 2021 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word".
    Attaching to process 81650
    (gdb) === End of stack trace ===
    QFATAL : AppTests::appTests() Test function timed out
    FAIL!  : AppTests::appTests() Received a fatal error.
       Loc: [Unknown file(0)]
    Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 300048ms
    ********* Finished testing of AppTests *********
    FAIL qt/test/test_bitcoin-qt (exit status: 134)
    

    It is reproducible on my system currently, so let me know if there are any more pieces of info I can provide to help. I don't quite understand why BDB 5.3 is being touched at any point, despite them being system-installed...

  2. willcl-ark added the label Bug on Nov 5, 2021
  3. MarcoFalke added the label Questions and Help on Nov 5, 2021
  4. MarcoFalke added the label Wallet on Nov 5, 2021
  5. MarcoFalke commented at 11:37 AM on November 5, 2021: member

    Do you want to compile with bdb 5.3 or 4.8?

    • If 5.3: Remove the 4.8 folder and don't pass it to configure
    • If 4.8: Would it be possible to uninstall 5.3 from the system?

    Don't forget make distclean before the next configure.

  6. willcl-ark commented at 11:47 AM on November 5, 2021: member

    @MarcoFalke Sorry I should have made that clear. I was rather hoping I could leave the (system) 5.3 installed, but compile bitcoin core with the self-contained and self-built 4.8 :)

    I am running make distclean (and often git clean -dfX) before building at the moment until I get this fixed.

  7. willcl-ark commented at 1:57 PM on November 8, 2021: member

    Removing package libdb5.3++ "solves" the issue. libdb5.3 is as expected a critical system package which should not be removed.

  8. willcl-ark commented at 2:53 PM on November 8, 2021: member

    I ran make install (for the first time ever on this machine) and then reinstalled previously problematic system package libdb5.3++.

    Now even with this package installed, both qt binaries (source dir and installed) work, and make check passes successfully as expected.

    So all working now with the following libdb packages installed:

    [I] [14:01] will:bitcoin (v22.0) | dpkg -l | grep 'libdb'
    ii  libdb5.3:amd64                             5.3.28+dfsg1-0.6ubuntu4                                                      amd64        Berkeley v5.3 Database Libraries [runtime]
    ii  libdb5.3++:amd64                           5.3.28+dfsg1-0.6ubuntu4                                                      amd64        Berkeley v5.3 
    

    I'm not exactly sure what's changed, make install does not appear to install any runtime bdb files, so perhaps package installation order matters :shrug: This is a pretty fresh Ubuntu installation. If there's nothing to investigate further here, I'm happy to close.

  9. MarcoFalke commented at 3:01 PM on November 8, 2021: member

    This is a pretty fresh Ubuntu installation.

    I probably won't debug this build issue, but if you have steps to reproduce from a vanilla install, someone else might take a look.

    Now even with this package installed ... work ...

    Yes, as long as you compile without libdbd5.3++ available, I'd expect this behavior. This should even happen without make install, I'd guess.

  10. willcl-ark commented at 2:16 PM on January 6, 2022: member

    Closing this for now as it seems most likely caused by some user misconfiguration

  11. willcl-ark closed this on Jan 6, 2022

  12. DrahtBot locked this on Jan 6, 2023

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

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