Bitcoin Forum
November 06, 2024, 11:18:03 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core 0.17.0 sync stuck at block 553342  (Read 374 times)
odolvlobo (OP)
Legendary
*
Offline Offline

Activity: 4494
Merit: 3402



View Profile
December 23, 2018, 07:18:08 PM
Last edit: December 23, 2018, 08:50:22 PM by odolvlobo
 #1

My node refuses to sync beyond block 553342. I see this in the debug log:

Quote
2018-12-11T02:00:59Z InvalidChainFound: invalid block=0000000000000000001443924dba96339bfb0a06fb48ca8eb244c601a76a0e95  height=553343  log2_work=90.114118  date=2018-12-11T02:00:43Z

followed forever by this:

Quote
2018-12-11T02:00:59Z ERROR: AcceptBlockHeader: block 0000000000000000001443924dba96339bfb0a06fb48ca8eb244c601a76a0e95 is marked invalid

That block is height 553343 on the main chain according to blockchain.info.

I tried restarting Core, but no luck. The disk is nowhere close to being full.

Any suggestions?

Is there a way to unmark it as invalid? I hope I don't have to sync from the beginning.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
December 23, 2018, 08:10:05 PM
Last edit: December 23, 2018, 08:22:24 PM by BitCryptex
Merited by odolvlobo (1)
 #2

You have to delete that block manually. You won't have to re-download previous blocks. Stop your Bitcoin Core instance and open its data directory. Go to blocks folder and delete files associated with this block (blk.dat and rev.dat). A similar problem has been described here and it was answered by achow101 who is also a member of this forum.
Jet Cash
Legendary
*
Offline Offline

Activity: 2814
Merit: 2472


https://JetCash.com


View Profile WWW
December 24, 2018, 06:34:54 AM
 #3

Rather than deleting the bad records, I would rename them. This means that if you have a bad spot on the disk, the software won't try to reuse it. All other actions should be as suggested.

Offgrid campers allow you to enjoy life and preserve your health and wealth.
Save old Cars - my project to save old cars from scrapage schemes, and to reduce the sale of new cars.
My new Bitcoin transfer address is - bc1q9gtz8e40en6glgxwk4eujuau2fk5wxrprs6fys
odolvlobo (OP)
Legendary
*
Offline Offline

Activity: 4494
Merit: 3402



View Profile
December 24, 2018, 03:51:50 PM
Last edit: December 24, 2018, 04:04:51 PM by odolvlobo
 #4

You have to delete that block manually. You won't have to re-download previous blocks. Stop your Bitcoin Core instance and open its data directory. Go to blocks folder and delete files associated with this block (blk.dat and rev.dat). A similar problem has been described here and it was answered by achow101 who is also a member of this forum.

I deleted the last blk.dat and rev.dat files and restarted. It re-indexed all the blocks and continued syncing and now I'm up-to-date. Thanks for the suggestion and the link.

I have some suggestions for any core developers that might read this:

  • 1. Since this problem seems to happen regularly, it would be helpful if the block processing code would detect that the last block is corrupted and do something about it.
  • 2. Since it is the last block that is corrupted, there really isn't a need to re-index the entire chain. Recovering from a corrupted last block could only take a second.

Rather than deleting the bad records, I would rename them. This means that if you have a bad spot on the disk, the software won't try to reuse it. All other actions should be as suggested.

Thanks for the suggestion, but I don't think that managing bad sectors by hand is practical. If you suspect that there is a bad sector, you should have the operating system check the disk.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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


View Profile
December 24, 2018, 06:53:27 PM
 #5

1. There’s probably been a reason they haven’t done that. I got that bug originally three years a go so it is in no way a new thing. I’m guessing it would take a long time to do it but I’m not particularly sure (as I’m it would make the sync process a lot slower or it’s difficult to do).
kalostrian
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
January 10, 2021, 06:17:13 PM
 #6

Problem here is that reindexing takes the same time as downloading the blocks.

So if that problem happens all the time this is not a solution, as reindexing from the begining takes hours...
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
January 11, 2021, 08:01:16 AM
Last edit: January 11, 2021, 11:39:42 AM by NotATether
 #7

I deleted the last blk.dat and rev.dat files and restarted. It re-indexed all the blocks and continued syncing and now I'm up-to-date. Thanks for the suggestion and the link.

I have some suggestions for any core developers that might read this:

  • 1. Since this problem seems to happen regularly, it would be helpful if the block processing code would detect that the last block is corrupted and do something about it.
  • 2. Since it is the last block that is corrupted, there really isn't a need to re-index the entire chain. Recovering from a corrupted last block could only take a second.

If you are able to reproduce this and have the disk space, I'd be interested to see what's in your debug.log if you run bitcoind on a new datadir with --log-level=debug, maybe it's a bug in parsing that particular block in Core 0.17.0 that's causing the syncing process to stall (could be an infinite loop).

EDIT: disregard this post, I didn't realize this thread was 2 years old (but I'm interested in knowing if this problem exists in 0.20.1).

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!