"Bad state (invalid stored block lengths)" reported during test

I abuse my backups for all sorts of testing purposes so this could be just me being stupid, but recently I ran a test of all my backup files in a job and 10 of my dlist files came up with “Bad state (invalid stored block lengths)” errors.

Oddly (coincidentally?), all 10 of these belong to the 16 backups made since I updated to canary.

I moved the “bad state” dlist files into a subfolder and did a database repair. After they were regenerated the test succeeds without issue - however, I did notice that the regenerated files are SMALLER than the originals (for example 653KB vs. 815KB) but take up more space on disk (4KB vs 816KB).

My assumption is the space-on-disk thing is due to block (as in drive format block) sizes. The odd thing is I haven’t made any changes to my server OR Duplicati in this time frame and I’m seeing “original” files taking up their own size on the disk while rebuild files take up a “block size” on the disk.

It’s not really a problem (things seem to be working correctly) but I thought I’d share in case others run into this error.

Mine’s OK. :joy: but I looked in source for “invalid stored block lengths”, and that’s probably zlib and a bad zip.
If anyone’s up to a zip-level diagnosis (I only saw fixer tools), use Duplicati’s SharpAESCrypt.exe and enjoy…

Windows File Explorer’s “Size on disk” seems best not looked at too closely, however one can even see zero when a small file fits in the Master File Table directory entry. For large, one usually gets cluster size multiples.

Possibly there is a typo, but I’m not sure how any multiple-hundreds-of-KB file managed to say “Size” of 4KB.

Oddly, no - it’s not a typo (I double checked 'cause I agree, it’s weird). Granted I’m using Windows explorer to view an SMB share of a BTRFS formatted drive, so there could be all sorts of things going on here…

But when comparing my dlist for 20180706T082200Z I get:

  • Original: Size 815KB (835,581 bytes) | Size on disk 816KB (835,584 bytes)
  • Rebuilt: Size 653bytes (653 bytes) | Size on disk 4.00KB (4,096 bytes)

Looking directly on the Linux drive with midnight command I’m still seeing rebuilt files at 653 bytes (8 blocks) vs original files at 835,581 bytes (1,632 blocks)

They are encrypted, so it’s a bit of a pain to poke in them to find what’s different but I may have to do that 'cause I’m wondering if the rebuilt dlist files are really storing anything at all.

Either that, or maybe I’ve lost some dblock files so there’s little / nothing left for the dlist files to record.