Please describe the problem.
Sometimes git annex copy
complains with git-annex: .git/HEAD: openFile: resource busy (file is locked)
. For example:
$ git annex copy --from r1 --to r2 --not --in r2
copy dir/foo/bar/baz.txt (from r1...)
(checksum...) (to r2...)
ok
copy dir/quux/buz/bez1.bin (from r1...)
(checksum...) (to r2...)
ok
copy dir/quux/buz/bez2.bin (from r1...)
(checksum...) (to r2...)
ok
copy dir/quux/buz/bez3.bin (from r1...)
(checksum...) (to r2...)
ok
git-annex: .git/HEAD: openFile: resource busy (file is locked)
This happens in a adjusted/master(unlockpresent)
branch.
everything seems to work fine regardless of the complaint, so I don't know if this warning message is just a cosmetic issue or if it is the tip of the iceberg, hiding a more serious problem.
What version of git-annex are you using? On what operating system?
git-annex version: 10.20230329-g30d7f9ad7
build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV
dependency versions: aws-0.22.1 bloomfilter-2.0.1.0 cryptonite-0.29 DAV-1.3.4 feed-1.3.2.1 ghc-9.0.2 http-client-0.7.13.1 persistent-sqlite-2.13.1.0 torrent-10000.1.1 uuid-1.3.15 yesod-1.6.2.1
key/value backends: SHA256E [...] WORM URL X*
remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external
operating system: linux x86_64
supported repository versions: 8 9 10
upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10
local repository version: 8
Please provide any additional information below.
This is probably related to Failed adjusted branch update after error in drop
I get the same complaint/error while on a hidemissing-unlocked adjusted branch (as a Windows user) and trying to sync with a regular remote (which happens to be an unlocked adjusted branch). Manually bisecting I found out that the problem first occurs with 038a2600f4cf71294976280c5c29f6710359375f (so "00f" indeed) which seems to confirm that the fixes made for the linked bug seem to be the culprit.
Here's a simple PowerShell transcript of me committing a disk image backup file to an annex and then proceeding to
sync
with a remote trying different versions of git-annex with the one built from cb4d9f7b1f8ce251d86f8f0163c0884cb9454603 finally working, ie. doing a full pull and push cycle (heregit annex-sync
is simply an alias forgit annex sync --no-commit
):Clearly a laziness bug, so the fix seems obvious and I've commited it.
But I've not managed to reproduce it. It makes sense it would be intermittent. Please followup if you still see it after 3eb51ee929c75376d004341f41aa38a1488558a3
I can confirm that things seem to be AOK now:
Thank you so much, Joey, well done! 🎉