git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: David Abrahams <dave@boostpro.com>
Cc: git@vger.kernel.org
Subject: Re: "malloc failed"
Date: Wed, 28 Jan 2009 00:02:25 -0500	[thread overview]
Message-ID: <20090128050225.GA18546@coredump.intra.peff.net> (raw)
In-Reply-To: <878wow7pth.fsf@mcbain.luannocracy.com>

On Tue, Jan 27, 2009 at 10:04:42AM -0500, David Abrahams wrote:

> I've been abusing Git for a purpose it wasn't intended to serve:
> archiving a large number of files with many duplicates and
> near-duplicates.  Every once in a while, when trying to do something
> really big, it tells me "malloc failed" and bails out (I think it's
> during "git add" but because of the way I issued the commands I can't
> tell: it could have been a commit or a gc).  This is on a 64-bit linux
> machine with 8G of ram and plenty of swap space, so I'm surprised.
> 
> Git is doing an amazing job at archiving and compressing all this stuff
> I'm putting in it, but I have to do it a wee bit at a time or it craps
> out.  Bug?

How big is the repository? How big are the biggest files? I have a
3.5G repo with files ranging from a few bytes to about 180M. I've never
run into malloc problems or gone into swap on my measly 1G box.
How does your dataset compare?

As others have mentioned, git wasn't really designed specifically for
those sorts of numbers, but in the interests of performance, I find git
is usually pretty careful about not keeping too much useless stuff in
memory at one time.  And the fact that you can perform the same
operation a little bit at a time and achieve success implies to me there
might be a leak or some silly behavior that can be fixed.

It would help a lot if we knew the operation that was causing the
problem. Can you try to isolate the failed command next time it happens?

-Peff

  parent reply	other threads:[~2009-01-28  5:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 15:04 "malloc failed" David Abrahams
2009-01-27 15:29 ` Shawn O. Pearce
2009-01-27 15:32   ` David Abrahams
2009-01-27 18:02 ` Johannes Schindelin
2009-01-28  5:02 ` Jeff King [this message]
2009-01-28 21:53   ` David Abrahams
2009-01-29  0:06     ` David Abrahams
2009-01-29  5:20       ` Jeff King
2009-01-29  5:56         ` Jeff King
2009-01-29  7:53           ` Junio C Hamano
2009-01-29 13:10           ` David Abrahams
2009-01-29 13:41             ` Andreas Ericsson
2009-01-30  4:49             ` Jeff King
2009-01-28 22:16   ` Pau Garcia i Quiles
2009-01-29  5:14     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090128050225.GA18546@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=dave@boostpro.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).