git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: worley@alum.mit.edu (Dale R. Worley)
To: git@vger.kernel.org
Subject: "git fsck" fails on malloc of 80 G
Date: Mon, 16 Dec 2013 11:05:32 -0500	[thread overview]
Message-ID: <201312161605.rBGG5Wm5027739@hobgoblin.ariadne.com> (raw)

I have a large repository (17 GiB of disk used), although no single
file in the repository is over 1 GiB.  (I have pack.packSizeLimit set
to "1g".)  I don't know how many files are in the repository, but it
shouldn't exceed several tens of commits each containing several tens
of thousands of files.

Due to Git crashing while performing an operation, I want to verify
that the repository is consistent.  However, when I run "git fsck" it
fails, apparently because it is trying to allocate 80 G of memory.  (I
can still do adds, commits, etc.)

# git fsck
Checking object directories: 100% (256/256), done.
fatal: Out of memory, malloc failed (tried to allocate 80530636801 bytes)
#

I don't know if this is due to an outright bug or not.  But it seems
to me that "git fsck" should not need to allocate any more memory than
the size (1 GiB) of a single pack file.  And given its purpose, "git
fsck" should be one of the *most* robust Git tools!

Dale

             reply	other threads:[~2013-12-16 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 16:05 Dale R. Worley [this message]
2013-12-16 19:15 ` "git fsck" fails on malloc of 80 G Jeff King
2013-12-18  3:06   ` Dale R. Worley
2013-12-18 21:58     ` Jeff King
2013-12-18 21:08   ` Dale R. Worley
2013-12-18 22:09     ` 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=201312161605.rBGG5Wm5027739@hobgoblin.ariadne.com \
    --to=worley@alum.mit.edu \
    --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).