<div dir="ltr"><div>Hi, <br><br>I am facing a segfault when using Jemalloc, it happens with Jemalloc 3.x and 4.0.4. If I use the default system memory allocator (Linux) there is no issues (valgrind cannot find any corruption).<br><br></div>Would you please advice any step to determinate if the problem it's on my code or on jemalloc it self ?<br><div><div><br>---<br><jemalloc>: /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:575: Failed assertion: "pageind >= map_bias"<br><br>Program received signal SIGABRT, Aborted.<br>[Switching to Thread 0x7ffff51ff700 (LWP 4613)]<br>0x00007ffff7622267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>55    ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.<br>(gdb) bt<br>#0  0x00007ffff7622267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>#1  0x00007ffff7623eca in __GI_abort () at abort.c:89<br>#2  0x000000000042826e in je_arena_bitselm_get (chunk=<optimized out>, pageind=<optimized out>)<br>    at /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:576<br>#3  0x000000000042e1e0 in je_arena_mapbitsp_get (pageind=0, chunk=0x7fffdc000000) at /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:642<br>#4  je_arena_mapbits_get (pageind=0, chunk=0x7fffdc000000) at /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:656<br>#5  je_arena_mapbits_allocated_get (pageind=0, chunk=0x7fffdc000000) at /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:766<br>#6  je_arena_salloc (ptr=ptr@entry=0x7fffdc000910, demote=demote@entry=false) at /home/edsiper/coding/monkey/deps/jemalloc/include/jemalloc/internal/arena.h:1217<br>#7  0x00000000004238fb in je_isalloc (demote=false, ptr=0x7fffdc000910) at include/jemalloc/internal/jemalloc_internal.h:880<br>#8  ifree (tcache=0x7ffff704c000, ptr=0x7fffdc000910, tsd=0x7ffff51ff650) at /home/edsiper/coding/monkey/deps/jemalloc/src/jemalloc.c:1740<br>#9  je_free (ptr=0x7fffdc000910) at /home/edsiper/coding/monkey/deps/jemalloc/src/jemalloc.c:1839<br>#10 0x0000000000419537 in mk_mem_free (ptr=0x7fffdc000910) at /home/edsiper/coding/monkey/mk_core/include/mk_core/mk_memory.h:96<br>#11 0x000000000041991c in mk_iov_free_marked (mk_io=0x7ffff447f000) at /home/edsiper/coding/monkey/mk_core/mk_iov.c:143<br>#12 0x00000000004198c7 in mk_iov_free (mk_io=0x7ffff447f000) at /home/edsiper/coding/monkey/mk_core/mk_iov.c:126<br>#13 0x00007ffff6dfcc1a in fcgi_exit (handler=0x7ffff446a1c0) at /home/edsiper/coding/monkey/plugins/fastcgi/fcgi_handler.c:405<br>#14 0x00007ffff6dfd09b in cb_fastcgi_on_read (data=0x7ffff446a1c0) at /home/edsiper/coding/monkey/plugins/fastcgi/fcgi_handler.c:521<br>#15 0x0000000000412598 in mk_server_worker_loop () at /home/edsiper/coding/monkey/mk_server/mk_server.c:455<br>#16 0x000000000040aa6b in mk_sched_launch_worker_loop (thread_conf=0x7ffff701c538) at /home/edsiper/coding/monkey/mk_server/mk_scheduler.c:394<br>#17 0x00007ffff7bc26aa in start_thread (arg=0x7ffff51ff700) at pthread_create.c:333<br>#18 0x00007ffff76f3eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109<br>---<br><br></div><div>thanks<br></div><div><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Eduardo Silva<br><a href="http://edsiper.linuxchile.cl" target="_blank">http://edsiper.linuxchile.cl</a><br><a href="http://monkey-project.com" target="_blank">http://monkey-project.com</a></div></div>
</div></div></div>