Re: [git-users] Out of memory, malloc failied (tried to allocate 2306150400 bytes )

2013-10-10 Thread Konstantin Khomoutov
On Thu, 10 Oct 2013 03:57:11 -0700 (PDT)
praveenm mulimani praveen.mulim...@gmail.com wrote:

 We are using windows 7 to download the git source through repo
 command. We are getting the below error (although we have 20 GB free
 space).
 
 Fatal: Out of memory, malloc failied (tried to allocate 2306150400
 bytes )
 Git version: 1.8.3.msysgit.0
 
 Git configuration details:
 
 pack.packsizelimit=2g
 
 pack.threads=1
 
 pack.windowmemory=256m
 
 Please help us to resolve the error. Thanks in advance.

malloc() deals with memory, not disk space.
Here it tries to allocate 2.15GiB of memory.

Git for Windows is a 32-bit application (unless you managed to somehow
build your own version using a 64-bit compiler), and Windows sets a 2GiB
cap on the amount of virtual memory each 32-bit process might use [1],
and this space includes the process' own text segment and all the
dynamically linked libraries which means the available memory space is
even less that 2GiB.
For some reason Git tried to allocate more than this amount.

So...

1. The amount of free *disk* space you have has nothing to do with
   this error -- it's about allocating memory.

2. I'd say the pack.packSizeLimit should not affect the packing
   behaviour -- at least that's what I gather from the manual page.

3. pack.windowMemory *should* affect the packing behaviour.

4. From (2) and (3), it follows that the error has nothing to do with
   packing the objects in the Git database, and so tweaking pack.*
   options on the *client side* supposedly has nothing to do with the
   problem (but might have sense for the server -- I don't know for
   sure).

   So the next question: is this error local or remote?
   Can you copy and paste the printout of the *whole* cloning session?
   This could allow us to discern the side this error happens at.
   Preferably also have GIT_TRACE=1 set in the environment before
   running the clone command -- the printout will be more detailed.

   We need a los more details, that is.

1. http://msdn.microsoft.com/en-us/library/windows/desktop/aa366912

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] Out of memory, malloc failied (tried to allocate 2306150400 bytes )

2013-10-10 Thread Dale R. Worley
 From: Konstantin Khomoutov flatw...@users.sourceforge.net

  pack.packsizelimit=2g
  pack.threads=1
  pack.windowmemory=256m

 2. I'd say the pack.packSizeLimit should not affect the packing
behaviour -- at least that's what I gather from the manual page.

The git-config manual page says:

   pack.packSizeLimit
   [...]  The default is unlimited.

So it seems to me that it is unlikely that pack.packsizeLimit is
affecting memory usage.

On the other hand, the only repository I have that has had memory
problems being repacked is configured:

[pack]
windowMemory = 500m

Is it possible that pack.packsizelimit=2g is causing the Git code to
process in a different manner, one in which Git allocates 2G of
memory?

It would be simple to test whether removing that parameter fixes the
symptom.

When I execute the clone (on Fedora Linux), I see no indication of
memory usage that is this large.

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] Out of memory, malloc failied (tried to allocate 2306150400 bytes )

2013-10-10 Thread Konstantin Khomoutov
On Thu, 10 Oct 2013 11:19:27 -0400
wor...@alum.mit.edu (Dale R. Worley) wrote:

   pack.packsizelimit=2g
   pack.threads=1
   pack.windowmemory=256m
 
  2. I'd say the pack.packSizeLimit should not affect the packing
 behaviour -- at least that's what I gather from the manual page.
 
 The git-config manual page says:
 
pack.packSizeLimit
[...]  The default is unlimited.
 
 So it seems to me that it is unlikely that pack.packsizeLimit is
 affecting memory usage.

I were referring to another bit of this block: The maximum size of a
pack. This setting only affects packing to a file when repacking.
In my eyes, it speaks about the size of a pack file.

 On the other hand, the only repository I have that has had memory
 problems being repacked is configured:
 
   [pack]
   windowMemory = 500m
 
 Is it possible that pack.packsizelimit=2g is causing the Git code to
 process in a different manner, one in which Git allocates 2G of
 memory?
 
 It would be simple to test whether removing that parameter fixes the
 symptom.

But if the default limit is no limit, by extension, attempting to clone
with this setting missing should result in malloc()'ing an even larger
amount of memory. ;-)
Well, yeah, we're plainly guessing so yes, of course cloning with that
parameter removed is worth a try.

But I suspect that the OP did a creative citation and the error is in
fact generated on the sending side.  Just a hunch, I'm not sure.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.