core dump on wallet upgrade #1663

osmosis79 opened this Issue Aug 8, 2012 · 7 comments


None yet

3 participants


bitcoin-0.6.3-linux 64bit
Only occurs with an old wallet file. Msg about upgrading wallet format appears. Use of -upgradewallet flag doesnt change result. At one point the wallet did actually load, but the dates on transactions appeared corrupted, with old transactions showing todays date.

EXCEPTION: 11DbException
Db::open: Invalid argument
bitcoin in Runaway exception

bitcoin-qt: /usr/include/boost/thread/pthread/mutex.hpp:50: void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Aborted (core dumped)


If I use bitcoin-0.5.4rc3-linux, wallet upgrade works as expected..none of the above errors. Prompt occurs about wallet needing to be upgraded, and client restarts.


sometimes also fails with...

terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::lock_error >'
what(): boost::lock_error
Aborted (core dumped)

Some git bisect results...

git bisect start v0.5.6 v0.5.4rc3

The first bad commit could be any of:
We cannot bisect more!

git bisect log
# bad: [fad2231f8664434e913ad5c6d458fa9139492390] Merge branch '0.4.x' into 0.5.x
# good: [9bf1140b90387643ad83e89199e391d002352b22] Merge branch '0.5.0.x' into 0.5.x
git bisect start 'v0.5.6' 'v0.5.4rc3'
# good: [479c99022e0e65ac525b45d3a18599726c00cc03] remove HTML code around "Wallet" (displayed on overview page) and use Qt tags for font settings
git bisect good 479c99022e0e65ac525b45d3a18599726c00cc03
# good: [fdd907c9f12d5435dcd23f45c54f803cb3854a89] Correct blockchain size in contrib/debian.
git bisect good fdd907c9f12d5435dcd23f45c54f803cb3854a89
# bad: [3703150d56ff6ee557ab330e55637c9c23835902] Merge branch '0.4.x' into 0.5.x
git bisect bad 3703150d56ff6ee557ab330e55637c9c23835902
# good: [1bc2f0a37b68aa99e90437105a48c47046b6c0d0] Fix build of testcases after commit 0f10b21719e1b0d9683a142f0a7105e65f095694
git bisect good 1bc2f0a37b68aa99e90437105a48c47046b6c0d0
# skip: [af413c0a0ff507da69afae6399bf3ff3fbf0774b] fix an incorrect if-clause in net.cpp
git bisect skip af413c0a0ff507da69afae6399bf3ff3fbf0774b
# skip: [9a48f56fb02338b7f68ab9fd469abc1abe0011c3] Bugfix: Move IsStandard scriptSig size check out of IsPushOnly, since BIP16 verification uses the latter too
git bisect skip 9a48f56fb02338b7f68ab9fd469abc1abe0011c3
# skip: [a0ea95d3ceacea5868b8f921c36bbdddb5dc2b1b] Serialize access to debug.log stream
git bisect skip a0ea95d3ceacea5868b8f921c36bbdddb5dc2b1b
# skip: [9849f50b6866f326040622f124601efaa8c37434] Bump VERSION so we can differentiate between fixed 0.4.7rc2 and not-fixed 0.4.7rc1
git bisect skip 9849f50b6866f326040622f124601efaa8c37434
# skip: [82a227b263fa7d4caee454884661548f7415b9d7] .gitignore: add test_bitcoin
git bisect skip 82a227b263fa7d4caee454884661548f7415b9d7
# skip: [ca39829ecb90e392b9722292739585124ba0d7c1] Update wiki changelog at doc/release-process.txt
git bisect skip ca39829ecb90e392b9722292739585124ba0d7c1

Skips are where I was not able to build with qmake; make; "No rule to make target `'"


I went through this bisect twice and got identical results.


Tested with a few more old wallet files, and a few more bitcoin versions. Crashing is consistent per wallet/app pair, crash or success result fails depending on wallet file used, and bitcoin version used.

freewil commented Aug 10, 2012

I got this for the first time after emptying my wallet to balance 0 (sendtoaddress) and attempting to stop bitcoind.

    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
$ bitcoind stop
bitcoin server stopping
$ terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost::lock_error

that correlates...all the old wallets I am testing with have zaro balance

laanwj commented Feb 24, 2014

Very old issue that is likely solved by the many changes to the wallet code since, please re-open a new one if this is still a problem.

@laanwj laanwj closed this Feb 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment