git/list[1] front-page[2] threads[3] people[4] search[5] about
 

"git fsck" fails on malloc of 80 G

From
Dale R. Worley <worley@alum.mit.edu>
Date
Dec 16, 2013, 16:05 UTC
Message-ID
<201312161605.rBGG5Wm5027739@hobgoblin.ariadne.com>

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
Next: Jeff King
Message 1 of 6 in “"git fsck" fails on malloc of 80 G”
  1. Dale R. WorleyDec 16, 2013
  2. Jeff KingDec 16, 2013
  3. Dale R. WorleyDec 18, 2013
  4. Jeff KingDec 18, 2013
  5. Dale R. WorleyDec 18, 2013
  6. Jeff KingDec 18, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.