我一直在尝试将jemalloc集成到我们的ARM 32位设备中。当我将Jemalloc配置为使用libunwind进行回溯时,我在pthread_join.c遇到分段错误。
Using libgcc and gcc intrinsics for backtracing did not really give any backtraces. Libunwind gave some backtrace symbols in the results but ends up with a segfault.
I have linked libunwind statically, here are my build config flags for jemalloc
--enable-debug --enable-prof --enable-prof-libunwind --with-static-libunwind=/usr/lib/libunwind.a --disable-prof-libgcc --enable-stats
以下是段错误时的日志转储:
[!]190614:131527 stackdumpd[3969]: I def:::Process PID: 8800 received Segmentation fault
190614:131527 system: I dump-stack:dumpstack:cvm:tid=8802:backtrace of signalled thread ========================
190614:131527 system: I dumpstack:cvm:pid=8800: [Thread debugging using libthread_db enabled]
190614:131527 system: I dumpstack:cvm:pid=8800: Using host libthread_db library "/lib/libthread_db.so.1".
190614:131528 system: I dumpstack:cvm:pid=8800: 0x76ea1250 in read () at ../sysdeps/unix/syscall-template.S:81
190614:131528 system: I dumpstack:cvm:pid=8800: #0 0x76ea1250 in read () at ../sysdeps/unix/syscall-template.S:81
190614:131528 system: I dumpstack:cvm:pid=8800: #1 0x76acfe08 in ?? () from /usr/lib/libstackdump.so.1
190614:131528 system: I dumpstack:cvm:pid=8800: #2 0x76577ef2 in ?? () from /usr/java/lib/arm/minimal/libjvm.so
190614:131528 system: I dumpstack:cvm:pid=8800: Backtrace stopped: previous frame identical to this frame (corrupt stack?)
190614:131528 system: I dump-stack:dumpstack:cvm:tid=8802:backtrace of signalled thread ends =========================
190614:131528 system: I dump-stack:dumpstack:cvm:pid=8800:begin native threads ==============================
190614:131529 system: I dumpstack:cvm:pid=8800: 0x76e99194 in pthread_join (threadid=<optimized out>, thread_return=0x7ee60560) at pthread_join.c:92
190614:131529 system: I dumpstack:cvm:pid=8800: Thread 2 (Thread 0x76a24430 (LWP 8802)):
190614:131529 system: I dumpstack:cvm:pid=8800: #0 0x76ea1250 in read () at ../sysdeps/unix/syscall-template.S:81
190614:131529 system: I dumpstack:cvm:pid=8800: #1 0x76acfe08 in ?? () from /usr/lib/libstackdump.so.1
190614:131529 system: I dumpstack:cvm:pid=8800: #2 0x76577ef2 in ?? () from /usr/java/lib/arm/minimal/libjvm.so
190614:131529 system: I dumpstack:cvm:pid=8800: Backtrace stopped: previous frame identical to this frame (corrupt stack?)
190614:131529 system: I dumpstack:cvm:pid=8800: Thread 1 (Thread 0x76f6f210 (LWP 8800)):
190614:131529 system: I dumpstack:cvm:pid=8800: #0 0x76e99194 in pthread_join (threadid=<optimized out>, thread_return=0x7ee60560) at pthread_join.c:92
190614:131529 system: I dumpstack:cvm:pid=8800: #1 0x76e81a42 in ?? () from /usr/java/bin/../lib/arm/jli/libjli.so
190614:131529 system: I dumpstack:cvm:pid=8800: Backtrace stopped: previous frame identical to this frame (corrupt stack?)