Author

Topic: Bitcoin Core 0.11.0 Linux - ReadBlockFromDisk crash - truncated block file? (Read 1234 times)

legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
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.
sr. member
Activity: 268
Merit: 258
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.
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
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.)
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
That's what I'm doing now. It would be better if my backup wasn't nearly two months out of date.
staff
Activity: 3458
Merit: 6793
Just writing some code
Copy over everything from the data directory. That will include the database files so it won't need to reindex or sync from scratch.
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
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
Jump to: