Project

General

Profile

Bug #1241

lttng_destroy_session_no_wait always return LTTNG_ERR_INVALID in LTTng-2.11 and won't destroy the session

Added by Shuo Yang 8 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
High
Target version:
Start date:
03/03/2020
Due date:
% Done:

100%

Estimated time:

Description

The implementation of "lttng_destroy_session_no_wait" (https://github.com/lttng/lttng-tools/blob/stable-2.11/src/lib/lttng-ctl/lttng-ctl.c#L2051) always returns "LTTNG_ERR_INVALID" in 2.11.

int lttng_destroy_session_no_wait(const char *session_name)
{
    enum lttng_error_code ret_code;

    ret_code = lttng_destroy_session_ext(session_name, NULL);
    return ret_code == LTTNG_OK ? ret_code : -ret_code;
}

It calls "lttng_destroy_session_ext" with the second argument "_handle" as NULL, which causes LTTNG_ERR_INVALID to be returned. (https://github.com/lttng/lttng-tools/blob/stable-2.11/src/lib/lttng-ctl/destruction-handle.c#L407)

    if (!session_name || !_handle) {
        ret_code = LTTNG_ERR_INVALID;
        goto error;
    }

Thus calling to "lttng_destroy_session_no_wait" won't actually destroy the session.

#1

Updated by Jonathan Rajotte Julien 8 months ago

  • Status changed from New to In Progress

Nice catch,

looking into it.

#2

Updated by Jonathan Rajotte Julien 7 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Also available in: Atom PDF