git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git status --> Out of memory, realloc failed

From
René Scharfe <l.s.r@web.de>
Date
Mar 2, 2017, 20:04 UTC
Message-ID
<6ba86c1a-87a9-f886-273b-7f94c30c4a95@web.de>
In-Reply-To
<cbd281fc-3a4b-b4dc-5dff-145c97cd68d6@cafu.de>
Am 01.03.2017 um 21:12 schrieb Carsten Fuchs:
Show 29 quoted lines
> Hi René,
>
> Am 01.03.2017 um 11:02 schrieb René Scharfe:
>>> I use Git at a web hosting service, where my user account has a memory
>>> limit of 768 MB:
>>>
>>> (uiserver):p7715773:~$ uname -a
>>> Linux infongp-de15 3.14.0-ui16322-uiabi1-infong-amd64 #1 SMP Debian
>>> 3.14.79-2~ui80+4 (2016-11-17) x86_64 GNU/Linux
>>
>> What's the output of "ulimit -a"?
>
> (uiserver):p7715773:~$ ulimit -a
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> scheduling priority             (-e) 1
> file size               (blocks, -f) unlimited
> pending signals                 (-i) 16382
> max locked memory       (kbytes, -l) 64
> max memory size         (kbytes, -m) unlimited
> open files                      (-n) 512
> pipe size            (512 bytes, -p) 8
> POSIX message queues     (bytes, -q) 819200
> real-time priority              (-r) 0
> stack size              (kbytes, -s) 8192
> cpu time               (seconds, -t) 1800
> max user processes              (-u) 42
> virtual memory          (kbytes, -v) 786432
> file locks                      (-x) unlimited

When I use ulimit -v with lower and lower numbers I can provoke mmap failures on bigger pack files, but not the realloc failures that you're seeing. And your packs should be only up to 20MB anyway (you can check that with "ls -l .git/objects/pack/*.pack").

Show 8 quoted lines
>>> The repository is tracking about 19000 files which together take 260 MB.
>>> The git server version is 2.7.4.1.g5468f9e (Bitbucket)
>>
>> Is your repository publicly accessible?
>
> Unfortunately, no. There are no big secrets in there, but just a couple
> of database details so that I cannot make it universally available. I
> can gladly give you access though. (E.g. by adding your public SSH key?)

I'd rather not look at semi-confidential data, and you probably shouldn't hand it to a stranger on the internet anyway. ;)

So a shot in the dark: Do you have a lot of untracked files? You could check by cloning your repository locally (which copies only tracked contents). Does "git status" work on the clone?

Another one, darker yet: Does "git config core.preloadIndex 0" help?
René
Previous: Carsten FuchsNext: Carsten Fuchs
Message 6 of 7 in “git status --> Out of memory, realloc failed”
  1. Carsten FuchsFeb 25, 2017
  2. René ScharfeMar 1, 2017
  3. Carsten FuchsMar 1, 2017
  4. Duy NguyenMar 2, 2017
  5. Carsten FuchsMar 3, 2017
  6. René ScharfeMar 2, 2017
  7. Carsten FuchsMar 3, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.