Please describe the problem.
Randomly, in my terminal under a git-annex repository, I get the following message:
git-annex: <stdout>: hPutBuf: resource vanished (Broken pipe)
Note that despite this bug happens in background when I'm under a git-annex repository, I can still use explicit git-annex commands that are working well and do not crash.
What steps will reproduce the problem?
Simply by cd
inside one of my git-annex repositories. I think the bug is when my prompt generator (starship
) is trying to fetch the status of the git repository under the hood.
Moreover, this bug appeared randomly without any obvious reason, possibly under all of my repositories (not a specific one).
Finally, I noticed that this bug started more or less at the same time that I did one operation:
Copy my git-annex repositories from one external storage A to another external storage B
Encrypt my external storage A
Copy back from external storage B to A
(But I really do not know if this is related, note that the bug is happening wherever I am on those external storage devices or on one of my local filesystems)
What version of git-annex are you using? On what operating system?
- System: Arch Linux
- Kernel: 6.14.4-arch1-2
- Arch: amd64
- git-annex:
git-annex version: 10.20250416-gb22a72cd9444071e86a46cc1eb8799e7d085b49d
build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV
dependency versions: aws-0.24 bloomfilter-2.0.1.2 crypton-0.34 DAV-1.3.4 feed-1.3.2.1 ghc-9.4.8 http-client-0.7.17 persistent-sqlite-2.13.1.0 torrent-10000.1.3 uuid-1.3.16 yesod-1.6.2.1
key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL GITBUNDLE GITMANIFEST VURL X*
remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg rclone hook external compute mask
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
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)
This is my first post here. First, I use git-annex for both my personal files and professional datasets since around 5 years. So I have to say this wonderful piece of software helped me a lot, therefore a big thank you Joey and other contributors. Second, as a reminder to myself, I really should consider to add tips to the website, since I accumulated a lot of self-wrote documentation in my notes!
I've seen this message before with
git-annex version | head -n 1
That particular one was made to ignore the error to write to stdout after it was closed, but any other write to stdout might fail similarly when going to a pipe that got closed.
So can you please track down what git-annex command is being run? My suggestion is to use
strace -f
git_status
module in starship. I know this is not the best solution, but I was able to stop this issue by increasing the value ofcommand_timeout
in my starship config. Another potential solution might be to usegitoxide
for checking the status of the repository with starship (my assumption here is thatgitoxide
might be faster than regular git for checking the status of the repository).