Bitcoin Forum
May 05, 2024, 05:28:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Rewinding blocks every time I start bitcoin-qt  (Read 315 times)
Jay_Pal (OP)
Legendary
*
Offline Offline

Activity: 1493
Merit: 1003



View Profile
April 25, 2018, 09:33:39 PM
 #1

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.

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
1714930105
Hero Member
*
Offline Offline

Posts: 1714930105

View Profile Personal Message (Offline)

Ignore
1714930105
Reply with quote  #2

1714930105
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
April 25, 2018, 09:43:46 PM
 #2

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.

RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
April 26, 2018, 04:58:17 AM
 #3

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.
Jay_Pal (OP)
Legendary
*
Offline Offline

Activity: 1493
Merit: 1003



View Profile
April 26, 2018, 10:07:55 PM
 #4

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!

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 26, 2018, 10:16:37 PM
 #5

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).
Jay_Pal (OP)
Legendary
*
Offline Offline

Activity: 1493
Merit: 1003



View Profile
April 27, 2018, 10:34:28 PM
 #6

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!

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
April 27, 2018, 11:27:48 PM
 #7

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
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
April 27, 2018, 11:32:34 PM
Merited by bill gator (1)
 #8

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.

Jay_Pal (OP)
Legendary
*
Offline Offline

Activity: 1493
Merit: 1003



View Profile
April 27, 2018, 11:39:20 PM
 #9

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!

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 28, 2018, 03:02:22 PM
 #10

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).
Jay_Pal (OP)
Legendary
*
Offline Offline

Activity: 1493
Merit: 1003



View Profile
May 03, 2018, 08:32:38 PM
 #11

Gentlemen,

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

Thank you all!

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!