jemalloc-4.0.0 test suite segfaults on aarch64

Ingvar Hagelund ingvar at
Wed Aug 19 12:46:21 PDT 2015

----- On Aug 19, 2015, at 8:44 PM, Jason Evans <jasone at> wrote: 

> On Aug 19, 2015, at 3:02 AM, Ingvar Hagelund <ingvar at> wrote:
> > I've started wrapping jemalloc-4.0.0 for fedora. aarch64 is now a target
> > arch for fedora. When sent to the arm builders, the unit/bitmap test
> > segfaults. Full log here:

> >

> > Also note the vast amounts of "warning: left shift count is negative".

> This happens with page sizes larger than 8 KiB.
That's the case here, yes. Fedora 22 on aarch64. 

$ uname -a 
Linux arm64 4.0.4-301.fc22.aarch64 #1 SMP Thu May 21 15:21:42 UTC 2015 aarch64 aarch64 aarch64 GNU/Linux 

$ getconf PAGESIZE 

> I can test a patch locally by specifying --with-lg-page=16 during configuration.
> The segfault is hopefully a side effect of the bit shifting issue (I certainly
> get test crashes when specifying --with-lg-page=16).
I have got a qemu aarch64 instance running now, so I would happily test patches. 

I throw in a gdb backtrace for good measure 

[ingvar at arm64 jemalloc-4.0.0]$ gdb test/unit/bitmap 
GNU gdb (GDB) Fedora 7.9-11.fc22 
This GDB was configured as "aarch64-redhat-linux-gnu". 

Reading symbols from test/unit/bitmap...done. 
(gdb) run 
Starting program: /home/ingvar/rpmbuild/BUILD/jemalloc-4.0.0/test/unit/bitmap 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib64/". 
test_bitmap_size: pass 

Program received signal SIGSEGV, Segmentation fault. 
__GI___pthread_mutex_lock (mutex=mutex at entry=0x840) at pthread_mutex_lock.c:67 
67 unsigned int type = PTHREAD_MUTEX_TYPE_ELISION (mutex); 
(gdb) bt 
#0 __GI___pthread_mutex_lock (mutex=mutex at entry=0x840) at pthread_mutex_lock.c:67 
#1 0x000000000042f704 in jet_malloc_mutex_lock (mutex=0x14ae70840) at include/jemalloc/internal/mutex.h:85 
#2 jet_tcache_bin_flush_small (tsd=tsd at entry=0x3ffb7810008, tcache=tcache at entry=0x3ffb7820000, tbin=tbin at entry=0x3ffb7820020, binind=binind at entry=0, rem=1768846639) at src/tcache.c:115 
#3 0x0000000000408574 in jet_tcache_dalloc_small (binind=0, ptr=0x3ffb7a78f00, tcache=0x3ffb7820000, tsd=0x3ffb7810008) at include/jemalloc/internal/tcache.h:376 
#4 jet_arena_dalloc (tcache=0x3ffb7820000, ptr=0x3ffb7a78f00, tsd=0x3ffb7810008) at include/jemalloc/internal/arena.h:1195 
#5 jet_idalloctm (is_metadata=false, tcache=0x3ffb7820000, ptr=0x3ffb7a78f00, tsd=0x3ffb7810008) at include/jemalloc/internal/jemalloc_internal.h:1005 
#6 jet_iqalloc (tcache=0x3ffb7820000, ptr=0x3ffb7a78f00, tsd=0x3ffb7810008) at include/jemalloc/internal/jemalloc_internal.h:1029 
#7 ifree (tcache=0x3ffb7820000, ptr=0x3ffb7a78f00, tsd=0x3ffb7810008) at src/jemalloc.c:1723 
#8 jet_free (ptr=ptr at entry=0x3ffb7a78f00) at src/jemalloc.c:1817 
#9 0x0000000000401a84 in test_bitmap_init () at test/unit/bitmap.c:34 
#10 0x0000000000434a20 in p_test (t=0x401970 <test_bitmap_init>) at test/src/test.c:84 
#11 0x000003ffb7d1f964 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at libc-start.c:289 
#12 0x00000000004016f0 in _start () 
Backtrace stopped: previous frame identical to this frame (corrupt stack?) 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the jemalloc-discuss mailing list