This assert sometimes triggers in
tests/regression/tools/crash/test_crash: test_shm_path_per_pid_sigint
because the destroy is performed when there is still unflushed data in
the buffers. The destroy performs a chunk close on the consumer daemon,
which effectively sets the channel chunk to NULL, while there are still
references to the chunk in the streams (which are still active).
Change the assertion in the stream read to validate that stream chunk !=
NULL instead.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
/* RCU lock for the relayd pointer */
rcu_read_lock();
-
assert(stream->net_seq_idx != (uint64_t) -1ULL ||
- stream->chan->trace_chunk);
+ stream->trace_chunk);
/* Flag that the current stream if set for network streaming. */
if (stream->net_seq_idx != (uint64_t) -1ULL) {