Re: Public repro case! Re: [PATCH/RFC] Allow writing loose objects that are corrupted in a pack file
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 8, 2009, 00:48 UTC
- Message-ID
- <alpine.LFD.2.00.0901071644330.3283@localhost.localdomain>
- In-Reply-To
- <1231374514.8870.621.camel@starfruit>
On Wed, 7 Jan 2009, R. Tyler Ballance wrote:
Show 10 quoted lines
> > My most esteemed colleague (Ken aka kb) who pointed out the memory issue > was on the right path (I think), and I have a reproduction case you can > try with your very own Linux kernel tree! > > WOO! > > I set ulimit -v really low (150M), and the operations I made got an > mmap(2) fatal error, but there is a sweet spot that I found, see the > transcript below.
This is indeed the packfile mapping. The sweet spot you found depends on how big the biggest two pack-files are, I do believe.
And if you do that
[core] packedgitwindowsize = 64M
I think you'll find that it works. Of course, with a _really_ low ulimit, you'd need to make it even smaller, but at some point you start hitting other problems than the pack-file limits, ie just the simple fact that git wants and expects you to have a certain amount of memory available ;)
Can you cnfirm that your "reproducible" case starts working with that addition to your ~/.gitconfig? If so, the solution is pretty simple: we should just lower the default pack windowsize.
Linus