Repository navigation
Closed
Description
Describe the bug
In two separate repositories today, after upgrading to git lfs 3.0.0 (these happened to be on circle-ci pipelines with unpinned versions of git lfs), the following error occurred:
[e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855] Object does not exist on the server: [404] Object does not exist on the server
error: failed to fetch some objects from 'https://github.com/<repo name redacted>/info/lfs'
Oddly enough - the exact same object ID was reported in two completely different repos.
Running
git log --all -p -S e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Did not return any objects.
However, running
git-lfs ls-files --all | grep e3b0c44
returned a series of files, none of which are being tracked by git-lfs, all of which are zero bytes in size.
Pinning the version of git-lfs used to 2.13.3 resolved the issue.
To Reproduce
Steps to reproduce the behavior:
- Create a repository with an empty file in it and some other non-empty file tracked with git-lfs
- Pull
Expected behavior
No error, as these files are not tracked by git lfs.
System environment
Ubuntu 16.04 (ubuntu-1604:202007-01) running on circle-ci
Git config:
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
url.ssh://[email protected]=https://github.com
gc.auto=0
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
[email protected]:carta/ds-reporting-service.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
lfs.repositoryformatversion=0
Output of git lfs env
git-lfs/3.0.0 (GitHub; linux amd64; go 1.17)
git version 2.27.0
Endpoint=https://github.com/<redacted repo name>.git/info/lfs (auth=none)
[email protected]:<redacted>/<redacted repo name>.git
LocalWorkingDir=/home/circleci/<redacted repo name>
LocalGitDir=/home/circleci/<redacted repo name>/.git
LocalGitStorageDir=/home/circleci/<redacted repo name>/.git
LocalMediaDir=/home/circleci/<redacted repo name>/.git/lfs/objects
LocalReferenceDirs=
TempDir=/home/circleci/<redacted repo name>/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/home/circleci/<redacted repo name>/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_ASKPASS=echo
GIT_EXEC_PATH=/usr/lib/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
Reacted by Horace Ko, Rajiv Ramanathan, Matt Beedle, OMoynes, Marat Radchenko, DangerBlack, Aamir Jawaid, Tyler Gaw and Sandro Huber
Metadata
Metadata
Assignees
Labels
No labels
Activity
slonopotamus commentedon Sep 27, 2021
Confirming, we also hit this issue.
Previous series about zero-sized LFS objects: #3863, #2863, #2447. I believe that the proper fix is to restore pre-3.0.0 behavior. Forcing users to rewrite their repo history because they had zero-sized LFS object is lots of manwork with unclear benefits.
There's also #3865.
bk2204 commentedon Sep 27, 2021
Yeah, this definitely sounds like a bug. We changed how we parse files, but that should not have resulted in this behavior. I'll try to get a patch into 3.0.1.
bk2204 commentedon Sep 27, 2021
This should be fixed with #4654. It would be great if you could test and verify that the code there works for you.
EricVogl-carta commentedon Sep 27, 2021
Thanks so much! This does appear to fix the issue.
git-lfs ls-files --allno longer lists zero-byte files,git-lfs fetchno longer complains about missing objects.bk2204 commentedon Sep 27, 2021
Great. I'll try to get it included in 3.0.1 release today or tomorrow.
Kallekro commentedon Sep 29, 2021
We experienced the same bug monday which caused our builds to fail, so we forced our build agents to use the previous LFS version 2.13.3.
I agree that
git lfs fetchno longer complains about missing objects, but we still experience thatgit-lfs ls-files --alllists zero-byte files that shouldn't be tracked by LFS.If I use
git lfs fetch --allthe output shows how many objects are found, and here I still see one more with the new version 3.0.1 than when using version 2.13.3.Additionally, running
git lfs ls-files | grep e3b0c44298also still lists the empty files that was causing a problem when fetching in version 3.0.0.Oddly enough, when I use the --all flag, ie.
git lfs ls-files --all | grep e3b0c44298fewer 0 byte files are listed, but there are still some listed.bk2204 commentedon Sep 29, 2021
@Kallekro Could you open a new issue for that? That's going to be a different bug and a different fix.
slonopotamus commentedon Sep 29, 2021
@bk2204 just for history: do you know by chance what change in git-lfs caused this regression?
bk2204 commentedon Sep 29, 2021
It's probably efaf9a2 without a suitable preparatory commit to fix up that case.