Fatal error: Detected non-empty blocksets with no associated blocks

@ts678 here are my results. And thanks again for the help!

First some cautions/helps:

First, when using SQLiteDatabaseBrowser you can freely modify the database. I strongly suggest anyone trying to follow these steps to make a copy of the sqlite file before “browsing” (I did myself). (EDIT: Or, File -> Open database read-only)

Second, the file was located here for me:

C:\Users\user1\AppData\Local\Temp\887265818...3848570.sqlite

There are 3 .sqlite files there and that’s the one, not “backup 2019...052714.sqlite” nor “Duplicati-server.sqlite

Third the way the syntax works in SQLiteDatabaseBrowser you can not use the quotes. I used (EDIT: or maybe it was just the particular variant of quote chars I got when I copy-pasted from this forum in my browser):

SELECT * FROM Blockset WHERE Length > 0 AND ID NOT IN (SELECT BlocksetId FROM BlocksetEntry)

The results were one hit:

ID: 65317
Length: 72184
Hash: ND1F/R+XlQ+HKvEZ65U5JJWY//A0s8VbR4RnNNwgcbs=

Unfortunately, when I looked up that ID as the BlocksetID in the File table, it was not found. This lookup was using the filter feature of SQLiteDatabaseBrowser at the top of the column while browsing data.

(EDIT) Or you could use this sql query from @ArdieX in this post:

SELECT * FROM File WHERE BlocksetID BETWEEN 211995 AND 212020

And change the numerical values to fit your situation.

Now that I re-read the sql statement, not finding the ID in the File table kind of makes sense. The sql is looking for missing BlocksetIds in the BlocksetEntry table, and it has found one. The fact that that same BlocksetID is also not found in the File table is perhaps almost expected, now that I think about it. The error message says “with no associated blocks”. And now I see that means “there isn’t even an entry at all in the block table”.

More information, though:

All the BlocksetIDs around this number were in the TEMP dir. And the id’s were not contiguous. Both of these two observations may suggest that my id was there at one point, and was deleted on disk, and deleted from both the File table and the BlocksetEntry table but not from the Blockset table.

And even more hints:

The immediately previous BlocksetID numerically to my hit was this file:

C:\Users\user1\AppData\Local\Temp\dup-3fa940f2-ba1f-4489-9ebb-74d11a070186

There are several dup-* files all created in the last few days in that Temp dir and I strongly suspect these are dup-licati files.

So from these hints, one can speculate a sequence of events that are involved in this bug:

  1. Duplicati deletes one of its own temp files
  2. This causes Duplicati to delete that file from the database File table and the BlocksetEntry table but not the Blockset table.

If we’re lucky, that will mean something to somebody :wink:

Also this exercise is making me think a database repair might help.

But now I feel like we might be on the trail to identifying a bug and I want to continue that process.

2 Likes