Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-lfs: fatal: Cannot handle files this big (4.3G)

Tags:

git

git-lfs

Using git-lfs/1.1.0 (GitHub; linux 386; go 1.5.1), file size 4.3G.

git init
git lfs install
git lfs track *.nnex

.gitattributes: *.nnex filter=lfs diff=lfs merge=lfs -text

git add evernote-backup.nnex: fatal: Cannot handle files this big

git lfs ls-files: Git can't resolve ref: "HEAD"

git lfs track: Listing tracked paths evernote-backup.nnex .gitattributes)

git lfs env:

WARNING: Reading LFS config from ".gitconfig", not ".lfsconfig". Rename to ".lfsconfig" before Git LFS v2.0 to remove this warning.
git-lfs/1.1.0 (GitHub; linux 386; go 1.5.1)
git version 2.1.4

LocalWorkingDir=/home/vitaly
LocalGitDir=/home/vitaly/.git
LocalGitStorageDir=/home/vitaly/.git
LocalMediaDir=/home/vitaly/.git/lfs/objects
TempDir=/home/vitaly/.git/lfs/tmp
ConcurrentTransfers=3
BatchTransfer=true
git config filter.lfs.smudge = "git-lfs smudge %f"
git config filter.lfs.clean = "git-lfs clean %f"

I am getting the following error:

git-lfs: fatal: Cannot handle files this big (4.3G)
like image 358
Vitaly Zdanevich Avatar asked Dec 12 '15 20:12

Vitaly Zdanevich


1 Answers

This is a 32bit addressing issue on i386, and Git and git-lfs simply cannot address a file larger than 4 GB. The maximum value of a 32-bit unsigned integer is 4,294,967,295, which comes out to about 4 GB.

We can see where this error is thrown inside the Git source code in git-compat-util.h:

744 static inline size_t xsize_t(off_t len)
745 {
746     if (len > (size_t) len)
747         die("Cannot handle files this big");
748     return (size_t)len;
749 }

I don't know enough about how git-lfs works internally to know if this can be worked around.

If working on a 64bit (x86_64) system rather than the 32bit (i386) system you're using is an option, that will fix your problem. Alternatively, you might be able to use git-annex instead of git-lfs with some success, but someone else had a similar issue with git-annex. There are not enough details in the bug report to know if this is still an issue on 32bit systems.

Unfortunately, you're facing a common limitation of 32bit hardware, and you'll run into a number of issues trying to handle files larger than 4 GB on these systems. It's upgrade time!

like image 74
Will Avatar answered Oct 06 '22 05:10

Will