Bug #913
closedIssuing both --loglevel and --loglevel-only for the same event and same level does not work
0%
Description
If one enables an event for a given loglevel range (--loglevel), a subsequent enable for a specific loglevel (--loglevel-only) will not throw any error, but will have no effect.
For example:
lttng create lttng enable-event -j myevent --loglevel warning lttng enable-event -j myevent --loglevel-only warning
lttng list
will still only show:
Events (Logger name): --------------------- - myevent [enabled] (loglevel <= JUL_WARNING)
It seems like a bug, as those are two different "event rules" and could be enabled side-by-side.
Note that if the two log levels are different (even if the conditions are "overlapping"), then it works correctly:
lttng create lttng enable-event -j myevent --loglevel warning lttng enable-event -j myevent --loglevel-only severe
lttng list then shows
Events (Logger name): --------------------- - myevent [enabled] (loglevel == JUL_SEVERE) - myevent [enabled] (loglevel <= JUL_WARNING)
Updated by Jérémie Galarneau about 9 years ago
- Assignee set to Philippe Proulx
- Target version set to 2.7
Updated by Jérémie Galarneau about 9 years ago
- Status changed from New to Confirmed
Updated by Anonymous about 9 years ago
The same problem also happens with the standard UST domain (-u), although in that case an error is reported:
lttng create lttng enable-event -u myevent --loglevel debug lttng enable-event -u myevent --loglevel-only debug
Error: Event myevent: UST event already enabled (channel channel0, session auto-20150901-154522)
Updated by Philippe Proulx about 9 years ago
- Status changed from Confirmed to In Progress
Updated by Anonymous about 9 years ago
Philippe Proulx wrote:
I've tried the branch, and it fixes the problem for the JUL and log4j domains. Great!
However the problem from comment #913-3 (with the -u domain) still happens, albeit with a slightly different error message now:
$ lttng enable-event -u myevent --loglevel-only debug Error: Event myevent: Enable UST event failed (channel channel0, session bozo)
Updated by Philippe Proulx about 9 years ago
I don't see this error:
$ lttng create Session auto-20150904-113858 created. Traces will be written in /home/eepp/lttng-traces/auto-20150904-113858 $ lttng enable-event -u myevent --loglevel debug UST event myevent created in channel channel0 $ lttng enable-event -u myevent --loglevel-only debug UST event myevent created in channel channel0 $ lttng list Tracing session auto-20150904-113858: [inactive] Trace path: /home/eepp/lttng-traces/auto-20150904-113858 === Domain: UST global === Buffer type: per UID Channels: ------------- - channel0: [enabled] Attributes: overwrite mode: 0 subbufers size: 131072 number of subbufers: 4 switch timer interval: 0 read timer interval: 0 trace file count: 0 trace file size (bytes): 0 output: mmap() Events: myevent (loglevel == TRACE_DEBUG (14)) (type: tracepoint) [enabled] myevent (loglevel <= TRACE_DEBUG (14)) (type: tracepoint) [enabled]
Are you trying with the latest version of this branch?
Updated by Anonymous about 9 years ago
Ok nevermind. I tried again on a clean environment and was not able to reproduce the problem. I must have had an old sessiond running or something.
So it works fine! I also tested that the notifications are sent correctly to the agents via the TCP socket (at least for the -j/-l domains).
Updated by Jérémie Galarneau about 9 years ago
- Status changed from In Progress to Resolved