Fatal - Out of memory
There are several known “out of memory” errors. This article organizes them.
remote: fatal: inflate: out of memory If you see a message like this during a clone attempt…
$ git clone https://chipcode.qti.qualcomm.com/home/git/company_msm8610-la-1-0_amss_oem.git
Cloning into 'company_msm8610-la-1-0_amss_oem'...
remote: Counting objects: 133358, done.
remote: fatal: inflate: out of memory
fatal: early EOF 10.00 KiB/s
remote: aborting due to possible repository corruption on the remote side.
fatal: index-pack failed
Please report the issue to us as soon as possible, including the Git URL and full transcript in verbose mode.
This is actually a client side memory availability problem, even though the error suggests remote. The above error means we need to repack the repository in a more efficient manner to work with machines that do not have Gigabytes of free memory. Once we repack the repository, clone attempts will be successful. If this is a binary code distro, please use shallow clone (described on Shallow Cloning)
We gave added an updated git config into the script that creates the initial repositories for everyone, so this should proactively fix new all other repos going forward as of 10/15/2013.
error: Out of memory, malloc failed
Receiving objects: 100% (34366/34366), 16.42 GiB | 2.83 MiB/s, done.
Resolving deltas: 100% (5235/5235), done.
Checking connectivity... done.
error: Out of memory, malloc failed (tried to allocate 2684354561 bytes)
error: failed to read object c9e48eada8e1b5292747484f03474e5dd19514f7 at offset 750412336
fatal: packed object c9e48eada8e1b5292747484f03474e5dd19514f7 (stored in .git/objects/pack/pack-77a3fa0da77f1bf59e8abe712155c20d86c3f512.pack) is corrupt
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
The error is indicative of the host computer running out of memory while trying to decompress the repository (checkout). please use shallow clone (described on Shallow Cloning), especially if it is a binary distro.
remote: fatal: Out of memory? mmap failed: Stale NFS file handle
$ time git clone https://chipcode.qti.qualcomm.com/home/git/company_msm8610-la-1-0_amss_oem.git
Cloning into 'company_msm8610-la-1-0_amss_oem'...
remote: Counting objects: 133358, done.
remote: fatal: Out of memory? mmap failed: Stale NFS file handle
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
This error happens when we are removing files you are downloading at the same time. Again, report the issue to us and we will tell you when to attempt your clone again.
fatal: Out of memory? mmap failed: No such file or directory
$ git diff --name-only r10261206.2 r10261205.1 warning: CRLF will be replaced by LF in r10261206.2/LINUX/android/vendor/qcom/pr The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in r10261205.1/LINUX/android/vendor/qcom/pr The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in r10261206.2/modem_proc/core/bsp/efs_imag The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in r10261205.1/modem_proc/core/bsp/efs_imag The file will have its original line endings in your working directory. fatal: Out of memory? mmap failed: No such file or directory The error comes from the large files in your repository. Git is trying to put the entire contents of the file in memory, which makes it fail. Upgrade to the latest Git client first. If the problem remains, you may need to use a non git diff tool, or attempt a git diff on a shallow cloned repository. Some repositories are very large and hold a lot of releases when cloned full instead of shallow.