jemalloc coring in je_bitmap_set

Jason Evans jasone at
Tue Aug 18 08:59:34 PDT 2015

On Aug 18, 2015, at 8:49 AM, Paul Marquess <Paul.Marquess at> wrote:
>> From: Jason Evans [mailto:jasone at] 
>> On Aug 18, 2015, at 5:14 AM, Paul Marquess <Paul.Marquess at> wrote:
>>> I see a reference to a fix for arena_tcache_fill_small and corruption in the 4.0 ChangeLog. Any chance it could be the root cause for this issue?
>> It's possible, but the failure mode for that bug depends on failing to map memory (i.e. extreme memory pressure).
> do you mean a failure in the call to mmap? Assume that isn't necessarily catastrophic (otherwise I assume you would assert straight away).

Yes, mmap() and sbrk() failure.  It should simply result in malloc() returning NULL, but the arena_tcache_fill_small bug you mentioned caused corruption that would later cause crashes.

> Is there anything in jemalloc (or other tools) I can do to root cause why that is happening?

Valgrind is great.  There's ASAN (address sanitizer) as well.  jemalloc with --enable-debug and MALLOC_CONF=tcache:false can catch quite a few issues as well.


More information about the jemalloc-discuss mailing list