-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Description
On macOS 10.14.4 with Homebrew berkeley-db@4 4.8.30 using master (4f4ef31) bitcoind
crashes when loading an existing wallet or creating a new one.
2019-04-15T10:28:15Z init message: Verifying wallet(s)...
2019-04-15T10:28:15Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2019-04-15T10:28:15Z Using wallet /Users/bitcoin/Library/Application Support/Bitcoin/testnet3/wallets/A
2019-04-15T10:28:15Z BerkeleyEnvironment::Open: LogDir=/Users/bitcoin/Library/Application Support/Bitcoin/testnet3/wallets/A/database ErrorFile=/Users/bitcoin/Library/Application Support/Bitcoin/testnet3/wallets/A/db.log
Process 87520 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10000)
frame #0: 0x0000000102445d8e libdb_cxx-4.8.dylib`__lock_get_lk_max_locks + 53
libdb_cxx-4.8.dylib`__lock_get_lk_max_locks:
-> 0x102445d8e <+53>: movl %eax, (%rsi)
0x102445d90 <+55>: xorl %eax, %eax
0x102445d92 <+57>: popq %rbp
0x102445d93 <+58>: retq
Target 0: (bitcoind) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10000)
* frame #0: 0x0000000102445d8e libdb_cxx-4.8.dylib`__lock_get_lk_max_locks + 53
frame #1: 0x00000001023c4afa libdb_cxx-4.8.dylib`DbEnv::get_lk_max_locks(unsigned int*) + 46
frame #2: 0x0000000100458dbf bitcoind`BerkeleyEnvironment::Open(this=<unavailable>, retry=<unavailable>) at db.cpp:195:12 [opt]
frame #3: 0x000000010045abab bitcoind`BerkeleyBatch::VerifyEnvironment(file_path=<unavailable>, errorStr="") at db.cpp:417:15 [opt]
frame #4: 0x00000001004fb295 bitcoind`CWallet::Verify(chain=0x0000000102a02990, location=0x00007ffeefbfed50, salvage_wallet=false, error_string="", warning_string=<unavailable>) at wallet.cpp:3972:14 [opt]
frame #5: 0x0000000100477628 bitcoind`VerifyWallets(chain=0x0000000102a02990, wallet_files=<unavailable>) at load.cpp:56:31 [opt]
frame #6: 0x00000001000727b9 bitcoind`AppInitMain(interfaces=<unavailable>) at init.cpp:1321:22 [opt]
frame #7: 0x0000000100004592 bitcoind`AppInit(argc=<unavailable>, argv=0x00007ffeefbff418) at bitcoind.cpp:171:16 [opt]
frame #8: 0x0000000100004042 bitcoind`main(argc=<unavailable>, argv=<unavailable>) at bitcoind.cpp:201:13 [opt]
frame #9: 0x00007fff7edfc3d5 libdyld.dylib`start + 1
frame #10: 0x00007fff7edfc3d5 libdyld.dylib`start + 1
(lldb)
The crash does not happen when using depends. It also does not happen with a more recent BDB version using --with-incompatible-bdb
(this requires uninstalling berkeley-db@4).