The patch solved some of the messages. I'm still getting the following:

==21093== Conditional jump or move depends on uninitialised value(s)
==21093==    at 0x58585E3: arena_run_split (arena.c:442)
==21093==    by 0x5858E3F: arena_run_alloc_helper (arena.c:637)
==21093==    by 0x585B85D: arena_malloc_large (arena.c:657)
==21093==    by 0x5850122: je_calloc (arena.h:883)

Furthermore, I did some more testing and valgrind is also still complaining about je_free() calls (with patch without --enable-munmap OR without the patch with --enable-munmap):

==21093== Invalid read of size 8
==21093==    at 0x5874A31: quarantine (quarantine.c:74)
==21093==    by 0x585148F: je_free (jemalloc_internal.h:911)

==21093== Invalid read of size 8
==21093==    at 0x58744E3: quarantine (quarantine.c:100)
==21093==    by 0x585148F: je_free (jemalloc_internal.h:911)

==16789== Invalid read of size 8
==16789==    at 0x5874691: quarantine (quarantine.c:103)
==16789==    by 0x585148F: je_free (jemalloc_internal.h:911)

==16789== Invalid read of size 8
==16789==    at 0x4C2C40F: memcpy (mc_replace_strmem.c:878)
==16789==    by 0x5874C3B: quarantine (string3.h:52)
==16789==    by 0x585148F: je_free (jemalloc_internal.h:911)

The above error messages are present in the full report I sent you earlier.

best regards,

Daniel Mezzatto

On 12/12/2012 04:17 PM, Jason Evans wrote:
On Dec 12, 2012, at 10:07 AM, Jason Evans <[email protected]> wrote:
On Dec 12, 2012, at 10:01 AM, Daniel Mezzatto Rodrigues <[email protected]> wrote:
Configuring jemalloc with --enable-munmap made valgrind error messages vanish! No more error messages as far as I could test.

Are there any disadvantages of using --enable-munmap? I see that it enables virtual memory deallocation via munmap. It seens that it was enabled by default in previous version of jemalloc. Is that correct?

The disadvantage of using --enable-munmap on Linux is that the kernel's heuristics for finding available virtual memory are quite naive, and they routinely result in virtual memory map fragmentation.  That wouldn't be a big deal, except that the kernel also uses linear VM map searches for some common operations, so performance can suffer badly for large-memory applications.

Will you change this VALGRIND_MAKE_MEM_UNDEFINED() call in chunk_recycle() so that configuring jemalloc with --enable-munmap won't be in future versions?

Yes, I will fix chunk_recycle() and include the fix in the next jemalloc release.  Thank you for your bug report and help in diagnosing the cause.

If you want to be totally sure that the fix is correct, you can apply the following and test without the --enable-munmap option:


Thanks,
Jason

_______________________________________________
jemalloc-discuss mailing list
[email protected]
http://www.canonware.com/mailman/listinfo/jemalloc-discuss

Reply via email to