Author

Topic: Stuck in "activating best chain" since 0.11.2 (Read 2098 times)

legendary
Activity: 1762
Merit: 1011
February 22, 2016, 08:19:01 PM
#5
Btw, Pieter Wuille states on stackexchange that:

http://bitcoin.stackexchange.com/questions/41524/what-does-activating-best-chain-mean
Quote
At startup, it is possible that the first database contains blocks that could be valid but aren't part of the snapshot the second database represents. This can happen when you manually overwrite the block index (restoring from a backup, for example), but more commonly: because Bitcoin crashed after downloading some blocks that ended up being written to the block index, but the resulting chain state was never dumped to disk. When this happens, we will activate the best chain, loading blocks from the second database and applying them to the first (while doing full validation on them in the process).

Since Bitcoin Core heavily caches the chain state in memory, it is possible that there are hundreds or thousands of blocks missing from the chain state after an unclean shutdown. It can take a while to validate them again.

TL;DR: It's verifying blocks that were downloaded already but not processed yet (because the result of processing wasn't properly written to disk, most likely).


I wonder what cases exist currently where this issue occurs even after a supposed *clean* shutdown. Maybe there is some buggy behavior still present? I know, for instance, there was a bug fix following 0.12.0rc3, as pruned nodes were discovered to not be shutting down in the right state (and it was not due to unclean shutdowns, but simply due to a bug).

There's the following bug report, for others experiencing getting stuck at "activating best chain": https://github.com/bitcoin/bitcoin/issues/7038

I've also noticed that the "checkblocks" scan that occurs on every startup can be slow for people running particular configurations. At least that issue can be worked around by configuring bitcoin.conf (with checkblocks and checklevel), and it also gives us some sort of progress indication in Qt.
legendary
Activity: 1762
Merit: 1011
February 13, 2016, 12:55:47 PM
#4
I suggest to the devs that they add some loading bar showing progress and not just some static message.

Yeah, I second this.
legendary
Activity: 1204
Merit: 1028
November 14, 2015, 10:35:01 AM
#3
Try posting the last part of your debug log and check your CPU and disk usage.

I suspect this may be because of a database corruption. Try backing up your wallet.dat first and run Bitcoin Core with the -rescan flag.

Ffs this has happened me a lot of times when i've updated the software. My ram and HD is good and new... if this keeps happening I may give up with running a node. If at least it was faster downloading the blockchain, but it takes +1 days at best for me.

Anyway debug is showing this:

Edit: Anyway, it has now opened. Apparently it was doing something and it wasn't stuck. I suggest to the devs that they add some loading bar showing progress and not just some static message.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
November 14, 2015, 10:00:24 AM
#2
Try posting the last part of your debug log and check your CPU and disk usage.

I suspect this may be because of a database corruption. Try backing up your wallet.dat first and run Bitcoin Core with the -rescan flag.
legendary
Activity: 1204
Merit: 1028
November 14, 2015, 09:42:25 AM
#1
So I updated, booted the wallet the first time, but it was stuck for like an hour in "7 days to go". I closed it, reopened it, and now im stuck at "activating best chain". What's going on? Help please.
Jump to: