[lttng-dev] lttng, lttng-sessiond and the tracing group
Christian Babeux
christian.babeux at efficios.com
Wed Feb 6 12:52:25 EST 2013
Hi Daniel,
> First observation
I'm not able to reproduce your first observation on my machine.
> [...]
> $ sudo lttng -vvv create rootlevel
> DEBUG3: URI string: file:///home/daniel/lttng-traces/rootlevel-20130206-091954 [in uri_parse() at uri.c:253]
> DEBUG3: URI file destination: /home/daniel/lttng-traces/rootlevel-20130206-091954 [in uri_parse() at uri.c:290]
> DEBUG3: URI dtype: 3, proto: 0, host: , subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
> DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
> Session rootlevel created.
> Traces will be written in /home/daniel/lttng-traces/rootlevel-20130206-091954
> DEBUG1: Init config session in /home/daniel [in config_init() at conf.c:294]
This looks wrong. Traces should be written under the
/root/lttng-traces. Are you sure this command has effectively been
issued has the root user? It looks like it was issued as your normal
user hence the "session=rootlevel" in your user ~/.lttngrc. Could you
try su'ing to root instead?
> Second observation
>
> Contention for ~/.lttngrc can lead to odd behaviour. This can only occur with users in the tracing group, I think (the root lttng-sessiond has no business writing to a non-tracing user's home directory). Witness this:
I'm also not able to reproduce this situation. I'm thinking there
might be a slight difference between the sudo and $HOME directory
behavior between our two machines...
> Third observation
>
> 'lttng set-session' issues an error only if there is no name specified or if the name is too long (or if .lttngrc is root-owned, of course): it'll happily change the contents to whatever the argument is, including non-existent sessions or even illegal session names (containing embedded '/', for example).
Yes this is the expected behavior. From the lttng man-page:
"
set-session NAME
Set current session name
Will change the session name in the .lttngrc file.
"
Verification is done when issuing the "start" command. An invalid or
non-existent session will be detected and no tracing will occur.
>A too-long session name (246 characters or more) also has the unfortunate side effect of wiping the contents of .lttngrc.
Could you file a bug report for this issue here:
http://bugs.lttng.org/projects/lttng-tools
Thanks,
Christian
More information about the lttng-dev
mailing list