jemalloc 3.5.0 regressions on i586
Jason Evans
jasone at canonware.com
Tue Jan 28 18:13:11 PST 2014
On Jan 28, 2014, at 12:57 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
> With jemalloc 3.5.0 we have a testsuite regression on openSUSE 13.1/i586 with gcc 4.8.1,
> configured with ./configure --enable-cc-silence
>
> make check fails:
>
> test_stats_chunks:test/unit/stats.c:41: Failed assertion: (jet_mallctl("stats.chunks.total", &total, &sz, ((void *)0), 0)) == (expected) --> 22 != 0: test_stats_chunks
>
> test_stats_arenas_bins:test/unit/stats.c:291: Failed assertion: (jet_mallctl("stats.arenas.0.bins.0.curruns", &curruns, &sz, ((void *)0), 0)) == (expected) --> 22 != 0: test_stats_arenas_bins
>
> test_stats_arenas_lruns:test/unit/stats.c:343: Failed assertion: (jet_mallctl("stats.arenas.0.lruns.0.curruns", &curruns, &sz, ((void *)0), 0)) == (expected) --> 22 != 0: test_stats_arenas_lruns
The stats failures are all due to mallctl argument size mismatches, fixed here:
https://github.com/jemalloc/jemalloc/commit/2b51a3e9e9bfebf081d25dfa92f3cd89e4a8ed73
> test_oom_errors:test/integration/aligned_alloc.c:59: Failed assertion: (p != ((void *)0) || je_get_errno() != 12) == (false) --> true != false: test_oom_errors
>
> test_alignment_errors:test/integration/mallocx.c:53: Failed assertion: (p) == (NULL) --> 0x40000000 != 0x0: test_alignment_errors
>
> test_oom_errors:test/integration/posix_memalign.c:53: Failed assertion: (posix_memalign(&p, alignment, size)) != (0) --> 0 == 0: test_oom_errors
>
> 64bit builds are fine.
Wow, the machine is actually satisfying an mmap() request of size 0xd0000000 (3.5 GiB) in order for this to be happening. The tests are flawed, and they "pass" on 64-bit systems because of the virtual memory hole in the middle of the 64-bit address space. Fixed here:
https://github.com/jemalloc/jemalloc/commit/a184d3fcdecfaaf694029fb375d023882aea444e
In the case of mallocx(), this is technically undefined territory, so just removed that test, but for aligned_alloc() and posix_memalign(), I increased the request size enough to guarantee failure.
In summary, these failures are all due to test bugs, rather than bugs in the library itself.
Thanks,
Jason
More information about the jemalloc-discuss
mailing list