projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: consumerd: add missing put_subbuf for ust and kernel errors
[lttng-tools.git]
/
src
/
common
/
ust-consumer
/
ust-consumer.c
diff --git
a/src/common/ust-consumer/ust-consumer.c
b/src/common/ust-consumer/ust-consumer.c
index 01d5ecf6505cc0667a41194d5cb1f07d06e3540b..7fbba8a9080f066ed001996c8081a42befa96fcb 100644
(file)
--- a/
src/common/ust-consumer/ust-consumer.c
+++ b/
src/common/ust-consumer/ust-consumer.c
@@
-2273,10
+2273,10
@@
int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
* because we locked the metadata thread.
*/
ret = lttng_ustconsumer_request_metadata(ctx, metadata->chan, 0, 0);
* because we locked the metadata thread.
*/
ret = lttng_ustconsumer_request_metadata(ctx, metadata->chan, 0, 0);
+ pthread_mutex_lock(&metadata->lock);
if (ret < 0) {
goto end;
}
if (ret < 0) {
goto end;
}
- pthread_mutex_lock(&metadata->lock);
ret = commit_one_metadata_packet(metadata);
if (ret <= 0) {
ret = commit_one_metadata_packet(metadata);
if (ret <= 0) {
@@
-2496,6
+2496,8
@@
retry:
index.offset = htobe64(stream->out_fd_offset);
ret = get_index_values(&index, ustream);
if (ret < 0) {
index.offset = htobe64(stream->out_fd_offset);
ret = get_index_values(&index, ustream);
if (ret < 0) {
+ err = ustctl_put_subbuf(ustream);
+ assert(err == 0);
goto end;
}
goto end;
}
@@
-2503,6
+2505,8
@@
retry:
ret = update_stream_stats(stream);
if (ret < 0) {
PERROR("kernctl_get_events_discarded");
ret = update_stream_stats(stream);
if (ret < 0) {
PERROR("kernctl_get_events_discarded");
+ err = ustctl_put_subbuf(ustream);
+ assert(err == 0);
goto end;
}
} else {
goto end;
}
} else {
@@
-2620,14
+2624,17
@@
int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
stream->tracefile_size_current = 0;
if (!stream->metadata_flag) {
stream->tracefile_size_current = 0;
if (!stream->metadata_flag) {
- ret = index_create_file(stream->chan->pathname,
+ struct lttng_index_file *index_file;
+
+ index_file = lttng_index_file_create(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
- stream->tracefile_count_current);
- if (ret < 0) {
+ stream->tracefile_count_current,
+ CTF_INDEX_MAJOR, CTF_INDEX_MINOR);
+ if (!index_file) {
goto error;
}
goto error;
}
- stream->index_f
d = ret
;
+ stream->index_f
ile = index_file
;
}
}
ret = 0;
}
}
ret = 0;
This page took
0.027937 seconds
and
4
git commands to generate.