Fix: trace-chunk: log the cause of file open failures
[lttng-tools.git] / src / common / trace-chunk.c
index affe3ac2050186043d5abd0590173e2f3296bd11..944743e0b585ba9458ba9e681aa974f80335fd56 100644 (file)
@@ -840,7 +840,7 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_file(
                        chunk->credentials.value.use_current_user ?
                                        NULL : &chunk->credentials.value.user);
        if (ret < 0) {
-               ERR("Failed to open file relative to trace chunk file_path = \"%s\", flags = %d, mode = %d",
+               PERROR("Failed to open file relative to trace chunk file_path = \"%s\", flags = %d, mode = %d",
                                file_path, flags, (int) mode);
                status = LTTNG_TRACE_CHUNK_STATUS_ERROR;
                goto end;
@@ -975,6 +975,7 @@ void lttng_trace_chunk_move_to_completed(struct lttng_trace_chunk *trace_chunk)
                                creation_timestamp, NULL);
                if (!directory_to_rename) {
                        ERR("Failed to generate initial trace chunk name while renaming trace chunk");
+                       goto end;
                }
                free_directory_to_rename = true;
        }
@@ -1268,7 +1269,7 @@ lttng_trace_chunk_registry_publish_chunk(
                                 *
                                 * Re-attempt to publish.
                                 */
-                               ERR("Attemp to publish a trace chunk to the chunk registry raced with a trace chunk deletion");
+                               ERR("Attempt to publish a trace chunk to the chunk registry raced with a trace chunk deletion");
                                continue;
                        }
                }
This page took 0.023722 seconds and 4 git commands to generate.