[lttng-dev] some troubles having lttgng-ust actually log something on a shared library

Mathieu Desnoyers compudj at krystal.dyndns.org
Fri Dec 16 16:33:00 EST 2011


* Sébastien Barthélémy (barthelemy at crans.org) wrote:
> Hello,
> 
> I'd like to use lttng-ust 2.0 (compiled from git), but get some
> trouble having it working even on
> a toy project.
> 
> That is, a trace is created, but it is empty:
> 
> $ ls -nl ~/lttng-traces/auto-20111216-211946/ust/run_motion-30999-20111216-211946/
> total 12
> -rw-rw---- 1 353372359 353370625 4096 2011-12-16 21:19 channel0_0
> -rw-rw---- 1 353372359 353370625 4096 2011-12-16 21:19 channel0_1
> -rw-rw---- 1 353372359 353370625 4096 2011-12-16 21:19 metadata
> 
> using ust debug mode, I noticed this error message:
>   libust[30999/31001]: Error: futex: Bad address (in
> wait_for_sessiond() at lttng-ust-comm.c:571)

I changed this so it only shows up if "LTTNG_UST_DEBUG" env var is set
just today (or was it yesterday ?). This indicates that your kernel has
a buggy sys_futex, and that you should upgrade. It's not the end of the
world if you don't, lttng-ust fall-back on a polling every 5 seconds
until a sessiond is found in that case.

> The full log is attached.
> 
> However, I get the same message with the hello example, which actually
> logs something.
> 
> The only difference between my test and the hello example is that I
> try to instrument
> a shared library. I probably have missed some obvious step.
> 
> Could you please point me to a similar example, or give me a hint on
> how to move forward?

This diff to the makefile makes it work here (you forgot to add
ust_motion.o to your .so).

7c7
< 	${CC} -shared -Wl,-soname,libmotion.so.1 -o libmotion.so.1.0.0 -ldl -llttng-ust -lstdc++ motion.o
---
> 	${CC} -shared -Wl,-soname,libmotion.so.1 -o libmotion.so.1.0.0 -ldl -llttng-ust -lstdc++ motion.o ust_motion.o

Best regards,

Mathieu

> 
> Thanks a lot!
> 
> -- Sebastian


> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list