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

Brian Robbins brianrob at microsoft.com
Fri Oct 23 11:15:23 EDT 2015


Ah, that clears it up.  Thank you Simon.

-Brian

-----Original Message-----
From: thundersim at gmail.com [mailto:thundersim at gmail.com] On Behalf Of Simon Marchi
Sent: Thursday, October 22, 2015 6:50 PM
To: Brian Robbins <brianrob at microsoft.com>
Cc: lttng-dev <lttng-dev at lists.lttng.org>
Subject: Re: [lttng-dev] Ubuntu Package for LTTng-UST Compiled with Debug Logging On By Default

On 22 October 2015 at 19:35, Brian Robbins <brianrob at microsoft.com> wrote:
> Hello,
>
>
>
> 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.
>
> -Brian


Hi Brian,

This warning used to appear regardless of the definition of LTTNG_UST_DEBUG.

Bisecting shows that it has been fixed in commit 7bdd21a41092a59207958911666cbd458f93a319, which is part of version 2.7.

Here it is: https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fgit.lttng.org%2f%3fp%3dlttng-ust.git%3ba%3dcommit%3bh%3d7bdd21a41092a59207958911666cbd458f93a319&data=01%7c01%7cbrianrob%40microsoft.com%7c99b5a8acab4a4f5011fb08d2db4c43b3%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=zTME%2f%2bZcLfwBF8%2bSfSKgC8wo1I14REelMFZlkUYWByA%3d

Simon


More information about the lttng-dev mailing list