Languages

Menu
Sites
Language
Get useful stack trace when app crash with Signal 6 (SIGABRT)

I have a large project on Samsung Z3 phone (project ported from Android platform with native code). Project can run on Z3 but i have a random crash with signal abort. When app crash i get the dump file from device and it show the stack trace as below:

Callstack Information (PID:2995)
Call Stack Count: 5
 0: gsignal + 0x34 (0xb4f72b44) [/usr/lib/libc-2.20-2014.11.so] + 0x2bb44
 1: abort + 0x284 (0xb4f74030) [/usr/lib/libc-2.20-2014.11.so] + 0x2d030
 2: __gnu_cxx::__verbose_terminate_handler() + 0xd4 (0xb514bf39) [/usr/lib/libstdc++.so.6.0.20] + 0x49f39
 3: (0xb514a971) [/usr/lib/libstdc++.so.6.0.20] + 0x48971
 4: (0xb514a9c7) [/usr/lib/libstdc++.so.6.0.20] + 0x489c7
End of Call Stack

This stack trace is not useful for me to get back the crash issues from the source code, because all thing point to libc.

So how i can get more information from that? (ex: where did my call call to libstdc++ and make it crash)

Notice:

My app using multi thread and the crash goes from worker thread (not main thread, as i show from gdb debugger)

I tried to debug app under gdb (using tizen studio), but it get the same stack as in device report

I tried set address breakpoint on 0xb514a9c7 but gdb get exception with this.

Looking for all you help

Responses

3 Replies
K Johnson

Hi Quoc Tham,
You may try using the set of tools available in Tizen studio as described in this link. It may help you to find the crash point in your source code.

Quoc Tham

Hi Johnson

I tried almost those tools, but it's not help in this case

Call Stack View: It show the same call stack as in system dump and gdb debugger

Valgrind: Not available for Tizen 3.0

Address Sanitizer: show nothing in console when app get crash

- Other tools for static & performance check so it is not helpful here

More notices:

 - My app is a very large source code so i build binary with my script (call to clang++ as standalone build tools).

 - With Addess Sanitizer, i also inlcude flag -fsanitize=address when compile and link phase.

 - Output app run well on Tizen Z2 (Tizen 2.4). This problem only on Tizen 3.0

Do you have any other recomment? 

K Johnson

According to this link SIGABRT is related to memory allocation. So, I would like to request you to use dlog_print() before any memory allocation and trace the log manually from the log view and find out how far does it go.