Last call for 3.0.0

Mike Hommey mh+jemalloc at glandium.org
Wed May 9 01:38:27 PDT 2012


On Mon, May 07, 2012 at 03:06:51PM +0200, Mike Hommey wrote:
> On Thu, May 03, 2012 at 10:39:15AM -0700, Jason Evans wrote:
> > On May 3, 2012, at 10:24 AM, Mike Hommey wrote:
> > > On Wed, May 02, 2012 at 04:45:42PM -0700, Jason Evans wrote:
> > >> On May 2, 2012, at 7:51 AM, Mike Hommey wrote:
> > >>> I have to write 2 patches for MSVC-related issues that I'll send
> > >>> later today.
> > >> 
> > >> I just committed all of your patches; thanks.
> > >> 
> > >>> I also get concerning (kind of) random (but not entirely so)
> > >>> crashes in Firefox on Windows when using current jemalloc-dev. I
> > >>> haven't narrowed down the problem yet, and probably won't until
> > >>> tomorrow. It might be better to hold off a release until things
> > >>> are cleared.
> > >> 
> > >> Some of my tests on Linux are crashing too; memset() within
> > >> huge_ralloc() is causing a segfault, but I don't know whether the
> > >> source or the destination is the problem, nor whether the bug is in
> > >> jemalloc or the application (betting on jemalloc though).  Until
> > >> that's resolved I won't be cutting a release.  Please let me know
> > >> if you are able to further characterize the crashes you're seeing;
> > >> they might be related to what I'm seeing.
> > > 
> > > It's rather strange that I get my crashes on Windows only.
> > > Unfortunately, I can't reproduce locally, so debugging them will
> > > have to wait for access to one of our test machines. Chances are
> > > you'll have a patch for your issues before that, so I'll be able to
> > > test if that fixes my issues.
> > 
> > I determined last night that the problem I'm hitting is due to a bad
> > interaction between Linux kernel vma fragmentation (adjacent VM areas
> > aren't being coalesced) and mremap(2).  This problem appears to be
> > peculiar to Linux, so I doubt it's related to what you're seeing.
> > Anyway, the fix/workaround may end up being rather involved, so I'm
> > not optimistic about getting 3.0.0 released before next week.
> 
> So far, I haven't even been able to reproduce the issue on a machine I
> have a shell on, which would allow better debugging. I tried enabling
> debug on jemalloc in my firefox builds, and all that managed to produce
> is trigger an assertion in arena.c:
>  170         /* Freeing an unallocated pointer can cause assertion failure. */
>  171         assert(bitmap_get(bitmap, &bin_info->bitmap_info, regind));
> 
> ... the interesting part being that I'm still seeing the same crash as
> the one I was originally getting, and *not* the assertion above when
> running through our automated tests.

I've now been able to reproduce the crashes, and I think I found what
goes wrong: lack of contiguous virtual memory to allocate chunks. Now,
I need to see why this happens (that is, is jemalloc failing to
deallocate some virtual memory or something else is happening?)

Mike



More information about the jemalloc-discuss mailing list