<div dir="ltr">Hi,<div>I'm trying to add a simple ust event to my project, but I keep getting segmentation violation. I would really appreciate help in understanding what am I'm doing wrong. I'm running Ubuntu 12.04LTS and got lttng from git. I've ran the lttng with verbose but couldn't see anything valuable there. I'm using dynamic linkage (but the problem occurs also in static) and is as follows:</div>
<div><div><br></div><div>Program received signal SIGSEGV, Segmentation fault.</div><div>0x0000000000000000 in ?? ()</div><div>(gdb) where</div><div>#0 0x0000000000000000 in ?? ()</div><div>#1 0x000000000041b03f in __tracepoints__ptrs_init () at /usr/local/include/lttng/tracepoint.h:349</div>
<div>#2 0x000000000043e95d in __libc_csu_init ()</div><div>#3 0x00007ffff71f1700 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6</div><div>#4 0x00000000004039e9 in _start ()</div></div><div><br></div><div>
<br></div><div style>increasing the debug level shows:</div><div style><br></div><div style><div>ibust[6455/6455]: LTT : ltt ring buffer client "relay-metadata-mmap" init</div><div> (in lttng_ring_buffer_metadata_client_init() at lttng-ring-buffer-metadata-client.h:313)</div>
<div>libust[6455/6455]: LTT : ltt ring buffer client "relay-overwrite-mmap" init</div><div> (in lttng_ring_buffer_client_overwrite_init() at lttng-ring-buffer-client.h:562)</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-overwrite-rt-mmap" init</div>
<div> (in lttng_ring_buffer_client_overwrite_rt_init() at lttng-ring-buffer-client.h:562)</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-discard-mmap" init</div><div> (in lttng_ring_buffer_client_discard_init() at lttng-ring-buffer-client.h:562)</div>
<div>libust[6455/6455]: LTT : ltt ring buffer client "relay-discard-rt-mmap" init</div><div> (in lttng_ring_buffer_client_discard_rt_init() at lttng-ring-buffer-client.h:562)</div><div>libust[6455/6457]: Info: sessiond not accepting connections to local apps socket (in ust_listener_thread() at lttng-ust-comm.c:939)</div>
<div>libust[6455/6457]: Waiting for local apps sessiond (in wait_for_sessiond() at lttng-ust-comm.c:849)</div><div>libust[6455/6456]: Message Received "Get Tracer Version", Handle "root" (0) (in print_cmd() at lttng-ust-comm.c:216)</div>
<div>libust[6455/6456]: Return value: 0 (in handle_message() at lttng-ust-comm.c:589)</div><div>libust[6455/6456]: message successfully sent (in send_reply() at lttng-ust-comm.c:331)</div><div>libust[6455/6456]: Message Received "Registration Done", Handle "root" (0) (in print_cmd() at lttng-ust-comm.c:216)</div>
<div>libust[6455/6456]: Return value: 0 (in handle_message() at lttng-ust-comm.c:589)</div><div>libust[6455/6456]: message successfully sent (in send_reply() at lttng-ust-comm.c:331)</div><div>libust[6455/6455]: adding probe tgtd_project containing 1 events to lazy registration list (in lttng_probe_register() at lttng-probes.c:179)</div>
<div>[Thread debugging using libthread_db enabled]</div><div>Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-metadata-mmap" init</div>
<div> (in lttng_ring_buffer_metadata_client_init() at lttng-ring-buffer-metadata-client.h:313)</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-overwrite-mmap" init</div><div> (in lttng_ring_buffer_client_overwrite_init() at lttng-ring-buffer-client.h:562)</div>
<div>libust[6455/6455]: LTT : ltt ring buffer client "relay-overwrite-rt-mmap" init</div><div> (in lttng_ring_buffer_client_overwrite_rt_init() at lttng-ring-buffer-client.h:562)</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-discard-mmap" init</div>
<div> (in lttng_ring_buffer_client_discard_init() at lttng-ring-buffer-client.h:562)</div><div>libust[6455/6455]: LTT : ltt ring buffer client "relay-discard-rt-mmap" init</div><div> (in lttng_ring_buffer_client_discard_rt_init() at lttng-ring-buffer-client.h:562)</div>
<div>[New Thread 0x7ffff653a700 (LWP 6458)]</div><div>[New Thread 0x7ffff5d39700 (LWP 6459)]</div><div>libust[6455/6459]: Info: sessiond not accepting connections to local apps socket (in ust_listener_thread() at lttng-ust-comm.c:939)</div>
<div>libust[6455/6459]: Waiting for local apps sessiond (in wait_for_sessiond() at lttng-ust-comm.c:849)</div><div>libust[6455/6458]: Message Received "Get Tracer Version", Handle "root" (0) (in print_cmd() at lttng-ust-comm.c:216)</div>
<div>libust[6455/6458]: Return value: 0 (in handle_message() at lttng-ust-comm.c:589)</div><div>libust[6455/6458]: message successfully sent (in send_reply() at lttng-ust-comm.c:331)</div><div>libust[6455/6458]: Message Received "Registration Done", Handle "root" (0) (in print_cmd() at lttng-ust-comm.c:216)</div>
<div>libust[6455/6458]: Return value: 0 (in handle_message() at lttng-ust-comm.c:589)</div><div>libust[6455/6458]: message successfully sent (in send_reply() at lttng-ust-comm.c:331)</div><div>libust[6455/6455]: adding probe check_project containing 1 events to lazy registration list (in lttng_probe_register() at lttng-probes.c:179)</div>
<div><br></div><div style>and then it fails.</div><div style>The segmentation violations seems to be due to the fact that the tracepoint_register_lib is not initialized, but I don't understand what I'm missing...</div>
<div style><br></div><div style><div>print tracepoint_dlopen</div><div>$1 = {liblttngust_handle = 0x7ffff7ff6030, tracepoint_register_lib = 0, tracepoint_unregister_lib = 0, rcu_read_lock_sym_bp = 0, rcu_read_unlock_sym_bp = 0, </div>
<div> rcu_dereference_sym_bp = 0}</div><div><br></div></div></div><div style>Thanks</div><div style>Dror</div></div>