X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=3047aec41ee94a96abb66cf827c72ed8aad3c743;hb=3448e2667be7445ae7630a18c2ab32cb2bcdd174;hp=c0999b613b496446c3c0de472af7f76cad6085d1;hpb=f50f23d9f80ed9fae7fe5c49aee65e813e0031c8;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index c0999b613..3047aec41 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -132,7 +132,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, /* Session daemon status message are handled in the following call. */ ret = consumer_add_relayd_socket(msg.u.relayd_sock.net_index, msg.u.relayd_sock.type, ctx, sock, consumer_sockpoll, - &msg.u.relayd_sock.sock); + &msg.u.relayd_sock.sock, msg.u.relayd_sock.session_id); goto end_nosignal; } case LTTNG_CONSUMER_ADD_CHANNEL: @@ -333,7 +333,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, /* Get relayd reference if exists. */ relayd = consumer_find_relayd(index); if (relayd == NULL) { - ERR("Unable to find relayd %" PRIu64, index); + DBG("Unable to find relayd %" PRIu64, index); ret_code = LTTNG_ERR_NO_CONSUMER; } @@ -484,13 +484,14 @@ int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream, struct lttng_ust_shm_handle *handle; struct lttng_ust_lib_ring_buffer *buf; char dummy; - ssize_t readlen; DBG("In read_subbuffer (wait_fd: %d, stream key: %d)", stream->wait_fd, stream->key); /* We can consume the 1 byte written into the wait_fd by UST */ if (!stream->hangup_flush_done) { + ssize_t readlen; + do { readlen = read(stream->wait_fd, &dummy, 1); } while (readlen == -1 && errno == EINTR); @@ -539,9 +540,13 @@ int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream, (ret != len && stream->net_seq_idx == -1)) { /* * Display the error but continue processing to try to release the - * subbuffer + * subbuffer. This is a DBG statement since any unexpected kill or + * signal, the application gets unregistered, relayd gets closed or + * anything that affects the buffer lifetime will trigger this error. + * So, for the sake of the user, don't print this error since it can + * happen and it is OK with the code flow. */ - ERR("Error writing to tracefile " + DBG("Error writing to tracefile " "(ret: %zd != len: %lu != subbuf_size: %lu)", ret, len, subbuf_size); }