https://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912021-11-30T12:46:51ZLTTng bugs repositoryLTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39782021-11-30T12:46:51ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<ul></ul><p>Can you reproduce this easily?</p>
<p>If so, can you try with this chain of commits : <a class="external" href="https://review.lttng.org/c/lttng-tools/+/6821/5">https://review.lttng.org/c/lttng-tools/+/6821/5</a></p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39792021-11-30T12:58:43ZSimon Marchisimon.marchi@polymtl.ca
<ul></ul><p>Francis Deslauriers wrote in <a href="#note-1">#note-1</a>:</p>
<blockquote>
<p>Can you reproduce this easily?</p>
<p>If so, can you try with this chain of commits : <a class="external" href="https://review.lttng.org/c/lttng-tools/+/6821/5">https://review.lttng.org/c/lttng-tools/+/6821/5</a></p>
</blockquote>
<p>It still reproduces with this branch.</p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39802021-11-30T13:45:11ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<ul></ul><p>I was able to reproduce this issue trivially.<br />Here is the backtrace of the assert:<br /><pre>
Thread 8 (Thread 0x7fffeeffd700 (LWP 167040) "lttng-relayd"):
#0 0x00007ffff7b1618b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7af5859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff7af5729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff7b06f36 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00005555555889bb in viewer_session_attach (vsession=0x7fffdc001400, session=session@entry=0x7fffe8001180) at viewer-session.c:80
#5 0x000055555557bcff in viewer_attach_session (conn=0x7fffd0001140) at live.c:1275
#6 process_control (conn=0x7fffd0001140, recv_hdr=0x7fffeeffcaf0) at live.c:2341
#7 thread_worker (data=<optimized out>) at live.c:2515
#8 0x00007ffff7ccd609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007ffff7bf2293 in clone () from /lib/x86_64-linux-gnu/libc.so.6
</pre></p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39812021-11-30T14:05:32ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<ul><li><strong>File</strong> <a href="/attachments/528">relayd.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/528/relayd.log">relayd.log</a> added</li><li><strong>File</strong> <a href="/attachments/529">bt2.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/529/bt2.log">bt2.log</a> added</li></ul><p>Here are the logs of the Relayd and Babeltrace2 recorded while reproducing this issue.</p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39822021-11-30T14:18:08ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<ul></ul><p>The issue can be reproduce without python.<br />It seems that using both kernel and ust tracing is triggering the issue.<br /><pre>
#!/bin/bash
lttng create py_syscalls --live
lttng enable-event -u -a
lttng enable-event -k -a
lttng start
babeltrace2 net://localhost/host/raton/py_syscalls
</pre></p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39832021-11-30T14:27:16ZJonathan Rajotte Julienjonathan.rajotte-julien@efficios.com
<ul></ul><p>Seems like we just hit a major testing gap here.</p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39882021-12-02T22:32:07ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul><p>This assert appears to be entirely wrong.</p>
<p>It checks that the "viewer session" has a NULL current trace chunk when attaching a session to a viewer session, but in the case where a viewer session has multiple sessions (e.g. with kernel and ust tracing combined), we are attaching each session individually to the viewer session, and we set the current trace chunk of the viewer session when we attach the first session to it.</p>
<p>So it is expected to be non-NULL when attaching the second session.</p>
<p>I suspect we just want to remove this assert:</p>
<pre>
--- a/src/bin/lttng-relayd/viewer-session.cpp
+++ b/src/bin/lttng-relayd/viewer-session.cpp
@@ -77,7 +77,6 @@ enum lttng_viewer_attach_return_code viewer_session_attach(
} else {
int ret;
- LTTNG_ASSERT(!vsession->current_trace_chunk);
session->viewer_attached = true;
ret = viewer_session_set_trace_chunk_copy(vsession,
</pre> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39892021-12-02T22:36:58ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul></ul><p>Please review this fix on gerrit:</p>
<p><a class="external" href="https://review.lttng.org/c/lttng-tools/+/6859">https://review.lttng.org/c/lttng-tools/+/6859</a> Fix: relayd: `!vsession->current_trace_chunk` assertion failed</p> LTTng-tools - Bug #1335: lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/1335?journal_id=39952021-12-08T21:20:05ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Fix: relayd: `!vsession->current_trace_chunk` assertion failed Observed issue ============== Wh..." href="https://bugs.lttng.org/projects/lttng-tools/repository/lttng-tools/revisions/4381dda7ec8705f7eacf5c1b34eaea861a72b3e6">lttng-tools|4381dda7ec8705f7eacf5c1b34eaea861a72b3e6</a>.</p>