Fix: remove assertions of the existence of a trace chunk
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 1 Aug 2019 20:37:15 +0000 (16:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 20:39:14 +0000 (16:39 -0400)
A session can have no trace chunk on the session daemon and
consumer daemon end whenever its ouput is remote (relayd) and
doesn't support trace chunks.

The assertions removed as part of this patch are overly strict
considering that there are valid cases when trace_chunk can
be NULL.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/consumer.c
src/common/consumer/consumer.c

index 9246dc7ced5045986363355a4e67bcc30c151110..9c178f5fae87346bb7d2ca4980652fe476390a32 100644 (file)
@@ -893,10 +893,6 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg,
        msg->u.ask_channel.buffer_credentials.uid = UINT32_MAX;
        msg->u.ask_channel.buffer_credentials.gid = UINT32_MAX;
 
-       if (monitor) {
-               assert(trace_chunk);
-       }
-
         if (trace_chunk) {
                uint64_t chunk_id;
                enum lttng_trace_chunk_status chunk_status;
index 3896875f50e999076b2296829e19eab5f665ad5c..948a81d804428a01582b0466cb2e7433eb87dc4e 100644 (file)
@@ -1726,7 +1726,8 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap(
        /* RCU lock for the relayd pointer */
        rcu_read_lock();
 
-       assert(stream->chan->trace_chunk);
+       assert(stream->net_seq_idx != (uint64_t) -1ULL ||
+                       stream->chan->trace_chunk);
 
        /* Flag that the current stream if set for network streaming. */
        if (stream->net_seq_idx != (uint64_t) -1ULL) {
This page took 0.029472 seconds and 4 git commands to generate.