* git gc - out of memory
@ 2009-11-14 19:26 Simon Strandgaard
2009-11-15 14:44 ` Alejandro Riveira
0 siblings, 1 reply; 4+ messages in thread
From: Simon Strandgaard @ 2009-11-14 19:26 UTC (permalink / raw)
To: git
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git gc - out of memory
2009-11-14 19:26 git gc - out of memory Simon Strandgaard
@ 2009-11-15 14:44 ` Alejandro Riveira
2009-11-15 18:33 ` Simon Strandgaard
0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Riveira @ 2009-11-15 14:44 UTC (permalink / raw)
To: git
El Sat, 14 Nov 2009 20:26:00 +0100, Simon Strandgaard escribió:
> 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?
run « git repack -adf --window=memory » on the repo where memory is
escaled apropiately for your machine ?
See « git help repack »
Regards;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git gc - out of memory
2009-11-15 14:44 ` Alejandro Riveira
@ 2009-11-15 18:33 ` Simon Strandgaard
2009-11-16 23:10 ` Alejandro Riveira
0 siblings, 1 reply; 4+ messages in thread
From: Simon Strandgaard @ 2009-11-15 18:33 UTC (permalink / raw)
To: git
On Sun, Nov 15, 2009 at 3:44 PM, Alejandro Riveira <ariveira@gmail.com> wrote:
> El Sat, 14 Nov 2009 20:26:00 +0100, Simon Strandgaard escribió:
[snip]
>> What can I do?
>
> run « git repack -adf --window=memory » on the repo where memory is
> escaled apropiately for your machine ?
Thank you Alejandro, it now works!
I think the default is 10, so I tried with window=5 and
it completed a full repack.
$ git repack -adf --window=5
Counting objects: 5934, done.
Compressing objects: 100% (5711/5711), done.
Writing objects: 100% (5934/5934), done.
Total 5934 (delta 3733), reused 0 (delta 0)
Removing duplicate objects: 100% (256/256), done.
$ git gc
Counting objects: 5934, done.
Compressing objects: 100% (1978/1978), done.
Writing objects: 100% (5934/5934), done.
Total 5934 (delta 3733), reused 5934 (delta 3733)
$
Now that it works..
Should I report the original issue as a bug somewhere?
e.g. malloc failed sounds like a bug.
Kind regards
Simon Strandgaard - http://gdtoolbox.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git gc - out of memory
2009-11-15 18:33 ` Simon Strandgaard
@ 2009-11-16 23:10 ` Alejandro Riveira
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Riveira @ 2009-11-16 23:10 UTC (permalink / raw)
To: git
El Sun, 15 Nov 2009 19:33:27 +0100, Simon Strandgaard escribió:
>>
>> run « git repack -adf --window=memory » on the repo where memory is
>> escaled apropiately for your machine ?
>
> Thank you Alejandro, it now works!
ell glad it does becouse i mad a typo ...
>
> I think the default is 10, so I tried with window=5 and it completed a
> full repack.
I was trying to make you use --window-memory=[memory] not --window= ;P
>
>
> Now that it works..
> Should I report the original issue as a bug somewhere? e.g. malloc
> failed sounds like a bug.
This is the right place. Just wait for someone more knowledgeable than
me ...
>
>
>
> Kind regards
> Simon Strandgaard - http://gdtoolbox.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-16 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-14 19:26 git gc - out of memory Simon Strandgaard
2009-11-15 14:44 ` Alejandro Riveira
2009-11-15 18:33 ` Simon Strandgaard
2009-11-16 23:10 ` Alejandro Riveira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.