* git-svn -- out of memory
@ 2009-02-14 10:40 Alfred M. Szmidt
2009-02-16 0:38 ` Eric Wong
0 siblings, 1 reply; 10+ messages in thread
From: Alfred M. Szmidt @ 2009-02-14 10:40 UTC (permalink / raw)
To: git
Hi,
when doing a `git svn clone' on a subversion repository that contains
a large file (>1GiB), `git svn' dies with the following:
ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
[...]
fatal: Out of memory? mmap failed: Cannot allocate memory
hash-object -w --stdin-paths: command returned error: 128
error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
Doing a `git repack' doesn't help either. Anyone got a clue how to
either solve, or work around this?
git version 1.6.1.3
Cheers.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-14 10:40 git-svn -- out of memory Alfred M. Szmidt
@ 2009-02-16 0:38 ` Eric Wong
0 siblings, 0 replies; 10+ messages in thread
From: Eric Wong @ 2009-02-16 0:38 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: git
"Alfred M. Szmidt" <ams@gnu.org> wrote:
> Hi,
>
> when doing a `git svn clone' on a subversion repository that contains
> a large file (>1GiB), `git svn' dies with the following:
>
> ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
> [...]
> fatal: Out of memory? mmap failed: Cannot allocate memory
> hash-object -w --stdin-paths: command returned error: 128
>
> error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
> error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
>
> Doing a `git repack' doesn't help either. Anyone got a clue how to
> either solve, or work around this?
>
> git version 1.6.1.3
Hi Alfred,
Core git requires objects to be able to fit into (virtual) memory.
Adding more swap space should solve the problem for you, but this is not
only a git-svn problem.
Fwiw, git-svn itself has always had a pretty strict "no slurping"
policy.
--
Eric Wong
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
@ 2009-02-16 9:37 Alfred M. Szmidt
2009-02-16 10:05 ` Junio C Hamano
0 siblings, 1 reply; 10+ messages in thread
From: Alfred M. Szmidt @ 2009-02-16 9:37 UTC (permalink / raw)
To: Eric Wong; +Cc: git
> when doing a `git svn clone' on a subversion repository that contains
> a large file (>1GiB), `git svn' dies with the following:
>
> ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
> [...]
> fatal: Out of memory? mmap failed: Cannot allocate memory
> hash-object -w --stdin-paths: command returned error: 128
>
> error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
> error closing pipe: Bad file descriptor at /usr/local/bin/libexec/git-core//git-svn line 0
>
> Doing a `git repack' doesn't help either. Anyone got a clue how to
> either solve, or work around this?
>
> git version 1.6.1.3
Hi Alfred,
Core git requires objects to be able to fit into (virtual) memory.
Adding more swap space should solve the problem for you, but this is not
only a git-svn problem.
In this case, the machine has 32G RAM, including ~20G swap. So I do
not think that this is the case, it could be I suppose...
Cheers.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-16 9:37 Alfred M. Szmidt
@ 2009-02-16 10:05 ` Junio C Hamano
2009-02-16 13:45 ` Jeff King
0 siblings, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2009-02-16 10:05 UTC (permalink / raw)
To: ams; +Cc: Eric Wong, git, Jeff King
"Alfred M\. Szmidt" <ams@gnu.org> writes:
> > when doing a `git svn clone' on a subversion repository that contains
> > a large file (>1GiB), `git svn' dies with the following:
> >
> > ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
> > [...]
> > fatal: Out of memory? mmap failed: Cannot allocate memory
> > hash-object -w --stdin-paths: command returned error: 128
Ding...
> > git version 1.6.1.3
>
> Core git requires objects to be able to fit into (virtual) memory.
> Adding more swap space should solve the problem for you, but this is not
> only a git-svn problem.
>
> In this case, the machine has 32G RAM, including ~20G swap. So I do
> not think that this is the case, it could be I suppose...
The hash-object error message sounds like the issue that was fixed with
915308b (avoid 31-bit truncation in write_loose_object, 2009-01-29). Does
v1.6.2-rc1 help?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-16 10:05 ` Junio C Hamano
@ 2009-02-16 13:45 ` Jeff King
0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2009-02-16 13:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: ams, Eric Wong, git
On Mon, Feb 16, 2009 at 02:05:54AM -0800, Junio C Hamano wrote:
> "Alfred M\. Szmidt" <ams@gnu.org> writes:
>
> > > when doing a `git svn clone' on a subversion repository that contains
> > > a large file (>1GiB), `git svn' dies with the following:
> > >
> > > ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
> > > [...]
> > > fatal: Out of memory? mmap failed: Cannot allocate memory
> > > hash-object -w --stdin-paths: command returned error: 128
>
> Ding...
> [...]
> The hash-object error message sounds like the issue that was fixed with
> 915308b (avoid 31-bit truncation in write_loose_object, 2009-01-29). Does
> v1.6.2-rc1 help?
Hmm. The original problem I had with the 32-bit wrapping actually caused
malloc to fail, whereas this is an mmap failure. So it might not be the
same thing (but certainly testing with v1.6.2-rc1 will be a good data
point).
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
@ 2009-02-16 14:23 Alfred M. Szmidt
2009-02-16 15:37 ` Jeff King
0 siblings, 1 reply; 10+ messages in thread
From: Alfred M. Szmidt @ 2009-02-16 14:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: normalperson, git, peff
> > when doing a `git svn clone' on a subversion repository that contains
> > a large file (>1GiB), `git svn' dies with the following:
> >
> > ams@trillian:~$ git svn clone REPO -T trunk -b branches -t tags
> > [...]
> > fatal: Out of memory? mmap failed: Cannot allocate memory
> > hash-object -w --stdin-paths: command returned error: 128
Ding...
> > git version 1.6.1.3
>
> Core git requires objects to be able to fit into (virtual) memory.
> Adding more swap space should solve the problem for you, but this is not
> only a git-svn problem.
>
> In this case, the machine has 32G RAM, including ~20G swap. So I do
> not think that this is the case, it could be I suppose...
The hash-object error message sounds like the issue that was fixed with
915308b (avoid 31-bit truncation in write_loose_object, 2009-01-29). Does
v1.6.2-rc1 help?
ams@trillian:~/# git --version
git version 1.6.2.rc1
ams@trillian:~/# git svn clone REPO -T trunk -b branches -t tags
[...]
fatal: Out of memory? mmap failed: Cannot allocate memory
hash-object -w --stdin-paths: command returned error: 128
Nope, behaves the same way.
I'll try adding more swap and see what happens...
Thanks for the help.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
@ 2009-02-16 14:52 Alfred M. Szmidt
2009-02-16 14:57 ` Sverre Rabbelier
2009-02-16 15:39 ` Jeff King
0 siblings, 2 replies; 10+ messages in thread
From: Alfred M. Szmidt @ 2009-02-16 14:52 UTC (permalink / raw)
To: Jeff King; +Cc: gitster, normalperson, git
Added an extra 20G of swap, still the same error.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-16 14:52 Alfred M. Szmidt
@ 2009-02-16 14:57 ` Sverre Rabbelier
2009-02-16 15:39 ` Jeff King
1 sibling, 0 replies; 10+ messages in thread
From: Sverre Rabbelier @ 2009-02-16 14:57 UTC (permalink / raw)
To: ams; +Cc: Jeff King, gitster, normalperson, git
On Mon, Feb 16, 2009 at 15:52, Alfred M. Szmidt <ams@gnu.org> wrote:
> Added an extra 20G of swap, still the same error.
Silly question, did you have a look at how much memory the git-svn
process is using? If so, does it have anything interesting to tell?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-16 14:23 Alfred M. Szmidt
@ 2009-02-16 15:37 ` Jeff King
0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2009-02-16 15:37 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Junio C Hamano, normalperson, git
On Mon, Feb 16, 2009 at 03:23:40PM +0100, Alfred M. Szmidt wrote:
> ams@trillian:~/# git --version
> git version 1.6.2.rc1
> ams@trillian:~/# git svn clone REPO -T trunk -b branches -t tags
> [...]
> fatal: Out of memory? mmap failed: Cannot allocate memory
> hash-object -w --stdin-paths: command returned error: 128
>
> Nope, behaves the same way.
Hmm. It would help to know what object it is failing on. I assume you
repo is too large to be easily shared? If not, can you try instrumenting
hash-object with the patch below and seeing which file it is barfing on?
I'd be curious to see the size of the file (in case it is >2G and we
have another signed integer problem) and its position in the list (in
case we are leaking memory and you are hitting a system limit).
---
diff --git a/hash-object.c b/hash-object.c
index 37e6677..20371d0 100644
--- a/hash-object.c
+++ b/hash-object.c
@@ -44,6 +44,7 @@ static void hash_stdin_paths(const char *type, int write_objects)
die("line is badly quoted");
strbuf_swap(&buf, &nbuf);
}
+ fprintf(stderr, "debug: hashing %s\n", buf.buf);
hash_object(buf.buf, type, write_objects, buf.buf);
}
strbuf_release(&buf);
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: git-svn -- out of memory
2009-02-16 14:52 Alfred M. Szmidt
2009-02-16 14:57 ` Sverre Rabbelier
@ 2009-02-16 15:39 ` Jeff King
1 sibling, 0 replies; 10+ messages in thread
From: Jeff King @ 2009-02-16 15:39 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: gitster, normalperson, git
On Mon, Feb 16, 2009 at 03:52:17PM +0100, Alfred M. Szmidt wrote:
> Added an extra 20G of swap, still the same error.
You might have to also tweak your ulimit to be able to use that much
memory in a single process. Is this a 64-bit machine?
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-02-16 15:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-14 10:40 git-svn -- out of memory Alfred M. Szmidt
2009-02-16 0:38 ` Eric Wong
-- strict thread matches above, loose matches on Subject: below --
2009-02-16 9:37 Alfred M. Szmidt
2009-02-16 10:05 ` Junio C Hamano
2009-02-16 13:45 ` Jeff King
2009-02-16 14:23 Alfred M. Szmidt
2009-02-16 15:37 ` Jeff King
2009-02-16 14:52 Alfred M. Szmidt
2009-02-16 14:57 ` Sverre Rabbelier
2009-02-16 15:39 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).