Bitrot really is a thing

Anything you find suspicious, things that crash your client, things that crash the server, anything that doesnt work as it should.
Post Reply
User avatar
+Colibri
Administrator
Posts: 4065
Joined: Sat Feb 25, 2006 4:08 pm
Location: static void Main

Bitrot really is a thing

Post by +Colibri »

Just a fun/interesting aside.
We keep world backups for a long time, so there are a lot of the world-save files, daily going back over 10 years, and hourly going back a few years.

There were "dual" backups in some years, I just checked the 2014 years.
At the time, the backup program zipped the "Saves" directory first into an Hourly destination (timestamped saves_141124_0000.rar) and since it was just midnight, also into the Daily destination, timestamped saves_141124.rar.

At some point looks like I merged both into the "2014" directory, and for someday to remove the duplicates.

So I just ran a command to get the checksums of all the files, with powershell

Code: Select all

 Get-ChildItem -File | ForEach-Object { Get-FileHash $_.FullName }
And got this kind of output

Code: Select all

SHA256          8811A991CD2509639A6DE...       saves_141121.rar
SHA256          8811A991CD2509639A6DE...       saves_141121_0001.rar
SHA256          FD8DF1F1AB7B1EEC2B4B8...       saves_141122.rar
SHA256          FD8DF1F1AB7B1EEC2B4B8...       saves_141122_0001.rar
SHA256          9E42B7FA7519A52211C22...       saves_141123.rar
SHA256          9E42B7FA7519A52211C22...       saves_141123_0000.rar
SHA256          D234EDB0692C2E5FF1F0A...       saves_141124.rar
SHA256          A9746394C99E333D07BAB...       saves_141124_0000.rar
Oops! Although the pair-wise files have the same checksum, here's one that doesnt match up. So I loaded the pair into the HexCmp2 program, and got this image:
2024-11-22 bitrot saves_141124.png
2024-11-22 bitrot saves_141124.png (41.43 KiB) Viewed 2605 times
So, just a single bit flipped.
Original: 0x71 hex, 0111 0001 binary
Corrupted: 0x61 hex, 0110 0001 binary

So when trying to unzip the archive...
2024-11-22 bitrot winrar extraction.png
2024-11-22 bitrot winrar extraction.png (6.01 KiB) Viewed 2605 times
There was no recovery-record set on the archives at the time, so it's a good thing I have these duplicates.



I just kept all those files on various disks, finally got around to setting up a NAS with a whole lot of storage, to put it all in one place where it can be tamed. Thank you for donating! It's a Synology DS1522+ with four WD Red Plus 12tb drives inside, still room for one more, although there's not much need to keep hourly backups for more than 3 years.


Just a reminder to protect your valuable data. (and this one world save from 10 years ago definitely is as precious as the wedding or birth photos! :D )
- If you use Winrar to compress your files, you can add a Recovery Record, which will make it possible to extract the archive even if many bits get flipped.
- Keep your files in multiple locations. But also, stay organized about which copy is the main one and which one is just the mirror (which you don't use as an actual working copy... that sure did set me back for a bit). If you do this, occasionally compare the files in a compare-contents way (not just the filenames and last change date).
+Colibri, Administrator of UO Excelsior Shard

Don't know what the purpose of your life is? Well then make something up! ;)
(Old Colibrian proverb)
User avatar
Eremite
Elder Scribe
Posts: 130
Joined: Sat Jan 28, 2023 7:20 pm

Re: Bitrot really is a thing

Post by Eremite »

User avatar
Wil
Legendary Scribe
Posts: 1227
Joined: Mon Dec 30, 2013 1:19 pm
Location: Seattle, WA, USA
Contact:

Re: Bitrot really is a thing

Post by Wil »

Most media, including CDs and modern hard disks, store ECCs or CRCs with the data and then fail the read operation if the correct contents can't be re-read. Since your hardware asserted the correctness of the re-read data, it was probably stored that way. This means the error happened prior to storage.

A cosmic ray is certainly possible, but there's a more likely explanation: one of the computers which handled the file was a typical desktop or laptop using non-parity ram. While in memory or moving between memory and the CPU, faulty hardware induced a bit flip. If it happened to be an overclocked computer, this explanation is even more likely.
Post Reply