bitcoin: bitcoind: chain.cpp:102: const CBlockIndex* CBlockIndex::GetAncestor(int) const: Assertion `pindexWalk->pprev' failed.

Started to sync a fresh node, I have started and stopped it a few times during initial sync with: sudo service bitcoind stop

Using default .service file supplied by contrib/init

Start bitcoind: sudo service bitcoind start Fails and loops at: Using obfuscation key

Running from: bitcoind: bitcoind: chain.cpp:102: const CBlockIndex* CBlockIndex::GetAncestor(int) const: Assertion `pindexWalk->pprev’ failed.

Starting node to sync

Loops without continuing.

Happens every time.

Git: 2018-11-17T21:55:04Z Bitcoin Core version v0.17.99.0-35739976c (release build)

Ubuntu 19.10

4.19.1-041901-generic #201811041431 SMP Sun Nov 4 14:33:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

1TB spinning disk.

I don’t think Bitcoin likes being shut down while syncing through systemd?

bitcoin.conf:

txindex=1
server=1
onion=127.0.0.1:9050
externalip=$ADDRESS.onion
discover=1
minrelaytxfee=0
datadir=/mnt/data/.n0de/bitcoin

debug.log

2018-11-17T21:55:04Z Bitcoin Core version v0.17.99.0-35739976c (release build)
2018-11-17T21:55:04Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-11-17T21:55:04Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures.
2018-11-17T21:55:04Z Setting nMinimumChainWork=0000000000000000000000000000000000000000028822fef1c230963535a90d
2018-11-17T21:55:04Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2018-11-17T21:55:04Z Using RdRand as an additional entropy source
2018-11-17T21:55:04Z Default data directory /home/duck/.bitcoin
2018-11-17T21:55:04Z Using data directory /home/duck/.bitcoin
2018-11-17T21:55:04Z Config file: /home/duck/.bitcoin/bitcoin.conf (not found, skipping)
2018-11-17T21:55:04Z Using at most 125 automatic connections (1024 file descriptors available)
2018-11-17T21:55:04Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-11-17T21:55:04Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-11-17T21:55:04Z Using 8 threads for script verification
2018-11-17T21:55:04Z scheduler thread start
2018-11-17T21:55:04Z HTTP: creating work queue of depth 16
2018-11-17T21:55:04Z No rpcpassword set - using random cookie authentication.
2018-11-17T21:55:04Z Generated RPC authentication cookie /home/duck/.bitcoin/.cookie
2018-11-17T21:55:04Z HTTP: starting 4 worker threads
2018-11-17T21:55:04Z Using wallet directory /home/duck/.bitcoin
2018-11-17T21:55:04Z init message: Verifying wallet(s)...
2018-11-17T21:55:04Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2018-11-17T21:55:04Z Using wallet wallet.dat
2018-11-17T21:55:04Z BerkeleyEnvironment::Open: LogDir=/home/duck/.bitcoin/database ErrorFile=/home/duck/.bitcoin/db.log
2018-11-17T21:55:04Z Cache configuration:
2018-11-17T21:55:04Z * Using 2.0MiB for block index database
2018-11-17T21:55:04Z * Using 8.0MiB for chain state database
2018-11-17T21:55:04Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-11-17T21:55:04Z init message: Loading block index...
2018-11-17T21:55:04Z Opening LevelDB in /home/duck/.bitcoin/blocks/index
2018-11-17T21:55:04Z Opened LevelDB successfully
2018-11-17T21:55:04Z Using obfuscation key for /home/duck/.bitcoin/blocks/index: 0000000000000000

Shows up after debug.log output when running from bitcoind command from cli: bitcoind: chain.cpp:102: const CBlockIndex* CBlockIndex::GetAncestor(int) const: Assertion `pindexWalk->pprev’ failed. Aborted (core dumped)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (5 by maintainers)

Most upvoted comments

You might want to check your hardware for defects.

  • memtest86 to check your RAM
  • to check the CPU behaviour under load, use linpack or Prime95
  • to test your storage device use smartctl or CrystalDiskInfo

Source: https://bitcoin.stackexchange.com/a/12206