Bitcoin Forum
June 15, 2019, 09:56:01 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Rewinding blocks every time I start bitcoin-qt  (Read 159 times)
Jay_Pal
Legendary
*
Offline Offline

Activity: 1395
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?
1560635761
Hero Member
*
Offline Offline

Posts: 1560635761

View Profile Personal Message (Offline)

Ignore
1560635761
Reply with quote  #2

1560635761
Report to moderator

0% MINING FEES FOR THE NEXT MONTH. GET PAID IN BTC, ETH, XMR or RVN.

www.cudominer.com Learn More
Easily run CudoOS from a USB flash drive.
Designed for rigs. Manage your mining remotely from Cudo Console.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1792
Merit: 2459


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


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: 840
Merit: 629


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

Activity: 1395
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
*
Online Online

Activity: 1400
Merit: 1260


https://bit.ly/2FR9nyn - free python tutorials


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

Activity: 1395
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: 840
Merit: 629


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: 1792
Merit: 2459


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


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

Activity: 1395
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
*
Online Online

Activity: 1400
Merit: 1260


https://bit.ly/2FR9nyn - free python tutorials


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

Activity: 1395
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!