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

Re: git packs

From
LLLuke Lu <git@vicaya.com>
Date
Nov 10, 2007, 06:36 UTC
Message-ID
<DF65F7E4-448A-4726-8B42-642776155A8F@vicaya.com>
In-Reply-To
<FC175E4F-D9BE-42CC-B0BB-561B2EDCD941@mac.com>
On Nov 9, 2007, at 10:00 PM, bob wrote:
Show 43 quoted lines
> When you say toolchain, are you referring to the compiler
> and associated libraries or are you referring to OS programs
> such as ls, md5, cat, etc or both?
>
> The reason that I ask is that I have been playing different
> scenarios using git 1.5.3.5 under MacOSX 10.4.10 mostly
> all day and every time that
>
> A) 	a file approaches or exceeds 2gig on an 'add', it
> 	results in:
> 	
> 	fatal: Out of memory? mmap failed: Cannot allocate memory
>
>
>
> B) 	the repository size less the .git subdirectory approaches
> 	4gig on a 'fetch' it results in:
>
> 	Resolving 3356 deltas...
> 	fatal: serious inflate inconsistency: -3 (unknown compression method)
> 	fatal: index-pack died with error code 128
> 	fatal: Fetch failure: ../rmwHtmlOld
>
> 	Under B, building the initial repository works fine.
>
> (I added a patch the Linus Torvalds gave out when a previous  
> inflate problem
> was being researched.)  Also, I have been looking in the source
> in particular in builtin-add.c builtin-pack-objects.c and  
> associated headers
> and see int and unsigned long being used a lot, but not any  
> unsigned long
> longs.  I have been testing on my laptop which has a 32-bit Intel  
> Core Duo.
> Also, I have run the same tests on a dual quad-core Intel processor
> which is 64 bit, (but not sure that Apple uses the 64 bits in  
> 10.4.10).  I
> get the same results as above.
>
> The zlib is at the latest revision of 1.2.3 and gcc is at 4.0.1
> which from what I can tell supports large files, because 'off_t' is  
> 8 bytes
> which is the size used for a 'stat' file size.

mmap(2), which git uses by default, is subject to vm limits (typically <2GB), regardless of large file support. file `which git` will probably tell you that it's a Mach-O executable i386 instead of x86_64. In order to get 64 bit binaries on Mactel boxes, you'll need the -m64 flag for gcc. I suspect that compiling with NO_MMAP option work as well.

__Luke
Previous: bobNext: Linus Torvalds
Message 4 of 19 in “git packs”
  1. bobNov 10, 2007
  2. Nicolas PitreNov 10, 2007
  3. bobNov 10, 2007
  4. Luke LuNov 10, 2007
  5. Linus TorvaldsNov 10, 2007
  6. David BrownNov 10, 2007
  7. Linus TorvaldsNov 10, 2007
  8. Linus TorvaldsNov 10, 2007
  9. bobNov 10, 2007
  10. Nicolas PitreNov 11, 2007
  11. bobNov 12, 2007
  12. Nicolas PitreNov 12, 2007
  13. bobNov 12, 2007
  14. bobNov 10, 2007
  15. David BrownNov 10, 2007
  16. bobNov 10, 2007
  17. Derek FawcusNov 11, 2007
  18. bobNov 11, 2007
  19. Martin LanghoffNov 12, 2007

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.