Project

General

Profile

Actions

Bug #884

closed

sessiond sends a "disable event" command to agents for each event, enabled or not, on session destroy

Added by Philippe Proulx about 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/31/2015
Due date:
% Done:

100%

Estimated time:

Description

When a session is destroyed, the session daemon sends a "disable event" command to all the agents, for each event, enabled or not.

This is problematic because agents typically keep a reference count of enabled events so that they may avoid calling the UST tracepoint when it's not necessary (when the ref count is 0). With this bug, the following situation can happen:

  1. create session A [ref count = 0, will not call tracepoint()]
  2. session A: enable event E for domain D [ref count = 1, will call tracepoint()]
  3. create session B [ref count = 1]
  4. session B: enable event E for domain D [ref count = 2]
  5. session B: disable event E for domain D [ref count = 1]
  6. session B: destroy [ref count = 0, will not call tracepoint()]
  7. session A: start
  8. ...
  9. session A: stop

The double-disable in session B makes the agent's internal reference count go back to 0, which disables the calls to tracepoint(). This results in session A having no recorded events E, even if they occured and event E was still enabled.


Files

Actions #1

Updated by Philippe Proulx over 8 years ago

Attaching a patch for LTTng-UST (applies on 2.6-stable) which:

  • fixes LTTng-UST's Java agent so that it actually uses reference counting;
  • works with both fixed and non-fixed versions of sessiond.

The Java agent looks at the version of the registration done command sent by sessiond to know if it's fixed or not:

  • 0: fixed;
  • > 0 means fixed.
Actions #2

Updated by Philippe Proulx over 8 years ago

Philippe Proulx wrote:

  • 0: fixed;
  • > 0 means fixed.

Of course what I meant is:

  • 0: not fixed;
  • > 0: fixed.
Actions #3

Updated by Philippe Proulx over 8 years ago

Attaching a patch for LTTng-UST (applies on 2.7-stable) which fixes the ref count update of the Java agent when it is known that the connected sessiond has fixed #884.

Actions #4

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

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset tools|commit:f1bc01296844846c89e13f34376461f57387d999.

Actions

Also available in: Atom PDF