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

git gc - out of memory

From
Simon Strandgaard <neoneye@gmail.com>
Date
Nov 14, 2009, 19:26 UTC
Message-ID
<df1390cc0911141126w1a0c5691p83885053a73f829@mail.gmail.com>

My bare repository is on an OpenBSD machine. I was unaware of the importance of git gc until today after investigating a problem with "git pull". So there hasn't been run git gc on the repository ever.

The biggest file in the repository is a 45 mb file. The repository size is near 2 gb.

What can I do?

$ git gc Counting objects: 5934, done. warning: suboptimal pack - out of memory fatal: Out of memory, malloc failed8) error: failed to run repack $ git --version git version 1.6.5.2 $ uname -a OpenBSD amiga.opcoders.com 4.3 GENERIC#698 i386 $ ulimit -a time(cpu-seconds) unlimited file(blocks) unlimited coredump(blocks) unlimited data(kbytes) 524288 stack(kbytes) 4096 lockedmem(kbytes) 662576 memory(kbytes) 1985524 nofiles(descriptors) 128 processes 64 $ du -ks myrepository.git 1859538 myrepository.git $

Below is the "git pull" problem I'm having. I think its caused by the former problem. When pulling it dies because of malloc failure.

prompt> git pull
remote: Counting objects: 280, done.
remote: fatal: Out of memory, malloc failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption
on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
prompt> git --version
git version 1.6.5.2
prompt> uname -a
Darwin pidgin.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15
16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386
prompt> sw_vers
ProductName:    Mac OS X
ProductVersion: 10.5.8
BuildVersion:   9L31a
prompt>

Kind regards Simon Strandgaard - http://gdtoolbox.com/

Next: Alejandro Riveira
Message 1 of 4 in “git gc - out of memory”
  1. Simon StrandgaardNov 14, 2009
  2. Alejandro RiveiraNov 15, 2009
  3. Simon StrandgaardNov 15, 2009
  4. Alejandro RiveiraNov 16, 2009

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.