Steps to reproduce:
- Install fresh Ubuntu Impish
- Compile Bitcoin Core with
export DEBIAN_FRONTEND=noninteractive && apt update && apt install curl wget htop git vim ccache -y && git clone https://github.com/bitcoin/bitcoin.git ./bitcoin-core && cd bitcoin-core && apt install libc++abi-13-dev libc++-13-dev clang llvm gdb build-essential libtool libunwind-dev autotools-dev automake pkg-config bsdmainutils python3-zmq make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison -y && cd depends && make CC=clang-13 CXX="clang++-13 -stdlib=libc++" NO_QT=1 NO_WALLET=1 NO_ZMQ=1 NO_UPNP=1 NO_NATPMP=1 -j $(nproc) && cd .. && ./autogen.sh && CONFIG_SITE="$PWD/depends/x86_64-pc-linux-gnu/share/config.site" ./configure CC=clang-13 CXX="clang++-13 -stdlib=libc++" && make -j $(nproc) src/bitcoind
- Run gdb:
gdb --args ./src/bitcoind -sandbox=log-and-abort -datadir=/tmp -regtest
run
0(gdb) run
1Starting program: /bitcoin-core/src/bitcoind -sandbox=log-and-abort -datadir=/tmp -regtest
2[Thread debugging using libthread_db enabled]
3Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
4
5Program received signal SIGSYS, Bad system call.
60x00007ffff7c94cbb in mincore () at ../sysdeps/unix/syscall-template.S:117
7117 ../sysdeps/unix/syscall-template.S: No such file or directory.
8(gdb) bt
9[#0](/bitcoin-bitcoin/0/) 0x00007ffff7c94cbb in mincore () at ../sysdeps/unix/syscall-template.S:117
10[#1](/bitcoin-bitcoin/1/) 0x00007ffff7ed6a8a in ?? () from /lib/x86_64-linux-gnu/libunwind.so.8
11[#2](/bitcoin-bitcoin/2/) 0x00007ffff7ed6562 in ?? () from /lib/x86_64-linux-gnu/libunwind.so.8
12[#3](/bitcoin-bitcoin/3/) 0x00007ffff7ed6e1a in ?? () from /lib/x86_64-linux-gnu/libunwind.so.8
13[#4](/bitcoin-bitcoin/4/) 0x00007ffff7ed5dd0 in __libunwind_Unwind_RaiseException () from /lib/x86_64-linux-gnu/libunwind.so.8
14[#5](/bitcoin-bitcoin/5/) 0x00007ffff7ec1405 in __cxa_throw () from /lib/x86_64-linux-gnu/libc++abi.so.1
15[#6](/bitcoin-bitcoin/6/) 0x00007ffff7f3a865 in ?? () from /lib/x86_64-linux-gnu/libc++.so.1
16[#7](/bitcoin-bitcoin/7/) 0x00007ffff7f3a82d in std::__1::__basic_string_common<true>::__throw_out_of_range() const () from /lib/x86_64-linux-gnu/libc++.so.1
17[#8](/bitcoin-bitcoin/8/) 0x00007ffff7f3aa46 in ?? () from /lib/x86_64-linux-gnu/libc++.so.1
18[#9](/bitcoin-bitcoin/9/) 0x00007ffff7f3c124 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::at(unsigned long) () from /lib/x86_64-linux-gnu/libc++.so.1
19[#10](/bitcoin-bitcoin/10/) 0x0000555555946314 in sanity_test_range_fmt() ()
20[#11](/bitcoin-bitcoin/11/) 0x00005555559464ca in glibcxx_sanity_test() ()
21[#12](/bitcoin-bitcoin/12/) 0x00005555558c68df in init::SanityChecks() ()
22[#13](/bitcoin-bitcoin/13/) 0x00005555555a4e11 in AppInitSanityChecks() ()
23[#14](/bitcoin-bitcoin/14/) 0x0000555555590ecf in main ()
There are two issues:
log-and-abort
doesn’t log- It crashes