[lttng-dev] No trace files are generated for UST

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Fri Dec 6 11:41:08 EST 2013


> Yes, with that LD_PRELOAD sample able to run.
>
> root@/tmp/lttng-build-root/bin # ./lttng create app
> Session app created.
> Traces will be written in /root/lttng-traces/app-20131206-174935
> root@/tmp/lttng-build-root/bin # dmesg
> root@/tmp/lttng-build-root/bin # ./lttng enable-event -u -a
> All UST events are enabled in channel channel0
> root@/tmp/lttng-build-root/bin # ./lttng start
> Tracing started for session app
> root@/tmp/lttng-build-root/bin # cd ..
> root@/tmp/lttng-build-root # cd ..
> root@/tmp # LD_PRELOAD=/tmp/lttng-build-root/lib/liblttng-ust.so.0 ./sample
> root@/tmp #
> root@/tmp #
> root@/tmp # cd lttng-build-root/
> root@/tmp/lttng-build-root # cd bin/
> root@/tmp/lttng-build-root/bin # ./lttng stop
> Waiting for data availability
> Tracing stopped for session app
> root@/tmp/lttng-build-root/bin # dmesg
> root@/tmp/lttng-build-root/bin # ./lttng destroy
> Session app destroyed
> root@/tmp/lttng-build-root/bin # cd /
> root@/ # cd root/
> root@~ # ls lttng-traces
> root@~ # cd lttng-traces/
> root@~/lttng-traces # ls
> root@~/lttng-traces #< no traces are generated>
>
> in ps -ef
>
> 28664 root       0:00 ./lttng-sessiond -vvv --consumerd64-path=/tmp/lttng-build-root/lib/lttng/libexec/lttng-consumerd
> 29027 root       0:00 lttng-consumerd --quiet -u --consumerd-cmd-sock /var/run/lttng/ustconsumerd64/command --consumerd-err-sock /var/run/lttng/ustconsumerd64/error

   So ./sample runs but you get no trace?  (Sound of head scratching)  Could you check 'readelf -h ./sample' and make sure the Class is ELF64?  (It's unlikely to be ELF32 but let's make sure anyway)

   I also thought that maybe sample being run as root is the problem, but a quick check on my system shows that cannot be the case (it just traces as ust/uid/0).

   Interesting.  I've managed to sort-of-reproduce the problem.  If I run (from a user account which is NOT a tracing group member):

$ sudo -H create a
$ sudo -H enable-event -u --all
$ sudo -H start
$ ./sample
$ sudo -H destroy

   This generates the expected trace in /root/lttng-traces/a-...

   But if I do this instead:

$ sudo create a
$ sudo enable-event -u --all
$ sudo start
$ ./sample
$ sudo destroy

   Then lttng correctly creates the trace folder in /home/username/lttng-traces/a-... when sample is run, but it remains empty.  No ust sub-folder, nothing.

   Something is definitely awry with paths and $HOME values here.

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/>



More information about the lttng-dev mailing list