Bitcoin Forum
June 01, 2024, 05:33:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core 0.11.0 Linux - ReadBlockFromDisk crash - truncated block file?  (Read 1217 times)
Foxpup (OP)
Legendary
*
Offline Offline

Activity: 4382
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
September 23, 2015, 07:55:10 AM
Last edit: September 23, 2015, 01:20:38 PM by Foxpup
 #1

My node just crashed with "ERROR: ReadBlockFromDisk: Deserialize or I/O error - CAutoFile::read: end of file at CBlockDiskPos(nFile=5, nPos=1605429077)". Sure enough, blocks/block00005.dat is only 1.4 GB in size. It used to be 2.0 GB. It appears to have been truncated. The timestamp shows it was modified at 2015-09-09 3:00:35 UTC, but nothing unusual happened at that time. How did this happen? It's a new hard drive so my first thought was I got a bad one, but surely that wouldn't affect the timestamp? I'm currently running a full virus scan. If that turns up nothing, should I just copy that block file from my backup or will that screw up the block index or have other weird side effects?

ETA: Virus scan was clean. I've copied in a good blk00005.dat and am currently running it with -checkblocks=0 -reindex, which is probably overkill but I want to make sure nothing else has gone wrong, since I still have no idea how it happened.

ETA: Well that was unexpected. After it finished with no errors, it blew away all my blk*.dat files for no obvious reason and started synchronising from scratch. I can see this is going to be a fun night. Undecided

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6663


Just writing some code


View Profile WWW
September 23, 2015, 02:10:11 PM
 #2

Copy over everything from the data directory. That will include the database files so it won't need to reindex or sync from scratch.

Foxpup (OP)
Legendary
*
Offline Offline

Activity: 4382
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
September 23, 2015, 02:40:39 PM
 #3

That's what I'm doing now. It would be better if my backup wasn't nearly two months out of date.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
Foxpup (OP)
Legendary
*
Offline Offline

Activity: 4382
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
October 17, 2015, 01:30:42 PM
 #4

Update: It happened again, this time with blk00000.dat. Timestamp 2015-09-09 11:01:51 UTC. My first thought was maybe something did happen on that date, but then I remembered that I had just restored this file from a backup I made way back in July. There's no possible way it could have really been modified on September 9. What the fuck's going on here? (No, the backup is not corrupt - I restored it again and it's perfectly fine.)

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 256


View Profile
October 17, 2015, 10:02:26 PM
 #5

Update: It happened again, this time with blk00000.dat. Timestamp 2015-09-09 11:01:51 UTC. My first thought was maybe something did happen on that date, but then I remembered that I had just restored this file from a backup I made way back in July. There's no possible way it could have really been modified on September 9. What the fuck's going on here? (No, the backup is not corrupt - I restored it again and it's perfectly fine.)
Well the timestamp will be modified every time you run core since the program does access the file and can modify it.

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
Foxpup (OP)
Legendary
*
Offline Offline

Activity: 4382
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
October 17, 2015, 11:23:30 PM
 #6

Well the timestamp will be modified every time you run core since the program does access the file and can modify it.
It doesn't modify historical block files and certainly doesn't truncate them. Even if it did, the file was created after that date, from a backup made before that date.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
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!