I’m still debugging this, but I’m sharing what I’ve got so far.
If I run several instances of the wallet_multiwallet.py
test in parallel, then bitcoind hits an error, but the test still passes:
0./test_runner.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py wallet_multiwallet.py
1...*** Error in `/home/ubuntu/bitcoin/src/bitcoind': corrupted double-linked list: 0x0000562c19b928a0 ***
2======= Backtrace: =========
3/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f750c3547e5]
4/lib/x86_64-linux-gnu/libc.so.6(+0x82970)[0x7f750c35f970]
5/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f750c361184]
6/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x18)[0x7f750cc53e78]
7/home/ubuntu/bitcoin/src/bitcoind(+0x772b9)[0x562c179e92b9]
8/home/ubuntu/bitcoin/src/bitcoind(+0x2b8187)[0x562c17c2a187]
9/home/ubuntu/bitcoin/src/bitcoind(+0x2aeb36)[0x562c17c20b36]
10/home/ubuntu/bitcoin/src/bitcoind(+0x68b2c)[0x562c179dab2c]
11/home/ubuntu/bitcoin/src/bitcoind(+0x3f2db)[0x562c179b12db]
12/home/ubuntu/bitcoin/src/bitcoind(+0x3222f)[0x562c179a422f]
13/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f750c2fd830]
14/home/ubuntu/bitcoin/src/bitcoind(+0x3def9)[0x562c179afef9]
15======= Memory map: ========
16562c17972000-562c17f23000 r-xp 00000000 08:01 516003 /home/ubuntu/bitcoin/src/bitcoind
17562c18123000-562c1812e000 r--p 005b1000 08:01 516003 /home/ubuntu/bitcoin/src/bitcoind
18562c1812e000-562c18136000 rw-p 005bc000 08:01 516003 /home/ubuntu/bitcoin/src/bitcoind
19562c18136000-562c1813c000 rw-p 00000000 00:00 0
20562c19a1d000-562c19baf000 rw-p 00000000 00:00 0 [heap]
217f74f8000000-7f74f8023000 rw-p 00000000 00:00 0
227f74f8023000-7f74fc000000 ---p 00000000 00:00 0
237f7500000000-7f7500021000 rw-p 00000000 00:00 0
247f7500021000-7f7504000000 ---p 00000000 00:00 0
257f750613f000-7f7506140000 ---p 00000000 00:00 0
267f7506140000-7f7506940000 rw-p 00000000 00:00 0
277f7506940000-7f7506941000 ---p 00000000 00:00 0
287f7506941000-7f7507141000 rw-p 00000000 00:00 0
297f7507141000-7f7507142000 ---p 00000000 00:00 0
307f7507142000-7f7507942000 rw-p 00000000 00:00 0
317f7507942000-7f7507943000 ---p 00000000 00:00 0
327f7507943000-7f7508143000 rw-p 00000000 00:00 0
337f7508143000-7f7508144000 ---p 00000000 00:00 0
347f7508144000-7f7508944000 rw-p 00000000 00:00 0
357f7508944000-7f7508945000 ---p 00000000 00:00 0
367f7508945000-7f7509145000 rw-p 00000000 00:00 0
377f7509145000-7f7509146000 ---p 00000000 00:00 0
387f7509146000-7f750b948000 rw-p 00000000 00:00 0
397f750ba49000-7f750baa6000 r-xp 00000000 08:01 61325 /usr/lib/x86_64-linux-gnu/libsodium.so.18.0.1
407f750baa6000-7f750bca5000 ---p 0005d000 08:01 61325 /usr/lib/x86_64-linux-gnu/libsodium.so.18.0.1
417f750bca5000-7f750bca6000 r--p 0005c000 08:01 61325 /usr/lib/x86_64-linux-gnu/libsodium.so.18.0.1
427f750bca6000-7f750bca7000 rw-p 0005d000 08:01 61325 /usr/lib/x86_64-linux-gnu/libsodium.so.18.0.1
437f750bca7000-7f750bcd0000 r-xp 00000000 08:01 61253 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.9
447f750bcd0000-7f750becf000 ---p 00029000 08:01 61253 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.9
457f750becf000-7f750bed0000 r--p 00028000 08:01 61253 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.9
467f750bed0000-7f750bed1000 rw-p 00029000 08:01 61253 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.9
477f750bed1000-7f750bed4000 r-xp 00000000 08:01 63277 /lib/x86_64-linux-gnu/libdl-2.23.so
487f750bed4000-7f750c0d3000 ---p 00003000 08:01 63277 /lib/x86_64-linux-gnu/libdl-2.23.so
497f750c0d3000-7f750c0d4000 r--p 00002000 08:01 63277 /lib/x86_64-linux-gnu/libdl-2.23.so
507f750c0d4000-7f750c0d5000 rw-p 00003000 08:01 63277 /lib/x86_64-linux-gnu/libdl-2.23.so
517f750c0d5000-7f750c0dc000 r-xp 00000000 08:01 63311 /lib/x86_64-linux-gnu/librt-2.23.so
527f750c0dc000-7f750c2db000 ---p 00007000 08:01 63311 /lib/x86_64-linux-gnu/librt-2.23.so
537f750c2db000-7f750c2dc000 r--p 00006000 08:01 63311 /lib/x86_64-linux-gnu/librt-2.23.so
547f750c2dc000-7f750c2dd000 rw-p 00007000 08:01 63311 /lib/x86_64-linux-gnu/librt-2.23.so
557f750c2dd000-7f750c49d000 r-xp 00000000 08:01 63272 /lib/x86_64-linux-gnu/libc-2.23.so
567f750c49d000-7f750c69d000 ---p 001c0000 08:01 63272 /lib/x86_64-linux-gnu/libc-2.23.so
577f750c69d000-7f750c6a1000 r--p 001c0000 08:01 63272 /lib/x86_64-linux-gnu/libc-2.23.so
587f750c6a1000-7f750c6a3000 rw-p 001c4000 08:01 63272 /lib/x86_64-linux-gnu/libc-2.23.so
597f750c6a3000-7f750c6a7000 rw-p 00000000 00:00 0
607f750c6a7000-7f750c6bd000 r-xp 00000000 08:01 2039 /lib/x86_64-linux-gnu/libgcc_s.so.1
617f750c6bd000-7f750c8bc000 ---p 00016000 08:01 2039 /lib/x86_64-linux-gnu/libgcc_s.so.1
627f750c8bc000-7f750c8bd000 rw-p 00015000 08:01 2039 /lib/x86_64-linux-gnu/libgcc_s.so.1
637f750c8bd000-7f750c9c5000 r-xp 00000000 08:01 18864 /lib/x86_64-linux-gnu/libm-2.23.so
647f750c9c5000-7f750cbc4000 ---p 00108000 08:01 18864 /lib/x86_64-linux-gnu/libm-2.23.so
657f750cbc4000-7f750cbc5000 r--p 00107000 08:01 18864 /lib/x86_64-linux-gnu/libm-2.23.so
667f750cbc5000-7f750cbc6000 rw-p 00108000 08:01 18864 /lib/x86_64-linux-gnu/libm-2.23.so
677f750cbc6000-7f750cd38000 r-xp 00000000 08:01 8173 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
687f750cd38000-7f750cf38000 ---p 00172000 08:01 8173 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
697f750cf38000-7f750cf42000 r--p 00172000 08:01 8173 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
707f750cf42000-7f750cf44000 rw-p 0017c000 08:01 8173 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
717f750cf44000-7f750cf48000 rw-p 00000000 00:00 0
727f750cf48000-7f750cfaa000 r-xp 00000000 08:01 62885 /usr/lib/x86_64-linux-gnu/libzmq.so.5.0.0
737f750cfaa000-7f750d1a9000 ---p 00062000 08:01 62885 /usr/lib/x86_64-linux-gnu/libzmq.so.5.0.0
747f750d1a9000-7f750d1ad000 r--p 00061000 08:01 62885 /usr/lib/x86_64-linux-gnu/libzmq.so.5.0.0
757f750d1ad000-7f750d1ae000 rw-p 00065000 08:01 62885 /usr/lib/x86_64-linux-gnu/libzmq.so.5.0.0
767f750d1ae000-7f750d1f2000 r-xp 00000000 08:01 26071 /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
777f750d1f2000-7f750d3f2000 ---p 00044000 08:01 26071 /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
787f750d3f2000-7f750d3f3000 r--p 00044000 08:01 26071 /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
797f750d3f3000-7f750d3f4000 rw-p 00045000 08:01 26071 /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
807f750d3f4000-7f750d3f6000 r-xp 00000000 08:01 61265 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.9
817f750d3f6000-7f750d5f5000 ---p 00002000 08:01 61265 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.9
827f750d5f5000-7f750d5f6000 r--p 00001000 08:01 61265 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.9
837f750d5f6000-7f750d5f7000 rw-p 00002000 08:01 61265 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.9
847f750d5f7000-7f750d811000 r-xp 00000000 08:01 28216 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
857f750d811000-7f750da10000 ---p 0021a000 08:01 28216 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
867f750da10000-7f750da2c000 r--p 00219000 08:01 28216 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
877f750da2c000-7f750da38000 rw-p 00235000 08:01 28216 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
887f750da38000-7f750da3b000 rw-p 00000000 00:00 0
897f750da3b000-7f750da53000 r-xp 00000000 08:01 63271 /lib/x86_64-linux-gnu/libpthread-2.23.so
907f750da53000-7f750dc52000 ---p 00018000 08:01 63271 /lib/x86_64-linux-gnu/libpthread-2.23.so
917f750dc52000-7f750dc53000 r--p 00017000 08:01 63271 /lib/x86_64-linux-gnu/libpthread-2.23.so
927f750dc53000-7f750dc54000 rw-p 00018000 08:01 63271 /lib/x86_64-linux-gnu/libpthread-2.23.so
937f750dc54000-7f750dc58000 rw-p 00000000 00:00 0
947f750dc58000-7f750ddf2000 r-xp 00000000 08:01 552553 /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so
957f750ddf2000-7f750dff2000 ---p 0019a000 08:01 552553 /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so
967f750dff2000-7f750dff5000 r--p 0019a000 08:01 552553 /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so
977f750dff5000-7f750dff8000 rw-p 0019d000 08:01 552553 /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so
987f750dff8000-7f750dffe000 r-xp 00000000 08:01 60749 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
997f750dffe000-7f750e1fe000 ---p 00006000 08:01 60749 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
1007f750e1fe000-7f750e1ff000 r--p 00006000 08:01 60749 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
1017f750e1ff000-7f750e200000 rw-p 00007000 08:01 60749 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
1027f750e200000-7f750e224000 r-xp 00000000 08:01 60765 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
1037f750e224000-7f750e423000 ---p 00024000 08:01 60765 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
1047f750e423000-7f750e425000 r--p 00023000 08:01 60765 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
1057f750e425000-7f750e426000 rw-p 00025000 08:01 60765 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
1067f750e426000-7f750e4a0000 r-xp 00000000 08:01 60742 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0
1077f750e4a0000-7f750e6a0000 ---p 0007a000 08:01 60742 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0
1087f750e6a0000-7f750e6a3000 r--p 0007a000 08:01 60742 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0
1097f750e6a3000-7f750e6a4000 rw-p 0007d000 08:01 60742 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0
1107f750e6a4000-7f750e6bb000 r-xp 00000000 08:01 60843 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
1117f750e6bb000-7f750e8ba000 ---p 00017000 08:01 60843 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
1127f750e8ba000-7f750e8bb000 r--p 00016000 08:01 60843 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
1137f750e8bb000-7f750e8bc000 rw-p 00017000 08:01 60843 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
1147f750e8bc000-7f750e8bf000 r-xp 00000000 08:01 60743 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
1157f750e8bf000-7f750eabe000 ---p 00003000 08:01 60743 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
1167f750eabe000-7f750eabf000 r--p 00002000 08:01 60743 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
1177f750eabf000-7f750eac0000 rw-p 00003000 08:01 60743 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
1187f750eac0000-7f750eae6000 r-xp 00000000 08:01 19651 /lib/x86_64-linux-gnu/ld-2.23.so
1197f750eb1f000-7f750eb2f000 rw-p 00000000 00:00 0
1207f750eb2f000-7f750ecc7000 r--p 00000000 08:01 7864 /usr/lib/locale/locale-archive
1217f750ecc7000-7f750ecd6000 rw-p 00000000 00:00 0
1227f750ecdd000-7f750ecde000 rw-p 00000000 00:00 0
1237f750ecde000-7f750ece5000 r--s 00000000 08:01 63406 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
1247f750ece5000-7f750ece6000 r--p 00025000 08:01 19651 /lib/x86_64-linux-gnu/ld-2.23.so
1257f750ece6000-7f750ece7000 rw-p 00026000 08:01 19651 /lib/x86_64-linux-gnu/ld-2.23.so
1267f750ece7000-7f750ece8000 rw-p 00000000 00:00 0
1277ffd2c413000-7ffd2c434000 rw-p 00000000 00:00 0 [stack]
1287ffd2c475000-7ffd2c477000 r--p 00000000 00:00 0 [vvar]
1297ffd2c477000-7ffd2c479000 r-xp 00000000 00:00 0 [vdso]
130ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
131wallet_multiwallet.py passed, Duration: 5 s
132[...]
I can only see this output if I run through the test_runner, not if I run the test directly (this might just be something to do with where the test_framework is sending stderr).
I’ve bisected this to somewhere between commit 886a92f25f2e47a7ec9097d7c5a8d8a6173ef998 and 9bb59cf7baea0b33d97ef0c0eeee88a8b104be3a . Note that prior to 90600bc, this test was called multiwallet.py
.
This test is testing a lot of cases of bitcoind failing to start because of bad -wallet
parameters being passed in, so the test is expecting the process to exit. However, we obviously shouldn’t be hitting memory corruption like I see in the output above.
No-one else here has been able to reproduce this yet, but I can hit it reliably on master and v0.16.0rc2. One guess of somewhere to look is bdb since this is being tickled by the wallet code.