[ltt-dev] Insight into crash on powerpc with ust-0.11

Jason Wessel jason.wessel at windriver.com
Thu Feb 10 18:45:20 EST 2011


I built and linked a PPC application with -lust it gets a segmentation fault before it ever gets to main().

Breakpoint 1 at 0x10001b04: file src/main.c, line 196.
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0fd97b5c in marker_probe_register (channel=0xfdae034 "metadata", name=0xfdae050 "core_marker_format", format=0x0, probe=0xfd9f6d4 <ltt_vtrace>,
    probe_private=0x1002e070) at marker.c:799
799                     trace_mark(metadata, core_marker_id,
(gdb) bt
#0  0x0fd97b5c in marker_probe_register (channel=0xfdae034 "metadata", name=0xfdae050 "core_marker_format", format=0x0, probe=0xfd9f6d4 <ltt_vtrace>,
    probe_private=0x1002e070) at marker.c:799
#1  0x0fd9a5f8 in ltt_marker_connect (channel=0xfdae034 "metadata", mname=0xfdae050 "core_marker_format", pname=<value optimized out>) at marker-control.c:187
#2  0x0fd9a740 in init_marker_control () at marker-control.c:416
#3  0x0fdabc50 in __do_global_ctors_aux () from /ord-gp11/jwessel/42/lemon_p2020/export/dist/usr/lib/libust.so.0
#4  0x0fd94a84 in _init () from /ord-gp11/jwessel/42/lemon_p2020/export/dist/usr/lib/libust.so.0
#5  0x0ffceaf8 in call_init (l=0x48000a70, argc=1, argv=0xbfe2cc34, env=0xbfe2cc3c) at dl-init.c:70
#6  0x0ffcec60 in _dl_init (main_map=0xfff08e8, argc=1, argv=0xbfe2cc34, env=0xbfe2cc3c) at dl-init.c:134
#7  0x0ffd67d4 in _start () from /ord-gp11/jwessel/42/lemon_p2020/export/dist/lib/ld.so.1
Backtrace stopped: frame did not save the PC
(gdb)

With some disassembly:
(gdb)  disas /m $pc-16,$pc+16
Dump of assembler code from 0xfd97b4c to 0xfd97b6c:
797                     entry->event_id = ret;
   0x0fd97b4c <marker_probe_register+1888>:     clrlwi  r8,r28,16
   0x0fd97b50 <marker_probe_register+1892>:     sth     r8,54(r31)

798                     ret = 0;
799                     trace_mark(metadata, core_marker_id,
   0x0fd97b54 <marker_probe_register+1896>:     lis     r3,3
   0x0fd97b58 <marker_probe_register+1900>:     ori     r3,r3,12120
=> 0x0fd97b5c <marker_probe_register+1904>:     lbz     r0,12(r3)
   0x0fd97b60 <marker_probe_register+1908>:     li      r24,1
   0x0fd97b64 <marker_probe_register+1912>:     cmpwi   cr7,r0,0
   0x0fd97b68 <marker_probe_register+1916>:     beq+    cr7,0xfd97bf0 <marker_probe_register+2052>
   0x0fd97b6c <marker_probe_register+1920>:     li      r0,4
   0x0fd97b70 <marker_probe_register+1924>:     li      r4,0
   0x0fd97b74 <marker_probe_register+1928>:     stw     r0,8(r1)
   0x0fd97b78 <marker_probe_register+1932>:     addi    r5,r1,24
   0x0fd97b7c <marker_probe_register+1936>:     stw     r0,12(r1)

I am assuming there is something wrong with the trace_mark macro but I had not dug into how it actually works, and thought I might ask here first if anyone had any ideas.

Thanks,
Jason.




More information about the lttng-dev mailing list