Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
bitcoind crashes on startup with this error: (not logged in debug.log)
0node/interfaces.cpp:525 getBlockHash: Assertion `chainman().ActiveChain()[height]' failed.
1Aborted (core dumped)
This is after trying to bring the node up after it was killed by the system during IBD (likely due to OOM).
Expected behaviour
bitcoind should not crash, or at least it should exit with a more helpful error log.
Steps to reproduce
Run bitcoind with these configuration options:
0disablewallet=1
1prune=550
2listen=0
3coinstatsindex=1
Relevant log output
Last few lines before being killed (last line not recorded in debug.log):
02024-02-11T19:09:40Z UpdateTip: new best=00000000000005ab0d71214ffa5b38cd51e13525892a221bbf748fee8de806ad height=140916 version=0x00000001 log2_work=66.122154 tx=1282449 date='2011-08-14T11:18:30Z' progress=0.001328 cache=104.2MiB(896112txo)
12024-02-11T19:09:40Z UpdateTip: new best=0000000000000390717df9a1baaf8e65f9b96c87ee994d20dd897a95e8adc3e9 height=140917 version=0x00000001 log2_work=66.122300 tx=1282533 date='2011-08-14T11:27:11Z' progress=0.001328 cache=104.2MiB(896392txo)
22024-02-11T19:09:41Z UpdateTip: new best=000000000000038559aa65f99789894199f2f4f08bfba66454864b5e514ba58a height=140918 version=0x00000001 log2_work=66.122445 tx=1282552 date='2011-08-14T11:32:11Z' progress=0.001328 cache=104.2MiB(896387txo)
32024-02-11T19:09:41Z UpdateTip: new best=000000000000000121734a048a6dcd9f5184929ef6b4d60fab74612de0e5e26c height=140919 version=0x00000001 log2_work=66.122591 tx=1282659 date='2011-08-14T12:12:06Z' progress=0.001328 cache=104.2MiB(896508txo)
42024-02-11T19:09:41Z UpdateTip: new best=000000000000017fab19329089a1ab54e1f4ab110b1ef0c5d4f9990c2815d624 height=140920 version=0x00000001 log2_work=66.122737 tx=1282673 date='2011-08-14T12:16:33Z' progress=0.001328 cache=104.2MiB(896564txo)
52024-02-11T19:09:41Z UpdateTip: new best=00000000000006a0e9cbe57335835c382bc09f11045b68dbb834495f4ae22faf height=140921 version=0x00000001 log2_work=66.122882 tx=1282777 date='2011-08-14T12:41:24Z' progress=0.001328 cache=104.2MiB(896561txo)
62024-02-11T19:09:41Z UpdateTip: new best=000000000000052e30dd0b273b500fde21e4bee67d1f5cd05fef91a663dadfcd height=140922 version=0x00000001 log2_work=66.123028 tx=1282926 date='2011-08-14T12:47:38Z' progress=0.001329 cache=104.2MiB(896633txo)
7Killed
After trying to start the node again (last two lines not recorded in debug.log):
02024-02-11T19:46:07Z Bitcoin Core version v26.0.0 (release build)
12024-02-11T19:46:07Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -upnp=0
22024-02-11T19:46:07Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -natpmp=0
32024-02-11T19:46:07Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -discover=0
42024-02-11T19:46:07Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -listenonion=0
52024-02-11T19:46:07Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -i2pacceptincoming=0
62024-02-11T19:46:07Z Using the 'x86_shani(1way,2way)' SHA256 implementation
72024-02-11T19:46:07Z Using RdSeed as an additional entropy source
82024-02-11T19:46:07Z Using RdRand as an additional entropy source
92024-02-11T19:46:07Z Default data directory /home/***/.bitcoin
102024-02-11T19:46:07Z Using data directory /home/***/.bitcoin
112024-02-11T19:46:07Z Config file: /home/***/.bitcoin/bitcoin.conf
122024-02-11T19:46:07Z Config file arg: coinstatsindex="1"
132024-02-11T19:46:07Z Config file arg: disablewallet="1"
142024-02-11T19:46:07Z Config file arg: listen="0"
152024-02-11T19:46:07Z Config file arg: prune="550"
162024-02-11T19:46:07Z Using at most 125 automatic connections (1024 file descriptors available)
172024-02-11T19:46:07Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
182024-02-11T19:46:07Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
192024-02-11T19:46:07Z Script verification uses 0 additional threads
202024-02-11T19:46:07Z Wallet disabled!
212024-02-11T19:46:07Z scheduler thread start
222024-02-11T19:46:07Z Binding RPC on address ::1 port 8332
232024-02-11T19:46:07Z Binding RPC on address 127.0.0.1 port 8332
242024-02-11T19:46:07Z [http] creating work queue of depth 16
252024-02-11T19:46:07Z Using random cookie authentication.
262024-02-11T19:46:07Z Generated RPC authentication cookie /home/***/.bitcoin/.cookie
272024-02-11T19:46:07Z [http] starting 4 worker threads
282024-02-11T19:46:07Z Using /16 prefix for IP bucketing
292024-02-11T19:46:07Z init message: Loading P2P addresses…
302024-02-11T19:46:07Z Loaded 8837 addresses from peers.dat 20ms
312024-02-11T19:46:07Z init message: Loading banlist…
322024-02-11T19:46:07Z SetNetworkActive: true
332024-02-11T19:46:07Z /home/***/.bitcoin/fee_estimates.dat is not found. Continue anyway.
342024-02-11T19:46:07Z Cache configuration:
352024-02-11T19:46:07Z * Using 2.0 MiB for block index database
362024-02-11T19:46:07Z * Using 8.0 MiB for chain state database
372024-02-11T19:46:07Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
382024-02-11T19:46:07Z init message: Loading block index…
392024-02-11T19:46:07Z Assuming ancestors of block 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815 have valid signatures.
402024-02-11T19:46:07Z Setting nMinimumChainWork=000000000000000000000000000000000000000052b2559353df4117b7348b64
412024-02-11T19:46:07Z Prune configured to target 550 MiB on disk for block and undo files.
422024-02-11T19:46:07Z Opening LevelDB in /home/***/.bitcoin/blocks/index
432024-02-11T19:46:13Z Opened LevelDB successfully
442024-02-11T19:46:13Z Using obfuscation key for /home/***/.bitcoin/blocks/index: 0000000000000000
452024-02-11T19:46:17Z LoadBlockIndexDB: last block file = 3
462024-02-11T19:46:17Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=4007, size=94150965, heights=136926...140942, time=2011-07-18...2011-08-14)
472024-02-11T19:46:17Z Checking all blk files are present...
482024-02-11T19:46:17Z LoadBlockIndexDB(): Block files have previously been pruned
492024-02-11T19:46:17Z Initializing chainstate Chainstate [ibd] @ height -1 (null)
502024-02-11T19:46:17Z Opening LevelDB in /home/***/.bitcoin/chainstate
512024-02-11T19:46:17Z Opened LevelDB successfully
522024-02-11T19:46:17Z Using obfuscation key for /home/***/.bitcoin/chainstate: c31b181c8ff3ce9b
532024-02-11T19:46:17Z Opening LevelDB in /home/***/.bitcoin/chainstate
542024-02-11T19:46:17Z Opened LevelDB successfully
552024-02-11T19:46:17Z Using obfuscation key for /home/***/.bitcoin/chainstate: c31b181c8ff3ce9b
562024-02-11T19:46:17Z [Chainstate [ibd] @ height -1 (null)] resized coinsdb cache to 8.0 MiB
572024-02-11T19:46:17Z [Chainstate [ibd] @ height -1 (null)] resized coinstip cache to 440.0 MiB
582024-02-11T19:46:17Z init message: Verifying blocks…
592024-02-11T19:46:17Z block index 9824ms
602024-02-11T19:46:17Z Opening LevelDB in /home/***/.bitcoin/indexes/coinstats/db
612024-02-11T19:46:17Z Opened LevelDB successfully
622024-02-11T19:46:17Z Using obfuscation key for /home/***/.bitcoin/indexes/coinstats/db: 0000000000000000
632024-02-11T19:46:17Z init message: Pruning blockstore…
642024-02-11T19:46:17Z initload thread start
65node/interfaces.cpp:525 getBlockHash: Assertion `chainman().ActiveChain()[height]' failed.
66Aborted (core dumped)
How did you obtain Bitcoin Core
Pre-built binaries
What version of Bitcoin Core are you using?
v26.0
Operating system and version
Ubuntu 20.04.6 LTS
Machine specifications
The system only has 1 GB of RAM.