koute / not-perf

A sampling CPU profiler for Linux
Apache License 2.0
871 stars 41 forks source link

aarch64 crash - asking for help #26

Closed krzysiek6d closed 2 years ago

krzysiek6d commented 2 years ago

Hi

During memory profiling with bytehound I encountered crash with bracktrace containing 2 entries:

#0 0x7faf1993fc in gsignal+0xcc from /usr/lib64/libc.so.6+0x323fc
#1 0x7fb33ada8c from /opt/memprof/aarch64/libbytehound.so+0xf5a8c

this leads to

addr2line -e libbytehound.so 0xf5a8c
/root/.cargo/git/checkouts/not-perf-af1a46759dd83df9/51003a4/nwind/src/arch/aarch64_trampoline.s:22

aarch64_trampoline.s from this revision revision 51003a4 is quite old IMO - but maybe you're aware of some bugs related to that part of code or give a hint how should I debug such issues?

koute commented 2 years ago

I would start by trying to profile a toy example - compile some small program and try to profile it and see if it crashes (it might be something your program does in a weird way, or it might be toolchain/system/libc/whetever incompatibility). I'd also try different versions of Bytehound and see if it crashes with all of them. Also try to set MEMORY_PROFILER_USE_SHADOW_STACK to 0 and see if it crashes then.

krzysiek6d commented 2 years ago

Hi, I suggested this way of checking to my colleagues but did not get a feedback if it's working or not. Anyway thank you very much for this hints. I'm closing this issue since there is no reason to have it opened infinitely ;) Thanks!