Zcashd crashes after 18% sync

Hello,

on my computer with linux mint (64 bit) I have tried numerous times to run zcashd.

I have repeatedly cleared the data (~/.zcash and ~/.zcash-params) and installed different software-packages:

  • zecwallet with embedded zcashd
  • zepio-wallet with embedded zcashd
  • zcashd standalone

Each time zcashd started as expected and crashed after 18% sync. (Give or take)

The screen from the latest run is below in this post
The last lines from ~.zcash/debug.log are below in this post.
The final result is always “Database Corrupted”

I have no idea what might cause this. Please give me a hint on where to look.

THX
stn

— screen —

Thank you for running a Zcash node!
You’re helping to strengthen the network and contributing to a social good :slight_smile:

In order to ensure you are adequately protecting your privacy when using Zcash,
please see https://z.cash/support/security/.

 Downloading blocks | 107817 / ~584770 (18%)
        Connections | 8

Network solution rate | 57393479 Sol/s

You are currently not mining.
To enable mining, add ‘gen=1’ to your zcash.conf and restart.

Since starting this node 2 hours, 14 minutes, 53 seconds ago:

  • You have validated 1348085 transactions!

Messages:

  • Error: Error: A fatal internal error occurred, see debug.log for details

[Press Ctrl+C to exit] [Set ‘showmetrics=0’ to hide]
zcashd: main.cpp:3109: bool ConnectTip(CValidationState&, CBlockIndex*, CBlock*): Assertion `pcoinsTip->GetSproutAnchorAt(pcoinsTip->GetBestAnchor(SPROUT), oldSproutTree)’ failed.
Abgebrochen (Speicherabzug geschrieben)

— debug.log —

2019-08-11 15:04:40 Pre-allocating up to position 0x5000000 in blk00022.dat
2019-08-11 15:04:40 UpdateTip: new best=0000000077ddd238010308d9d44707b38751fe533a092f9752589f6070e1edc7 height=107808 log2_work=49.454084 tx=556205 date=2017-05-03 20:01:29 progress=0.076634 cache=115.6MiB(6346tx)
2019-08-11 15:04:40 UpdateTip: new best=00000000224d5f4f85d1c03b0872c617981a378b170ee2601110bcf0f7e12045 height=107809 log2_work=49.454099 tx=556207 date=2017-05-03 20:02:08 progress=0.076634 cache=115.6MiB(6349tx)
2019-08-11 15:04:40 UpdateTip: new best=0000000056828e6fd8efc482ef36d1002908b02aa3899cc011c5726878dfcdbb height=107810 log2_work=49.454115 tx=556208 date=2017-05-03 20:02:27 progress=0.076635 cache=115.6MiB(6350tx)
2019-08-11 15:04:40 UpdateTip: new best=0000000061f3ce877c0e5f41a29020ec7436d7a1834c2656ffbe18600a815e4e height=107811 log2_work=49.454131 tx=556214 date=2017-05-03 20:04:08 progress=0.076635 cache=115.7MiB(6359tx)
2019-08-11 15:04:41 UpdateTip: new best=000000001a1681517e21c50516156b4fd19e54dce404e52718e99be19e72b254 height=107812 log2_work=49.454148 tx=556227 date=2017-05-03 20:09:52 progress=0.076637 cache=117.5MiB(6481tx)
2019-08-11 15:04:41 ERROR: ContextualCheckTransaction(): overwinter is not active yet
2019-08-11 15:04:41 ERROR: AcceptToMemoryPool: ContextualCheckTransaction failed
2019-08-11 15:04:41 ERROR: ContextualCheckTransaction(): overwinter is not active yet
2019-08-11 15:04:41 ERROR: AcceptToMemoryPool: ContextualCheckTransaction failed
2019-08-11 15:04:41 UpdateTip: new best=000000007b4b5778106a42ebd535d16a32f0b7db32b6e010bb0166ab749ec167 height=107813 log2_work=49.454164 tx=556239 date=2017-05-03 20:18:30 progress=0.076639 cache=118.2MiB(6527tx)
2019-08-11 15:04:41 UpdateTip: new best=0000000071ec419eccb9b90c1aaf0e9bc4bdf09268bc164bfe93500d77f27727 height=107814 log2_work=49.454181 tx=556245 date=2017-05-03 20:20:46 progress=0.076640 cache=124.8MiB(6918tx)
2019-08-11 15:04:41 UpdateTip: new best=00000000758e1695e7bcba009fbe72b99c95351017ee336c1a950b8981b4c425 height=107815 log2_work=49.454198 tx=556250 date=2017-05-03 20:23:30 progress=0.076640 cache=131.0MiB(7279tx)
2019-08-11 15:04:42 UpdateTip: new best=000000005b5d4cbe6ee38e33694bf656146c01f0915afea509af34dde5107ae4 height=107816 log2_work=49.454216 tx=556304 date=2017-05-03 20:23:41 progress=0.076648 cache=257.7MiB(14930tx)
2019-08-11 15:04:42 UpdateTip: new best=00000000121a7f277abf6a39f2d7773542907b9e8ceb0fbeaf31d1d24714cc54 height=107817 log2_work=49.454234 tx=556313 date=2017-05-03 20:26:09 progress=0.076649 cache=261.2MiB(15167tx)
2019-08-11 15:04:43 Pre-allocating up to position 0xa00000 in rev00022.dat
2019-08-11 15:04:44 Corruption: block checksum mismatch
2019-08-11 15:04:44 *** System error while flushing: Database corrupted
2019-08-11 15:04:45 ERROR: ProcessNewBlock: ActivateBestChain failed

Hi @stn021 welcome to the forums! :slightly_smiling_face:

Can you give us more info about the machine you are using? During initial sync Zcashd can use up to 4GB of RAM or else it will cause errors.

There are two errors here: “Corruption: block checksum mismatch”, and the assertion error “Assertion `pcoinsTip->GetSproutAnchorAt(pcoinsTip->GetBestAnchor(SPROUT), oldSproutTree)’ failed.”

After investigating the source code, Eirik and I believe that the block database corruption is causing the assertion error, so the corruption is the root problem. The error reporting is not ideal here, sorry. (What happened is that because the node was syncing, a new block came in immediately after detecting the corruption, but before the node had exited, causing the misleading assertion.)

Block database corruption is often caused by disk or memory hardware failures: https://github.com/zcash/zcash/issues/2228#issuecomment-291220071

It’s usually possible to recover by resyncing the node from scratch, using zcashd -reindex -rescan.

A similar error once happened to me when my hard disk ran out of space during sync.

1 Like