Actions
Bug #513
closedUndefined behaviour - tracepoints with same provider in multiple compilation units
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/29/2013
Due date:
% Done:
100%
Estimated time:
Description
When using tracepoints with the same provider in multiple .c files, my small test application crashes at startup with a cryptic error message:
test: /usr/local/include/lttng/ust-tracepoint-event.h:685: __lttng_events_init__my_project: Assertion `!ret' failed. Aborted
Gitweb: http://git.dorsal.polymtl.ca/~smarchi?p=ust-test.git;a=summary
To run: make && ./test
With a more complex application, I get a different behaviour, no crash, but only one tracepoint gets correctly activated. I attached a tarball with an example.
To run:
$ ./configure --enable-tracing
$ make
$ LTTNG_UST_DEBUG=1 ./memcached
Snippet from the debug output:
liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_add (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_del (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_pre (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_set (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_app (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_get (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:cmd_rep (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:new_conn (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:conn_dispatch (in tracepoint_register_lib() at tracepoint.c:762) liblttng_ust_tracepoint[15544/15544]: registered tracepoint: memcached:server_start (in tracepoint_register_lib() at tracepoint.c:762) libust[15544/15544]: adding probe memcached containing 1 events to lazy registration list (in lttng_probe_register() at lttng-probes.c:179) libust[15544/15544]: just registered probe memcached containing 1 events (in lttng_lazy_probe_register() at lttng-probes.c:115) libust[15544/15544]: Sent register event notification for name "memcached:server_start": ret_code 0, event_id 0 (in ustcomm_register_event() at lttng-ust-comm.c:948) liblttng_ust_tracepoint[15544/15544]: Registering probe to tracepoint memcached:server_start (in __tracepoint_probe_register() at tracepoint.c:539)
We can see "adding probe memcached containing 1 events", where I would prefer "adding probe memcached containing 10 events".
Files
Actions