Project

General

Profile

Actions

Bug #913

closed

Issuing both --loglevel and --loglevel-only for the same event and same level does not work

Added by Anonymous almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
08/29/2015
Due date:
% Done:

0%

Estimated time:

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)
Actions #1

Updated by Jérémie Galarneau almost 9 years ago

  • Assignee set to Philippe Proulx
  • Target version set to 2.7
Actions #2

Updated by Jérémie Galarneau almost 9 years ago

  • Status changed from New to Confirmed
Actions #3

Updated by Anonymous almost 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)
Actions #4

Updated by Philippe Proulx almost 9 years ago

  • Status changed from Confirmed to In Progress
Actions #5

Updated by Anonymous almost 9 years ago

Philippe Proulx wrote:

See https://github.com/lttng/lttng-tools/pull/37.

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)
Actions #6

Updated by Philippe Proulx almost 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?

Actions #7

Updated by Anonymous almost 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).

Actions #8

Updated by Jérémie Galarneau over 8 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF