Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
crash
Expected behaviour
no crash
Steps to reproduce
0./src/qt/bitcoin-qt -datadir=/tmp/ -regtest -printtoconsole=1 -nolisten # Create fresh datadir (empty), stop
1mv /tmp/reg_scratch/.bitcoin/regtest/wallet.1491854176.bak /tmp/regtest/wallets/ # Move over a wallet file
2(Start qt with the same args as above)
3(Call migratewallet)
Relevant log output
0[#5](/bitcoin-bitcoin/5/) 0x0000555555bd2bda in wallet::CWallet::GetTxDepthInMainChain(wallet::CWalletTx const&) const (this=<optimized out>, wtx=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:290
1[#6](/bitcoin-bitcoin/6/) wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0::operator()(wallet::CWalletTx&) const (this=<optimized out>, wtx=<optimized out>) at wallet/wallet.cpp:1351
2[#7](/bitcoin-bitcoin/7/) std::__invoke_impl<wallet::CWallet::TxUpdate, wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0&, wallet::CWalletTx&>(std::__invoke_other, wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0&, wallet::CWalletTx&) (__f=<optimized out>, __args=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:61
3[#8](/bitcoin-bitcoin/8/) std::__invoke_r<wallet::CWallet::TxUpdate, wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0&, wallet::CWalletTx&>(wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0&, wallet::CWalletTx&) (__fn=<optimized out>, __args=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:114
4[#9](/bitcoin-bitcoin/9/) std::_Function_handler<wallet::CWallet::TxUpdate (wallet::CWalletTx&), wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&)::$_0>::_M_invoke(std::_Any_data const&, wallet::CWalletTx&)
5 (__functor=<optimized out>, __args=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:290
6[#10](/bitcoin-bitcoin/10/) 0x0000555555bbb73b in std::function<wallet::CWallet::TxUpdate (wallet::CWalletTx&)>::operator()(wallet::CWalletTx&) const (this=0x7fff417f6bc0, __args=...)
7 at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:591
8[#11](/bitcoin-bitcoin/11/) wallet::CWallet::RecursiveUpdateTxState(uint256 const&, std::function<wallet::CWallet::TxUpdate (wallet::CWalletTx&)> const&) (this=0x7fff2db509f0, tx_hash=..., try_updating_state=...) at wallet/wallet.cpp:1382
9[#12](/bitcoin-bitcoin/12/) 0x0000555555bb9c4b in wallet::CWallet::MarkConflicted(uint256 const&, int, uint256 const&) (this=0x7fff2db509f0, hashBlock=..., conflicting_height=-1, hashTx=...) at wallet/wallet.cpp:1361
10[#13](/bitcoin-bitcoin/13/) 0x0000555555bb9b55 in wallet::CWallet::LoadToWallet(uint256 const&, std::function<bool (wallet::CWalletTx&, bool)> const&) (this=0x7fff2db509f0, hash=<optimized out>, fill_wtx=<optimized out>) at wallet/wallet.cpp:1213
11[#14](/bitcoin-bitcoin/14/) 0x0000555555bfc8c6 in wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0::operator()(wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const (this=0x7fff417f6ed0, pwallet=0x7fff2db509f0, key=<optimized out>, value=..., err="") at wallet/walletdb.cpp:1065
12[#15](/bitcoin-bitcoin/15/) std::__invoke_impl<wallet::DBErrors, wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0&, wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__invoke_other, wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0&, wallet::CWallet*&&, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (__f=..., __args=<optimized out>, __args=<optimized out>, __args=..., __args="")
13 at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:61
14[#16](/bitcoin-bitcoin/16/) std::__invoke_r<wallet::DBErrors, wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0&, wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0&, wallet::CWallet*&&, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (__fn=..., __args=<optimized out>, __args=<optimized out>, __args=..., __args="")
15 at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:114
16[#17](/bitcoin-bitcoin/17/) std::_Function_handler<wallet::DBErrors (wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&), wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)::$_0>::_M_invoke(std::_Any_data const&, wallet::CWallet*&&, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)
17 (__functor=..., __args=<optimized out>, __args=<optimized out>, __args=..., __args="") at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:290
18[#18](/bitcoin-bitcoin/18/) 0x0000555555bf87dc in std::function<wallet::DBErrors (wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>::operator()(wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const (this=0x7fff417f6ed0, __args=0x7fff2db509f0, __args=..., __args=..., __args="")
19 at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:591
20[#19](/bitcoin-bitcoin/19/) wallet::LoadRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DataStream&, std::function<wallet::DBErrors (wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>) (pwallet=pwallet@entry=0x7fff2db509f0, batch=..., key="tx", prefix=..., load_func=...) at wallet/walletdb.cpp:509
21[#20](/bitcoin-bitcoin/20/) 0x0000555555bf8542 in wallet::LoadRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<wallet::DBErrors (wallet::CWallet*, DataStream&, CDataStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>) (pwallet=pwallet@entry=0x7fff2db509f0, batch=..., key="tx", load_func=...) at wallet/walletdb.cpp:523
22[#21](/bitcoin-bitcoin/21/) 0x0000555555bf40a2 in wallet::LoadTxRecords(wallet::CWallet*, wallet::DatabaseBatch&, std::vector<uint256, std::allocator<uint256> >&, bool&)
23 (pwallet=0x7fff2db509f0, batch=..., upgraded_txs=std::vector of length 0, capacity 0, any_unordered=@0x7fff417f6f9f: false) at wallet/walletdb.cpp:1021
24[#22](/bitcoin-bitcoin/22/) wallet::WalletBatch::LoadWallet(wallet::CWallet*) (this=0x7fff417f7208, pwallet=0x7fff2db509f0) at wallet/walletdb.cpp:1187
25[#23](/bitcoin-bitcoin/23/) 0x0000555555bc29fd in wallet::CWallet::LoadWallet() (this=0x7fff2db509f0) at wallet/wallet.cpp:2304
26[#24](/bitcoin-bitcoin/24/) 0x0000555555bad386 in wallet::CWallet::Create(wallet::WalletContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<wallet::WalletDatabase, std::default_delete<wallet::WalletDatabase> >, unsigned long, bilingual_str&, std::vector<bilingual_str, std::allocator<bilingual_str> >&)
27 (context=<optimized out>, name="wallet.1491854156.bak", database=std::unique_ptr<wallet::WalletDatabase> = {...}, wallet_creation_flags=0, error=..., warnings=std::vector of length 0, capacity 0) at wallet/wallet.cpp:2868
28[#25](/bitcoin-bitcoin/25/) 0x0000555555bcf830 in wallet::MigrateLegacyToDescriptor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&, wallet::WalletContext&) (wallet_name="wallet.1491854156.bak", passphrase="", context=...) at wallet/wallet.cpp:4169
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
current master
Operating system and version
Linux
Machine specifications
yes