Please describe the problem.
When trying to operate one of my repositories I'm getting this error:
git-annex: thread blocked indefinitely in an MVar operation
error: external filter 'git-annex filter-process' failed
What steps will reproduce the problem?
Any of the git-annex commands I've tried, such as fsck.
What version of git-annex are you using? On what operating system?
I was running 10.20230126-3 on Debian Bookworm, but I've tried upgrading to 10.20241202-1~bpo12+1 from bookworm-backports in the hope that'd fix it.
Please provide any additional information below.
I've enabled debugging, and this appears to be the relevant lines (running git annex status):
...
[2025-02-15 23:26:58.262822935] (Database.Handle) commitDb start
[2025-02-15 23:26:58.676202887] (Database.Handle) commitDb failed: SQLite3 returned ErrorNotFound while attempting to perform step: database disk image is malformed
[2025-02-15 23:26:58.776543627] (Database.Handle) commitDb start
[2025-02-15 23:26:59.110186761] (Database.Handle) commitDb BlockedIndefinitelyOnMVar
[2025-02-15 23:26:59.110415878] (Utility.Process) process [30460] done ExitSuccess
[2025-02-15 23:26:59.1104987] (Utility.Process) process [30459] done ExitSuccess
git-annex: sqlite worker thread crashed: user error (SQLite3 returned ErrorNotFound while attempting to perform step: database disk image is malformed(after successful open))
error: external filter 'git-annex filter-process' failed
...
The only SQLite3 database I can find is in .git/annex/keysdb . I can open that using sqlite3 and select from the tables with no error messages. Is there another file it is trying to access?
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
I've been happily using git-annex for many many years, first time I've encountered an issue like this.
Calling this done since the sqlite error messages have been improved. --Joey
Hey,
I hit this again today, running 10.20230126-3, so I upgraded to 10.20250115-1~bpo12+1. New error messages, excellent! Including: The SQL trying to be run, and the error from sqlite.
This included "disk I/O error" from sqlite. Further investigation, and the volume was out of space 🤦. Don't know if that was the case when I first hit this or not.
Cheers, Andrew
You can delete the sqlite database affected by the problem and git-annex will recreate it as needed.
Given the improved error message shows what the problem is now, I don't know what more can be done about this really.
Hey,
I just came back to this after trying to do something in my repository. Good to hear I can just the SQlite file, done that now, and it is busy running fsck now.
A useful thing to display might be the path to the corrupted database file and advice to remove it?
While the database file was corrupt, I did some work (not realising it was corrupt) to fix up MP3 tags in my music collection. Now when I run git annex fsck I'm getting errors like:
and
I've tried using git annex reinject, but that is refused as the checksum doesn't match.
Can I tell git-annex to just accept the files that I have in my repository as being correct?
Your previous problem with the sqlite database cannot have caused fsck to detect a checksum problem with your annexed file.
It looks like you have somehow modified annex object files, eg files in
.git/annex/objects. git-annex sets permissions that usually prevent such a thing from happening.There is no way to make git-annex accept a version of a file with a different checksum than the one recorded in git. Instead you need to
git-annex addthe new version of the files to the repository in place of the old version.Here is a bash script that will pull the files out of
.git/annex/bad/and update the annexed files:Good idea to display the path. I've made that change.
I don't think I want to make git-annex suggest deleting sqlite databases anytime sqlite crashes for any reason. While they are safe to delete, that encourages users to shrug and move on and tends to normalize any problem with sqlite. In reality, problems with sqlite are very rare, and I'd like to hear about them and understand them.