mmap() can't allocate region on OS X
Augie Fackler
durin42 at gmail.com
Wed May 13 14:52:41 CDT 2009
Hey all,
Background for those that missed it on IRC:
On OS X, I'm seeing (in a repo where .hg/store is 70 megabytes, but
that's also a single revision) failures in hg grep after revision
57a41c08feab [1], which is when hg started prereading revlogs for
speed. The failure I'm seeing is:
$ hg grep xyzzy
python(20469) malloc: *** mmap(size=1052672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
abort: out of memory
I've been able to reproduce this with the Adium repository [2] on this
machine, but I have another Mac which can't get this result. For
completeness, a coworker tried it on his Mac as well and couldn't
reproduce the bug. The failing machine is on 10.5.{6,7} (continued to
see the problem post-update), 2 gig of RAM. I rebooted to make sure
that no VM had been used and RAM was largely empty, and after hg grep
had failed the vm subsystem indicated no swap had been used. I don't
see this on my other Mac, which was at 10.5.7 when I tested and has 3
gig of RAM. My coworker's machine is largely identical to the failing
one, 2 gig of RAM. danchr was able to reproduce this on a 10.5.6/
PowerPC machine with 2 gig of RAM, so it's not limited to just Intel
machines.
I tested with both the stock Python and a locally-built 2.6 - it fails
in both on the machine that gets the failure. brodie on IRC also saw
this on his 10.5.7 machine, and pasted a traceback [3], but I'm not
sure how useful that will be.
If there's anything I can do to help diagnose, please let me know. The
machines in question are all running 32-bit versions of Python, either
the stock 2.5 or 3rd-party 2.6. hg verify will run on afflicted
repositories just fine. I can reproduce the problem with no extensions
enabled.
Thanks,
Augie
[1] http://selenic.com/repo/index.cgi/hg/rev/57a41c08feab
[2] http://hg.adium.im/adium/
[3] http://paste.lisp.org/display/80145
More information about the Mercurial-devel
mailing list