macOS Catalina, bitcoin core v0.20.1 broken after brew update #21556

issue isghe openend this issue on March 31, 2021
  1. isghe commented at 0:38 am on March 31, 2021: contributor

    after brew update/upgrade today i have, in deterministic way: recompiling it is ok but, running i have a broken node, fatal crash at

    0dbenv->set_lg_bsize(0x10000);
    

    Thread 1: EXC_BAD_ACCESS (code=1, address=0x10000)

  2. isghe added the label Bug on Mar 31, 2021
  3. fanquake added the label macOS on Mar 31, 2021
  4. fanquake commented at 6:59 am on March 31, 2021: member
    You need to provide more information. Which dependencies did you update / upgrade (bdb)? Are you building the v0.20.1 tag, or the 0.20 branch? Which version of macOS are you building/running on? In fact, could you just supply all of the information that was asked for in the issue template.
  5. laanwj removed the label Bug on Mar 31, 2021
  6. laanwj added the label Upstream on Mar 31, 2021
  7. isghe commented at 6:53 pm on March 31, 2021: contributor

    I am with macOS Catalina, Version 10.15.7

    0$ uname -a
    1Darwin isidoros-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
    
    0$ g++ --version
    1Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
    2Apple clang version 12.0.0 (clang-1200.0.32.29)
    3Target: x86_64-apple-darwin19.6.0
    4Thread model: posix
    5InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    

    Xcode: Version 12.4 (12D4e)

    Bitcoin:

    • tag: v0.20.1
    • commit: 7ff64311bee570874c4f0dfa18f518552188df08
     0$ make distclean
     1$ ./autogen.sh
     2$ ./configure --without-gui --enable-debug
     3
     4Options used to compile and link:
     5  with wallet   = yes
     6  with gui / qt = no
     7  with zmq      = yes
     8  with test     = yes
     9    with fuzz   = no
    10  with bench    = yes
    11  with upnp     = yes
    12  use asm       = yes
    13  sanitizers    = 
    14  debug enabled = yes
    15  gprof enabled = no
    16  werror        = no
    17
    18  target os     = darwin
    19  build os      = darwin19.6.0
    20
    21  CC            = gcc
    22  CFLAGS        = -g -O2
    23  CPPFLAGS      =  -DDEBUG -DDEBUG_LOCKORDER   -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -I/usr/local/opt/berkeley-db@4/include -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0
    24  CXX           = g++ -std=c++11
    25  CXXFLAGS      =  -O0 -g3 -ftrapv  -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wswitch -Wformat-security -Wthread-safety-analysis -Wrange-loop-analysis -Wredundant-decls -Wunused-variable -Wdate-time  -Wno-unused-parameter -Wno-self-assign -Wno-unused-local-typedef -Wno-deprecated-register -Wno-implicit-fallthrough   
    26  LDFLAGS       = -pthread  -Wl,-bind_at_load   -Wl,-headerpad_max_install_names -Wl,-dead_strip -Wl,-dead_strip_dylibs
    27  ARFLAGS       = cr
    28
    29$ make
    30$ cd src
    31$ ./bitcoind
    322021-03-31T19:37:21Z Bitcoin Core version v0.20.1 (debug build)
    332021-03-31T19:37:21Z Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
    342021-03-31T19:37:21Z Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
    352021-03-31T19:37:21Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    362021-03-31T19:37:21Z Using RdRand as an additional entropy source
    372021-03-31T19:37:21Z Default data directory /Users/isghe/Library/Application Support/Bitcoin
    382021-03-31T19:37:21Z Using data directory /Users/isghe/Library/Application Support/Bitcoin
    392021-03-31T19:37:21Z Config file: /Users/isghe/Library/Application Support/Bitcoin/bitcoin.conf (not found, skipping)
    402021-03-31T19:37:21Z Using at most 125 automatic connections (283 file descriptors available)
    412021-03-31T19:37:21Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    422021-03-31T19:37:21Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    432021-03-31T19:37:21Z Script verification uses 7 additional threads
    442021-03-31T19:37:21Z scheduler thread start
    452021-03-31T19:37:21Z HTTP: creating work queue of depth 16
    462021-03-31T19:37:21Z No rpcpassword set - using random cookie authentication.
    472021-03-31T19:37:21Z Generated RPC authentication cookie /Users/isghe/Library/Application Support/Bitcoin/.cookie
    482021-03-31T19:37:21Z HTTP: starting 4 worker threads
    492021-03-31T19:37:21Z Using wallet directory /Users/isghe/Library/Application Support/Bitcoin/wallets
    502021-03-31T19:37:21Z init message: Verifying wallet(s)...
    512021-03-31T19:37:21Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    522021-03-31T19:37:21Z Using wallet /Users/isghe/Library/Application Support/Bitcoin/wallets
    532021-03-31T19:37:21Z BerkeleyEnvironment::Open: LogDir=/Users/isghe/Library/Application Support/Bitcoin/wallets/database ErrorFile=/Users/isghe/Library/Application Support/Bitcoin/wallets/db.log
    54Segmentation fault: 11
    

    I never had this kind of problem. And I am runninq bitcoind on my Mac since 2013, always with the datadir in an USB external HD.

    The point is, it looks like “brew update”, or some other update in Xcode broke something.

    It would be interesting to understand if someone else, in my analogous configuration, has the same problem or not.

    Thanks, Isidoro

  8. n-thumann commented at 8:00 pm on March 31, 2021: contributor
    If you suspect your recent brew update to have caused this issue, try running brew list -lt. It prints a list of formulae and casks, including their modification date. Which formulae have been updated during last update and does reverting them (if they are even related to Bitcoin) helps?
  9. isghe commented at 8:06 pm on March 31, 2021: contributor
    SOLVED! (soon the details)
  10. isghe commented at 8:23 pm on March 31, 2021: contributor

    The problem was “Berkeley DB 4.8.30”. So I uninstalled it with:

    0$ brew uninstall berkeley-db@4
    

    and I followed the instructions in #19411 with @fanquake’s workaround:

    0CFLAGS="-Wno-error=implicit-function-declaration"  ./contrib/install_db4.sh .
    

    so I configured bitcoin, with suggested in the output of ./contrib/install_db4.sh

    0When compiling bitcoind, run `./configure` in the following way:
    1
    2  export BDB_PREFIX='/Users/isghe/development/cryptocoin/bitcoin/db4'
    3  ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...
    

    so, in my case:

    0$ export BDB_PREFIX='/Users/isghe/development/cryptocoin/bitcoin/db4'
    1$ ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --without-gui --enable-debug
    

    and now bitcoin is alive again ;-)

    Thanks, Isidoro

  11. isghe renamed this:
    macOS bitcoin core v0.20.1 broken after brew update
    macOS Catalina, bitcoin core v0.20.1 broken after brew update
    on Mar 31, 2021
  12. isghe commented at 8:46 pm on March 31, 2021: contributor

    however, just a clarification (very small detail): despite uninstalling “Berkeley DB 4.8.30” in “brew”, after configuration, it is shown in CPPFLAGS:

    0-I/usr/local/opt/berkeley-db@4/include
    

    but now, on my mac, I no longer have the /usr/local/opt/berkeley-db@4/ folder

    So it’s a small bug on configurator

    :-p

  13. isghe closed this on Mar 31, 2021

  14. isghe commented at 10:26 pm on March 31, 2021: contributor
    from my point of view, the problem is SOLVED. maybe we need to emphasize this solution in doc/build-osx.md Thanks, Isidoro
  15. 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: 2024-12-21 15:12 UTC

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