[lttng-dev] Ubuntu Package for LTTng-UST Compiled with Debug Logging On By Default

Brian Robbins brianrob at microsoft.com
Thu Oct 22 19:35:04 EDT 2015


The Linux build of CoreCLR now supports tracing using LTTng-UST.  One artifact that we noticed when running on Ubuntu 14.04 in our CI is that apps running on CoreCLR all have an LTTng warning written to stderr:

libust[883/883]: Warning: HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305)

I've investigated, and it is true that in the CI, there is no HOME environment variable.  However, what I'm more interested in is why this message is written in the first place.  Looking in at the latest LTTng-UST code, it appears that this message should only be logged when debug logging is enabled.  From code inspection, it appears that debug logging can be enabled at either compile time (#define LTTNG_UST_DEBUG) or at runtime via an environment variable called LTTNG_UST_DEBUG.

I have confirmed that the environment variable LTTNG_UST_DEBUG is not present.  I've also looked at the disassembly, and can confirm that the ust_loglevel check is not actually performed (the if statement is optimized away).  This makes me think that the Ubuntu package was compiled with LTTNG_UST_DEBUG defined.

The package in question is old - LTTng-UST 2.4.  I'm wondering if either debug logging was always present in 2.4, or if the package was compiled with LTTNG_UST_DEBUG.  I would expect that most customers would want debug logging off by default, since it affects the output of the program.

Your help in figuring this out is greatly appreciated.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20151022/bfb12078/attachment.html>

More information about the lttng-dev mailing list