Bug #899


Automatically-started lttng-sessiond does not like return code 2.

Added by Anonymous over 7 years ago. Updated almost 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


When sending commands to an agent, the sessiond expects return codes "1" for success and "2" for error. For example, the Java agent can return "2" due to bug #884.

It seems there is a difference of behaviour depending on if the sessiond was started manually prior to running "lttng", or if it was created via a "lttng create".

If the sessiond was started manually on its own, it will accept both return codes 1 and 2. It works with both a user or root sessiond.
However if the sessiond was spawned automatically by "lttng create", it will continue accepting return code 1 as usual, but will not like 2 as much, and will print the following to the console every time it is received:

Error: Agent returned an unknown code: 2

This only happens when the sessiond was started automatically. A manually-started one will not print this message.

Other than this message, the behaviour seems fine and traces have the correct contents.

Actions #1

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

  • Status changed from New to Confirmed
  • Target version set to 22
Actions #2

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

  • Status changed from Confirmed to Resolved
  • Assignee set to Anonymous

Resolved as of:

commit 2c2403496ae4416e535ff9eb689f6be25af6e47f
Author: Alexandre Montplaisir <>
Date:   Thu Aug 6 13:41:50 2015 -0400

    Fix: Send the correct Java agent return code when disabling events

    When receiving a "disable event" command from the sessiond for
    an event that is not known, the Java agent should send the
    "unknown logger name" return code, not the "invalid command" one.

    Signed-off-by: Alexandre Montplaisir <>
    Signed-off-by: Mathieu Desnoyers <>

Actions #3

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

  • Target version changed from 22 to 2.8

Also available in: Atom PDF