<div dir="ltr">Hi Jonathan,<br>i'm using 2.6 and will be difficult for me to upgrade to 2.7<br>Is there any known issue or bug in this area?<br>I was getting help from Anand on a different thread to solve this, but i'm still seeing the issue.<div><br></div><div><br>/Jam<br><br><br><br>From: Jonathan Rajotte Julien Jonathan.rajotte-julien at <a href="http://efficios.com">efficios.com</a> <br><br>Hi Jam/Anand(?)<br><br>Can you reproduce this against lttng 2.7 or master (ust/tools) ?<br><br>Thanks<div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div>
<br><div class="gmail_quote">On Thu, Aug 6, 2015 at 10:41 PM, jamie explorer <span dir="ltr"><<a href="mailto:jamieexplorer@gmail.com" target="_blank">jamieexplorer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span><span class="">Hi All,<div>i looked into this further, generated .c file with expanded macros for debugging</div><div>Some of the function pointer are not populated correctly.</div></span><div>as i mentioned this issue is only seen using g++ compiler and not seen with gcc</div><div><br></div></span><span class=""><div>please see the following GDB analysis:</div><div><br></div><br>(gdb) bt</span><div><span><br><span class="">#0  0x00000000 in ?? ()<br></span></span></div><div><div class="h5"><div><div></div><div>#1  0x080490a0 in __event_probe__sample_tracepoint___message (__tp_data=0x80512d0, <br>    text=0x804ca64 "Hello World\n") at sample_tracepoint.c:8567<br><br>#2  0x0804ba23 in __tracepoint_cb_sample_tracepoint___message (<br>    text=0x804ca64 "Hello World\n")<br>    at <span style="font-size:12.8000001907349px">/build/home/jam/gentp</span>/src/sample.c:4026<br>#3  main (argc=1, argv=0xffffdd74)<br>    at <span style="font-size:12.8000001907349px">/build/home/jam/gentp/</span>src/sample.c:4731<br><br><b>***bc_runtime->filter</b> --- is not populated correctly, because of which it crashes<br><b>(gdb) frame 1</b><br>#1  0x080490a0 in __event_probe__sample_tracepoint___message (__tp_data=0x80512d0, <br>    text=0x804ca64 "Hello World\n") at sample_tracepoint.c:8567<br>8567     if (__builtin_expect(!!(<b>bc_runtime->filter</b>(bc_runtime, __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG), 0))<br><br><br><b>(gdb) list</b><br>8562     (__stackvar.__filter_stack_data, __tp_data,text);<br>8563     for (bc_runtime = ((__typeof__(*bc_runtime) *) ((char *) ((reinterpret_cast<__typeof__((&__event->bytecode_runtime_head)->next)>(tracepoint_dlopen.rcu_dereference_sym_bp((reinterpret_cast<void *>((&__event->bytecode_runtime_head)->next)))))) - (unsigned long) (&((__typeof__(*bc_runtime) *) 0)->node)));<br>8564     &bc_runtime->node != (&__event->bytecode_runtime_head);<br>8565     bc_runtime = ((__typeof__(*bc_runtime) *) ((char *) ((reinterpret_cast<__typeof__(bc_runtime->node.next)>(tracepoint_dlopen.rcu_dereference_sym_bp((reinterpret_cast<void *>(bc_runtime->node.next)))))) - (unsigned long) (&((__typeof__(*bc_runtime) *) 0)->node))))<br>8566     {<br><b>8567     if (__builtin_expect(!!(bc_runtime->filter(bc_runtime, __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG), 0))</b><br>8568      __filter_record = 1;<br>8569     } if (__builtin_expect(!!(!__filter_record), 1)) return;<br>8570     } __event_len =<br>8571<br><br><br><b>printing bc_runtime shows filter is 0</b><br><b>(gdb) p *bc_runtime </b><br>$3 = {bc = 0x0,<b> filter = 0x0,</b> link_failed = 0, node = {next = 0x8051304, <br>    prev = 0x8051304}}<br><br><br><b>also i see __event->bytecode_runtime_head->prev = 0x1 which may be wrong</b><br><b>(gdb) p *__event</b><br>$4 = {id = 2, chan = 0xf6c047c0, enabled = 1, <br>  desc = 0x804c700 <__event_desc___sample_tracepoint_message>, _deprecated1 = 0x0, <br>  ctx = 0x0, instrumentation = LTTNG_UST_TRACEPOINT, u = {<No data fields>}, node = {<br>    next = 0x8051344, prev = 0x0}, _deprecated2 = {next = 0x0, prev = 0x0}, <br>  _deprecated3 = 0x0, _deprecated4 = 0, <b>bytecode_runtime_head = {next = 0x8051304, <br>    prev = 0x1}</b>, has_enablers_without_bytecode = 134552592, enablers_ref_head = {<br>    next = 0x8051c10, prev = 0x0}, hlist = {next = 0xf6c00ea0, prev = 0x1}, <br>  registered = 89}<div><br></div><div><br></div><div>I guess this structure is populated in tracepoint_register using urcu.</div><div>Can anyone give me more pointers to debug this. Is this a known issue and is there any patch which i can use</div><div><br></div><div><br></div><div class="gmail_extra"><div dir="ltr"><div style="font-size:12.8000001907349px"><div dir="ltr" style="font-size:12.8000001907349px">/Jam</div><div><br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Mon, Aug 3, 2015 at 4:19 PM, jamie explorer <span dir="ltr"><<a href="mailto:jamieexplorer@gmail.com" target="_blank">jamieexplorer@gmail.com</a>></span> wrote:<br></div></div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>i am trying to run 32-bit application and see crash at the the line where "tracepoint" is used.</div><div>i am using sample application given in lttng-ust-2.6.0/doc/examples/gen-tp/</div><div>Not able to understand why the problem is seen only with 32-bit apps? Can experts here pls help me fix this.</div><div><br></div><div>Have tried using ELF 32-bit app on Intel 80386 and PowerPC and see the crash. Where as 64-bit applications have no problem.</div><div><br></div><div>following is the code where it crashes</div><div><div>        for (i = 0; i < 100000; i++) {</div><div>                tracepoint(sample_tracepoint, message,  "Hello World\n");  <<<< Crash here</div><div>                usleep(1); </div><div>        }</div></div><div><br></div><div>GDB output:</div><div><br></div><div><div><div><div dir="ltr">#0  0x00000000 in ?? ()<br>#1  0x10001e54 in __event_probe__sample_tracepoint___message (<br>    __tp_data=0x10015420, text=0x100034a4 "Hello World\n")<br>    at /build/home/jam/gentp/sample_tracepoint.h:13<br>#2  0x10000b9c in __tracepoint_cb_sample_tracepoint___message (<br>    text=0x100034a4 "Hello World\n")<br>    at //build/home/jam/gentp/sample_tracepoint.h:13<br>#3  main (argc=<optimized out>, argv=<optimized out>)<br>    at /build/home/jam/gentp/sample.c:115<br><div dir="ltr"><br></div><div dir="ltr"><br></div><div>i am running 32-bit version of lttng-sessiond</div><div dir="ltr"><div dir="ltr">root@host:~# ps aux | grep lttng</div><div dir="ltr">root      4224  0.0  0.0  92212  1648 ?        Ssl  00:42   0:00 /usr/bin/lttng-sessiond --consumerd32-path /usr/lib/lttng/libexec/lttng-consumerd --consumerd32-libdir /usr/lib/ -b --no-kernel</div><div dir="ltr">root      4243  0.0  0.0  64212   956 ?        Sl   00:42   0:00 lttng-consumerd  -u --consumerd-cmd-sock /var/run/lttng/ustconsumerd32/command --consumerd-err-sock /var/run/lttng/ustconsumerd32/error --group tracing</div><div><br></div></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">/Jam</div></div></div></div>
</div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div></div>