Author

Topic: Rewinding blocks every time I start bitcoin-qt (Read 334 times)

legendary
Activity: 1493
Merit: 1003
Gentlemen,

Thank you very much, re-syncing seems to have solved the problem and it is working as expected!

Thank you all!
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Your node is rewinding hundreds of blocks, that seems like a huge problem.

What version of Bitcoin Core were you running before 0.16? This seems characteristic of upgrading from a non-segwit node to a segwit node. I'm guessing that's the problem (especially since the log is full of lines about non-standard transactions) and, with pruning, it gets into some weird feedback loop.

Your best option is to resync the blockchain entirely. You can do that by deleting everything in the datadir except for your wallet file.

It looks like you need to run the program with the -reindex command line option.
He's pruned so that won't work without resyncing.

That's right, I have a pruned wallet and before I was running some 15 something, can't tell it exactly.
I'll resync and I'll get back to this topic after finishing (in about a week...)

Thank you all!

Id suggest moving/deleting the blocks and chainstate folders. I remember a forced reindex where that happened to me and the client kept reindexing because it didn't work out that the last block file was corrupted so it got stuck in an infinite loop (until I deleted the block files).
legendary
Activity: 1493
Merit: 1003
Your node is rewinding hundreds of blocks, that seems like a huge problem.

What version of Bitcoin Core were you running before 0.16? This seems characteristic of upgrading from a non-segwit node to a segwit node. I'm guessing that's the problem (especially since the log is full of lines about non-standard transactions) and, with pruning, it gets into some weird feedback loop.

Your best option is to resync the blockchain entirely. You can do that by deleting everything in the datadir except for your wallet file.

It looks like you need to run the program with the -reindex command line option.
He's pruned so that won't work without resyncing.

That's right, I have a pruned wallet and before I was running some 15 something, can't tell it exactly.
I'll resync and I'll get back to this topic after finishing (in about a week...)

Thank you all!
staff
Activity: 3458
Merit: 6793
Just writing some code
Your node is rewinding hundreds of blocks, that seems like a huge problem.

What version of Bitcoin Core were you running before 0.16? This seems characteristic of upgrading from a non-segwit node to a segwit node. I'm guessing that's the problem (especially since the log is full of lines about non-standard transactions) and, with pruning, it gets into some weird feedback loop.

Your best option is to resync the blockchain entirely. You can do that by deleting everything in the datadir except for your wallet file.

It looks like you need to run the program with the -reindex command line option.
He's pruned so that won't work without resyncing.
hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt
Sorry for the delay posting but I was pressed for time since I had to go to sleep as today I had to wake early for work.
I appreciate all your help.

When you shut it down, do you wait for the window to close before shutting down. E.G, do you do a forceful shutdown or do you allow it to shut down on it's own before turning off your computer.

I usually let it shutdown correctly except in this last one where I was once again pressed for time and fed up for the nth time it rewinded blocks... so I killed the thread... :/

As for the debug fie (10MB!!!), here it is: https://www.dropbox.com/s/p03omkvwt3oqjhi/debug.log?dl=0

Thank you once again!

Important lines at the very end of that log I'm looking at:
Code:
2018-04-25 21:40:36 ERROR: ReadBlockFromDisk: Deserialize or I/O error - CAutoFile::read: fread failed: iostream error at CBlockDiskPos(nFile=1229, nPos=77695671)
2018-04-25 21:40:36 *** Failed to read block

It looks like you need to run the program with the -reindex command line option.

To do that (for windows):
  • Right click on your shortcut for the program and select properties
  • In the field labeled "target", you should see something like "C:\Program Files\Bitcoin\bitcoin-qt.exe" (Don't worry if your path isn't exactly the same)
  • Outside of those quotes, add the -reindex option (should look like this:) "C:\Program Files\Bitcoin\bitcoin-qt.exe" -reindex
  • After fully exiting Bitcoin Core, double click on that shortcut. It should run and I believe it will prompt you asking if you want to reindex/rebuild, you want to select yes/the affirmative option.
  • Once it's done, edit your shortcut again to remove the extra bit that you added, so it should look like the second bullet point above again

That should rebuild the database and you should be doing fine after that. Let me know if you have any more problems.

See achow's answer below mine
legendary
Activity: 1493
Merit: 1003
Sorry for the delay posting but I was pressed for time since I had to go to sleep as today I had to wake early for work.
I appreciate all your help.

When you shut it down, do you wait for the window to close before shutting down. E.G, do you do a forceful shutdown or do you allow it to shut down on it's own before turning off your computer.

I usually let it shutdown correctly except in this last one where I was once again pressed for time and fed up for the nth time it rewinded blocks... so I killed the thread... :/

As for the debug fie (10MB!!!), here it is: https://www.dropbox.com/s/p03omkvwt3oqjhi/debug.log?dl=0

Thank you once again!
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
If I were you I would be paranoid and run a disk check for bad sectors. I'm not totally sure but if my block database started acting funky I'd be concerned.

I'd also question how old the hard drive is OP in your machine, can you also try defragmenting it as well as what RGB suggests?

Description of Problem: Every time I start bitcoin-qt I get a "Rewinding blocks" message that lasts for hours before start syncing again.
It used to be fine but some weeks ago it started behaving this way.
After letting it rewind, everything is fine until I shut it down.
When you shut it down, do you wait for the window to close before shutting down. E.G, do you do a forceful shutdown or do you allow it to shut down on it's own before turning off your computer.


The debug.log as achow says will be very helpful here, it'll be in the ~/.Bitcoin folder (if you use default settings).
legendary
Activity: 1493
Merit: 1003
Post your debug.log file.

I will as soon as I'm able too. Tonight I am a little pressed for time.

Rewinding some blocks is always part of the startup sanity check, that is normal behavior. However it should not take very long.

I know it is but it never did this every single time I started the client...

Thanks!
hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt
If I were you I would be paranoid and run a disk check for bad sectors. I'm not totally sure but if my block database started acting funky I'd be concerned.
staff
Activity: 3458
Merit: 6793
Just writing some code
Post your debug.log file.

Rewinding some blocks is always part of the startup sanity check, that is normal behavior. However it should not take very long.
legendary
Activity: 1493
Merit: 1003
Bitcoin Client Software and Version Number: Bitcoin Core 0.16.0.0-g4b4d7eb255
Operating System: Ubuntu 17.10
System Hardware Specs: AMD Athlon 2, 8GB ram - 5gb pruned database.
Description of Problem: Every time I start bitcoin-qt I get a "Rewinding blocks" message that lasts for hours before start syncing again.
It used to be fine but some weeks ago it started behaving this way.
After letting it rewind, everything is fine until I shut it down.

Thank you all for your help.
Jump to: