X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=e45d4423ac0e0a51b123f2c0275e13f981c9f763;hp=2bd010f895c223f83136f1c234f8bead46fbe339;hb=53fb6336415e5f19b6e8c4baeb0d0555ed5d6e66;hpb=7e0de2192e89732f6dea0b72992096a028ca02d1 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 2bd010f89..e45d4423a 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -3402,9 +3402,17 @@ int cmd_destroy_session(struct ltt_session *session, */ ret = cmd_rotate_session(session, NULL, true, LTTNG_TRACE_CHUNK_COMMAND_TYPE_NO_OPERATION); - if (ret != LTTNG_OK) { + /* + * Rotation operations may not be supported by the kernel + * tracer. Hence, do not consider this implicit rotation as + * a session destruction error. The library has already stopped + * the session and waited for pending data; there is nothing + * left to do but complete the destruction of the session. + */ + if (ret != LTTNG_OK && + ret != -LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL) { ERR("Failed to perform a quiet rotation as part of the destruction of session \"%s\": %s", - session->name, lttng_strerror(-ret)); + session->name, lttng_strerror(ret)); destruction_last_error = -ret; } }