Actions
Bug #1241
closedlttng_destroy_session_no_wait always return LTTNG_ERR_INVALID in LTTng-2.11 and won't destroy the session
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.
Updated by Jonathan Rajotte Julien over 4 years ago
- Status changed from New to In Progress
Nice catch,
looking into it.
Updated by Jonathan Rajotte Julien over 4 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset lttng-tools|1e2bb0af39b263c2bba440e3f20a58c596c870c6.
Actions