LTTng bugs repository: Issueshttps://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912023-09-18T20:16:39ZLTTng bugs repository
Redmine Babeltrace - Bug #1389 (New): src.ctf.fs crash with invalid tracehttps://bugs.lttng.org/issues/13892023-09-18T20:16:39ZSimon Marchisimon.marchi@polymtl.ca
<p>Using the attached trace, I get:</p>
<pre>
$ ./src/cli/babeltrace2 trace
09-18 16:15:58.978 335803 335803 E PLUGIN/CTF/MSG-ITER ctf_msg_iter_get_next_message@msg-iter.cpp:2715 [auto-disc-source-ctf-fs] Cannot handle state: msg-it-addr=0x613000000580, state=DSCOPE_EVENT_PAYLOAD_CONTINUE
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:63 Babeltrace 2 library postcondition not satisfied.
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:65 ------------------------------------------------------------------------
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:66 Condition ID: `post:message-iterator-class-next-method:no-error-if-no-error-status`.
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:68 Function: bt_message_iterator_class_next_method().
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:69 ------------------------------------------------------------------------
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:70 Error is:
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:72 Current thread has an error, but user function returned a non-error status: status=OK
09-18 16:15:58.978 335803 335803 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:75 Aborting...
</pre> Babeltrace - Bug #1388 (New): Assertion `this->active_stream_iter == 0` failedhttps://bugs.lttng.org/issues/13882023-09-08T18:57:03ZSimon Marchisimon.marchi@polymtl.ca
<p>Steps:</p>
<ol>
<li><code>lttng create my-session --live</code></li>
<li><code>lttng enable-event -u -a</code></li>
<li><code>lttng start</code></li>
<li><code>./src/cli/babeltrace2 'net://127.0.0.1/host/smarchi-efficios/my-session'</code></li>
<li>Run the hello app from the lttng-ust tests: <code>lttng-ust/tests/hello/hello</code></li>
<li>While events print on the babeltrace terminal, type ctrl-C</li>
</ol>
<p>I get:</p>
<p><code> (╯°□°)╯︵ ┻━┻ /home/smarchi/src/babeltrace/src/plugins/ctf/lttng-live/lttng-live.cpp:214: ~lttng_live_msg_iter(): Assertion `this->active_stream_iter == 0` failed.</code></p> LTTng-tools - Bug #1335 (Resolved): lttng-relayd: `!vsession->current_trace_chunk` assertion failedhttps://bugs.lttng.org/issues/13352021-11-30T03:59:52ZSimon Marchisimon.marchi@polymtl.ca
<p>I am trying to reproduce the scenario 2 of <a class="external" href="https://github.com/jgalar/PyConCanada2017/">https://github.com/jgalar/PyConCanada2017/</a></p>
<p>The commands used to start the session are:</p>
<pre>
# Create a live session
lttng create py_syscalls --live
# Enable all Python agent (logger) events
lttng track --userspace --pid $1
lttng enable-event --python --all
# Enable all syscalls invoked by python
lttng track --kernel --pid $1
lttng enable-event --kernel --syscall --all
lttng start
</pre>
<p>where $1 is normally the pid of a Python http server, but I was able to reproduce using the pid of a dummy /bin/sleep process.</p>
<p>After running the commands above, I connect with babeltrace or babeltrace2:</p>
<pre>
[root@simark PyConCanada2017]# babeltrace -i lttng-live net://localhost/host/simark/py_syscalls
[error] Remote side has closed connection
[warning] [Context] Cannot open_trace of format lttng-live at path net://localhost/host/simark/py_syscalls.
[warning] [Context] cannot open trace "net://localhost/host/simark/py_syscalls" for reading.
[error] opening trace "net://localhost/host/simark/py_syscalls" for reading.
[error] none of the specified trace paths could be opened.
</pre>
<pre>
[root@simark PyConCanada2017]# babeltrace2 net://localhost/host/simark/py_syscalls
11-29 22:56:32.275 719277 719277 E PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER lttng_live_recv@viewer-connection.c:197 [auto-disc-source-ctf-lttng-live] Remote side has closed connection
11-29 22:56:32.275 719277 719277 E PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER lttng_live_session_attach@viewer-connection.c:1106 [auto-disc-source-ctf-lttng-live] Error receiving attach session reply
11-29 22:56:32.275 719277 719277 E PLUGIN/SRC.CTF.LTTNG-LIVE lttng_live_get_session@lttng-live.c:477 [auto-disc-source-ctf-lttng-live] Error attaching to LTTng live session
11-29 22:56:32.275 719277 719277 E PLUGIN/SRC.CTF.LTTNG-LIVE lttng_live_msg_iter_next@lttng-live.c:1662 [auto-disc-source-ctf-lttng-live] Error preparing the next batch of messages: live-iter-status=LTTNG_LIVE_ITERATOR_STATUS_ERROR11-29 22:56:32.275 719277 719277 W LIB/MSG-ITER bt_message_iterator_next@iterator.c:861 Component input port message iterator's "next" method failed: iter-addr=0x56536acf7250, iter-upstream-comp-name="auto-disc-source-ctf-lttng-live", iter-upstream-comp-log-level=WARNING, iter-upstream-comp-class-type=SOURCE, iter-upstream-comp-class-name="lttng-live", iter-upstream-comp-class-partial-descr="Connect to an LTTng relay daemon", iter-upstream-port-type=OUTPUT, iter-upstream-port-name="out", status=ERROR
11-29 22:56:32.275 719277 719277 E PLUGIN/FLT.UTILS.MUXER muxer_upstream_msg_iter_next@muxer.c:452 [muxer] Upstream iterator's next method returned an error: status=ERROR
11-29 22:56:32.275 719277 719277 E PLUGIN/FLT.UTILS.MUXER validate_muxer_upstream_msg_iters@muxer.c:986 [muxer] Cannot validate muxer's upstream message iterator wrapper: muxer-msg-iter-addr=0x56536acf6da0, muxer-upstream-msg-iter-wrap-addr=0x56536acf9f10
11-29 22:56:32.275 719277 719277 E PLUGIN/FLT.UTILS.MUXER muxer_msg_iter_next@muxer.c:1411 [muxer] Cannot get next message: comp-addr=0x56536acfa680, muxer-comp-addr=0x56536acfc260, muxer-msg-iter-addr=0x56536acf6da0, msg-iter-addr=0x56536acf7510, status=ERROR
11-29 22:56:32.275 719277 719277 W LIB/MSG-ITER bt_message_iterator_next@iterator.c:861 Component input port message iterator's "next" method failed: iter-addr=0x56536acf7510, iter-upstream-comp-name="muxer", iter-upstream-comp-log-level=WARNING, iter-upstream-comp-class-type=FILTER, iter-upstream-comp-class-name="muxer", iter-upstream-comp-class-partial-descr="Sort messages from multiple inpu", iter-upstream-port-type=OUTPUT, iter-upstream-port-name="out", status=ERROR
11-29 22:56:32.275 719277 719277 W LIB/GRAPH consume_graph_sink@graph.c:469 Component's "consume" method failed: status=ERROR, comp-addr=0x56536ad2a6f0, comp-name="pretty", comp-log-level=WARNING, comp-class-type=SINK, comp-class-name="pretty", comp-class-partial-descr="Pretty-print messages (`text` fo", comp-class-is-frozen=0, comp-class-so-handle-addr=0x56536ad2c4d0, comp-class-so-handle-path="/usr/lib/babeltrace2/plugins/babeltrace-plugin-text.so", comp-input-port-count=1, comp-output-port-count=0
11-29 22:56:32.275 719277 719277 E CLI cmd_run@babeltrace2.c:2547 Graph failed to complete successfully
ERROR: [Babeltrace CLI] (babeltrace2.c:2547)
Graph failed to complete successfully
CAUSED BY [libbabeltrace2] (graph.c:469)
Component's "consume" method failed: status=ERROR, comp-addr=0x56536ad2a6f0, comp-name="pretty", comp-log-level=WARNING, comp-class-type=SINK,
comp-class-name="pretty", comp-class-partial-descr="Pretty-print messages (`text` fo", comp-class-is-frozen=0, comp-class-so-handle-addr=0x56536ad2c4d0,
comp-class-so-handle-path="/usr/lib/babeltrace2/plugins/babeltrace-plugin-text.so", comp-input-port-count=1, comp-output-port-count=0
CAUSED BY [libbabeltrace2] (iterator.c:861)
Component input port message iterator's "next" method failed: iter-addr=0x56536acf7510, iter-upstream-comp-name="muxer",
iter-upstream-comp-log-level=WARNING, iter-upstream-comp-class-type=FILTER, iter-upstream-comp-class-name="muxer",
iter-upstream-comp-class-partial-descr="Sort messages from multiple inpu", iter-upstream-port-type=OUTPUT, iter-upstream-port-name="out", status=ERROR
CAUSED BY [muxer: 'filter.utils.muxer'] (muxer.c:986)
Cannot validate muxer's upstream message iterator wrapper: muxer-msg-iter-addr=0x56536acf6da0, muxer-upstream-msg-iter-wrap-addr=0x56536acf9f10
CAUSED BY [muxer: 'filter.utils.muxer'] (muxer.c:452)
Upstream iterator's next method returned an error: status=ERROR
CAUSED BY [libbabeltrace2] (iterator.c:861)
Component input port message iterator's "next" method failed: iter-addr=0x56536acf7250, iter-upstream-comp-name="auto-disc-source-ctf-lttng-live",
iter-upstream-comp-log-level=WARNING, iter-upstream-comp-class-type=SOURCE, iter-upstream-comp-class-name="lttng-live",
iter-upstream-comp-class-partial-descr="Connect to an LTTng relay daemon", iter-upstream-port-type=OUTPUT, iter-upstream-port-name="out", status=ERROR
CAUSED BY [auto-disc-source-ctf-lttng-live: 'source.ctf.lttng-live'] (lttng-live.c:1662)
Error preparing the next batch of messages: live-iter-status=LTTNG_LIVE_ITERATOR_STATUS_ERROR
CAUSED BY [auto-disc-source-ctf-lttng-live: 'source.ctf.lttng-live'] (lttng-live.c:477)
Error attaching to LTTng live session
CAUSED BY [auto-disc-source-ctf-lttng-live: 'source.ctf.lttng-live'] (viewer-connection.c:1106)
Error receiving attach session reply
CAUSED BY [auto-disc-source-ctf-lttng-live: 'source.ctf.lttng-live'] (viewer-connection.c:197)
Remote side has closed connection
</pre>
<p>In both cases, lttng-relay shows:</p>
<pre>
[root@simark ~]# lttng-relayd
Warning: No tracing group detected
lttng-relayd: /home/simark/src/lttng-tools/src/bin/lttng-relayd/viewer-session.c:80: viewer_session_attach: Assertion `!vsession->current_trace_chunk' failed.
Aborted (core dumped)
</pre>
<p>I don't know much about lttng-relayd, so I wasn't able to debug much, but I saw that the relayd received the command LTTNG_VIEWER_ATTACH_SESSION twice, and the second time around, current_trace_chunk was not NULL (it was set the first time).</p> Babeltrace - Bug #1334 (New): Python component class memory leakhttps://bugs.lttng.org/issues/13342021-11-30T02:49:51ZSimon Marchisimon.marchi@polymtl.ca
<p>I saw this memory leak when working on a Python sink:</p>
<pre>
/tmp/babeltrace/bin/babeltrace2 --plugin-path=$PWD net://localhost/host/simark/py_logging -c sink.hello.Hello
11-29 21:49:09.490 566263 566263 W BT2-PY log_exception_and_maybe_append_cause@native_bt_log_and_append_error.h:204 [sink.hello.Hello] Traceback (most recent call last):
File "/home/simark/src/PyConCanada2017/bt_plugin_foo.py", line 10, in _user_consume
raise ValueError("hi")
ValueError: hi
11-29 21:49:09.490 566263 566263 W LIB/GRAPH consume_graph_sink@graph.c:462 Component's "consume" method failed: status=ERROR, comp-addr=0x60c000066ac0, comp-name="sink.hello.Hello", comp-log-level=WARNING, comp-class-type=SINK, comp-class-name="Hello", comp-class-partial-descr="", comp-class-is-frozen=1, comp-input-port-count=1, comp-output-port-count=0
11-29 21:49:09.490 566263 566263 E CLI cmd_run@babeltrace2.c:2537 Graph failed to complete successfully
ERROR: [Babeltrace CLI] (/home/simark/src/babeltrace/src/cli/babeltrace2.c:2537)
Graph failed to complete successfully
CAUSED BY [libbabeltrace2] (/home/simark/src/babeltrace/src/lib/graph/graph.c:462)
Component's "consume" method failed: status=ERROR, comp-addr=0x60c000066ac0, comp-name="sink.hello.Hello", comp-log-level=WARNING, comp-class-type=SINK,
comp-class-name="Hello", comp-class-partial-descr="", comp-class-is-frozen=1, comp-input-port-count=1, comp-output-port-count=0
CAUSED BY [sink.hello.Hello: 'sink.hello.Hello'] (/home/simark/src/babeltrace/src/bindings/python/bt2/bt2/native_bt_log_and_append_error.h:102)
Traceback (most recent call last):
File "/home/simark/src/PyConCanada2017/bt_plugin_foo.py", line 10, in _user_consume
raise ValueError("hi")
ValueError: hi
=================================================================
==566263==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 184 byte(s) in 1 object(s) allocated from:
#0 0x7f10290c2459 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f1028d48121 in g_malloc0 (/usr/lib/libglib-2.0.so.0+0x5d121)
#2 0x7f1024605c08 in bt_bt2_component_class_sink_create /home/simark/src/babeltrace/src/bindings/python/bt2/bt2/native_bt_component_class.i.h:1485
#3 0x7f1024622599 in _wrap_bt2_component_class_sink_create bt2/native_bt.c:7300
#4 0x7f1025090c37 (/usr/lib/libpython3.9.so.1.0+0x148c37)
SUMMARY: AddressSanitizer: 184 byte(s) leaked in 1 allocation(s).
</pre>
<p>The file containing the component class:</p>
<pre>
import bt2
@bt2.plugin_component_class
class Hello(bt2._UserSinkComponent):
def __init__(self, config, params, obj):
self._port = self._add_input_port("port")
def _user_consume(self):
raise ValueError("hi")
bt2.register_plugin(__name__, "hello")
</pre> Babeltrace - Bug #1333 (New): Crash on invalid argument sequencehttps://bugs.lttng.org/issues/13332021-11-30T02:13:01ZSimon Marchisimon.marchi@polymtl.ca
<p>I tried this (non-sensical) argument sequence, and I get a crash:</p>
<p>$ /tmp/babeltrace/bin/babeltrace2 tourlou --plugin-path=$PWD list-plugins <br />[1] 561573 abort (core dumped) /tmp/babeltrace/bin/babeltrace2 tourlou --plugin-path=$PWD list-plugins</p>
<pre>
(gdb) bt
#0 0x00007ffff70f5d22 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff70df862 in abort () from /usr/lib/libc.so.6
#2 0x00005555555b56e4 in bt_common_abort () at /home/simark/src/babeltrace/src/common/common.c:2111
#3 0x0000555555597500 in bt_config_convert_from_args (argc=3, argv=0x7fffffffdec0, cfg_out=0x7fffffffdd60, plugin_paths=0x606000000140, default_log_level=0x7fffffffdc20, interrupter=0x6060000000e0, consumed_args=1) at /home/simark/src/babeltrace/src/cli/babeltrace2-cfg-cli-args.c:3737
#4 0x000055555559d2ba in bt_config_cli_args_create (argc=4, argv=0x7fffffffdeb8, cfg=0x7fffffffdd60, omit_system_plugin_path=false, omit_home_plugin_path=false, initial_plugin_paths=0x0, interrupter=0x6060000000e0) at /home/simark/src/babeltrace/src/cli/babeltrace2-cfg-cli-args.c:4951
#5 0x00005555555a0d61 in bt_config_cli_args_create_with_default (argc=4, argv=0x7fffffffdeb8, cfg=0x7fffffffdd60, interrupter=0x6060000000e0) at /home/simark/src/babeltrace/src/cli/babeltrace2-cfg-cli-args-default.c:70
#6 0x0000555555583dc1 in main (argc=4, argv=0x7fffffffdeb8) at /home/simark/src/babeltrace/src/cli/babeltrace2.c:2642
</pre>
<p>It's this abort: <a class="external" href="https://github.com/efficios/babeltrace/blob/7cf80be345190813bcd972b7688bcb928e58224d/src/cli/babeltrace2-cfg-cli-args.c#L3737">https://github.com/efficios/babeltrace/blob/7cf80be345190813bcd972b7688bcb928e58224d/src/cli/babeltrace2-cfg-cli-args.c#L3737</a></p> LTTng-UST - Feature #1327 (Resolved): Behavior when failing to dlopen lttng-ust librarieshttps://bugs.lttng.org/issues/13272021-10-04T20:51:08ZSimon Marchisimon.marchi@polymtl.ca
<p>When debugging the problem described in <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Tracing doesn't work because liblttng-ust-tracepoint.so.1 is not in dynamic linker path (Won't fix)" href="https://bugs.lttng.org/issues/1326">#1326</a>, I tried setting LTTNG_UST_DEBUG, but didn't see a mention of something going wrong. We should look into what we do when dlopen'ing lttng-ust libraries fails, such as here:</p>
<p><a class="external" href="https://github.com/lttng/lttng-ust/blob/81b2d23800224648edd5850dd43b78d00b668a5e/include/lttng/tracepoint.h#L404-L408">https://github.com/lttng/lttng-ust/blob/81b2d23800224648edd5850dd43b78d00b668a5e/include/lttng/tracepoint.h#L404-L408</a></p>
<p>Currently, we silently fail. All the user sees is that tracing doesn't work, and it's quite difficult to know why.</p> LTTng-UST - Feature #1326 (Won't fix): Tracing doesn't work because liblttng-ust-tracepoint.so.1 ...https://bugs.lttng.org/issues/13262021-10-04T20:47:44ZSimon Marchisimon.marchi@polymtl.ca
<p>I started looking at this because of <code>tests/regression/ust/multi-lib/test_multi_lib</code> failing in my lttng-tools development tree. I install the development builds of urcu and lttng-ust in <code>/tmp/lttng</code>, and <code>/tmp/lttng/lib</code> is not part of my dynamic linker's default lookup path.</p>
<p>The multi-lib test consists of an application defining tracepoints, but not probes, and a shared library containing probes. So the application does not link directly with <code>liblttng-ust-tracepoint.so</code>, only the shared library does. When the application starts, an <code>lttng-ust</code>-provided constructor tries to dlopen <code>liblttng-ust-tracepoint.so.1</code> (<a class="external" href="https://github.com/lttng/lttng-ust/blob/81b2d23800224648edd5850dd43b78d00b668a5e/include/lttng/tracepoint.h#L404-L408">https://github.com/lttng/lttng-ust/blob/81b2d23800224648edd5850dd43b78d00b668a5e/include/lttng/tracepoint.h#L404-L408</a>) in order to register tracepoints. Since <code>liblttng-ust-tracepoint.so.1</code> is in <code>/tmp/lttng/lib</code>, not in the dynamic linker's path, the dlopen fails, the application's tracepoints are not registered, and those tracepoints never work.</p>
<p>Fixing it requires setting LD_LIBRARY_PATH or using -rpath.</p>
<p>I think it would make sense to try to dlopen <code>liblttng-ust-tracepoint.so.1</code> by absolute path directly, in this case <code>/tmp/lttng/lib/liblttng-ust-tracepoint.so.1</code>.</p> LTTng-tools - Bug #1302 (New): Bad handling of invalid saved session fileshttps://bugs.lttng.org/issues/13022021-04-02T19:41:56ZSimon Marchisimon.marchi@polymtl.ca
<p>When one file in <code>~/.lttng/sessions</code> can't be parsed or doesn't validate, it makes it impossible to load any session. The file may not validate because it is corrupted, or it was created using a more recent LTTng version that produces new attributes unknown to the LTTng version being used for the load.</p>
<p>To reproduce:</p>
<p>1. Save two sessions: <code>lttng create working && lttng save && lttng destroy && lttng create broken && lttng save && lttng destroy</code><br />2. That should create two files in <code>~/.lttng/sessions</code><br />3. Manually make <code>~/.lttng/sessions/broken.lttng</code> unreadable, for example by replacing <code><started>false</started></code> with <code><started>tourlou</started></code>.<br />4. Try to load session <code>working</code> with <code>lttng load working</code></p>
<p>This is what I get:</p>
<pre>
$ lttng load working
XML Error: Element 'started': 'tourlou' is not a valid value of the atomic type 'xs:boolean'.
Error: Session configuration file validation failed
Session working has been loaded successfully
</pre>
<p>Things to note:</p>
<ul>
<li>the various error/warning messages should mention the file name</li>
<li>"Error: Session configuration file validation failed" should probably say "Warning", otherwise it sounds like it's a showstopper</li>
<li>I would also finish that last message with something like ", skipping." to show that lttng keeps looking for a session with the name <code>working</code> (if that's indeed the intended behavior, I'm not sure)</li>
<li>Even though it says <code>Session working has been loaded successfully</code>, it's not true:</li>
</ul>
<pre>
$ lttng list
Currently no available tracing session
</pre> Babeltrace - Bug #1295 (New): Copy-pasto in bt_value_map_borrow_entry_value dochttps://bugs.lttng.org/issues/12952020-12-15T05:54:56ZSimon Marchisimon.marchi@polymtl.ca
<p>Here:</p>
<p><a class="external" href="https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-val.html#gaf3e38ff6931760cf4dc56ca0c8354f02">https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-val.html#gaf3e38ff6931760cf4dc56ca0c8354f02</a></p>
<p>It says <code>value is an array value (bt_value_is_array() returns BT_TRUE).</code>. Should be map, not array.</p> Babeltrace - Bug #1293 (New): Use after free in sink.ctf.fs finalizehttps://bugs.lttng.org/issues/12932020-12-02T21:27:04ZSimon Marchisimon.marchi@polymtl.ca
<p>I run this:</p>
<pre>./src/cli/babeltrace2 ~/lttng-traces/auto-20200318-221703 -c sink.ctf.fs -p 'path="/tmp/yo"'</pre>
<p>and interrupt with with ^C while it's running. I get:</p>
<pre>
➜ babeltrace ./src/cli/babeltrace2 ~/lttng-traces/auto-20200318-221703 -c sink.ctf.fs -p 'path="/tmp/yo"'
^C=================================================================
==1611811==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000001de8 at pc 0x7faa59a98c13 bp 0x7fff9f10b9b0 sp 0x7fff9f10b9a0
READ of size 8 at 0x60d000001de8 thread T0
#0 0x7faa59a98c12 in bt_trace_get_environment_entry_count /home/simark/src/babeltrace/src/lib/trace-ir/trace.c:345
#1 0x7faa5663faed in translate_trace_ctf_ir_to_tsdl /home/simark/src/babeltrace/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c:935
#2 0x7faa566496f4 in fs_sink_trace_destroy /home/simark/src/babeltrace/src/plugins/ctf/fs-sink/fs-sink-trace.c:499
#3 0x7faa598959d1 (/usr/lib/libglib-2.0.so.0+0x3c9d1)
#4 0x7faa5989663a in g_hash_table_remove_all (/usr/lib/libglib-2.0.so.0+0x3d63a)
#5 0x7faa59899d5e in g_hash_table_destroy (/usr/lib/libglib-2.0.so.0+0x40d5e)
#6 0x7faa5662a894 in destroy_fs_sink_comp /home/simark/src/babeltrace/src/plugins/ctf/fs-sink/fs-sink.c:132 #7 0x7faa5663161b in ctf_fs_sink_finalize /home/simark/src/babeltrace/src/plugins/ctf/fs-sink/fs-sink.c:1141
#8 0x7faa59a2f50b in finalize_component /home/simark/src/babeltrace/src/lib/graph/component.c:97 #9 0x7faa59a2f87a in destroy_component /home/simark/src/babeltrace/src/lib/graph/component.c:148
#10 0x7faa59a340e2 in bt_object_try_spec_release /home/simark/src/babeltrace/src/lib/object.h:145 #11 0x7faa5987765f (/usr/lib/libglib-2.0.so.0+0x1e65f)
#12 0x7faa59a34ee6 in destroy_graph /home/simark/src/babeltrace/src/lib/graph/graph.c:103
#13 0x7faa59a346af in bt_object_put_ref_no_null_check /home/simark/src/babeltrace/src/lib/object.h:307
#14 0x7faa59a34800 in bt_object_put_ref /home/simark/src/babeltrace/src/lib/object.h:335 #15 0x7faa59a3adb4 in bt_graph_put_ref /home/simark/src/babeltrace/src/lib/graph/graph.c:1331
#16 0x55e2ffb90c67 in cmd_run_ctx_destroy /home/simark/src/babeltrace/src/cli/babeltrace2.c:1685 #17 0x55e2ffb95d9e in cmd_run /home/simark/src/babeltrace/src/cli/babeltrace2.c:2538
#18 0x55e2ffb96a99 in main /home/simark/src/babeltrace/src/cli/babeltrace2.c:2673
#19 0x7faa59696151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#20 0x55e2ffb87fdd in _start (/home/simark/build/babeltrace/src/cli/.libs/lt-babeltrace2+0x1ffdd)
0x60d000001de8 is located 104 bytes inside of 144-byte region [0x60d000001d80,0x60d000001e10)
freed by thread T0 here:
#0 0x7faa59c1c0e9 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:123
#1 0x7faa59a97b4a in destroy_trace /home/simark/src/babeltrace/src/lib/trace-ir/trace.c:143
#2 0x7faa59a90621 in bt_object_put_ref_no_null_check /home/simark/src/babeltrace/src/lib/object.h:307
#3 0x7faa59a8ff99 in bt_object_with_parent_release_func /home/simark/src/babeltrace/src/lib/object.h:178
#4 0x7faa59a8b329 in bt_object_put_ref_no_null_check /home/simark/src/babeltrace/src/lib/object.h:307
#5 0x7faa59a8c2f1 in bt_packet_recycle /home/simark/src/babeltrace/src/lib/trace-ir/packet.c:131
#6 0x7faa59a8b329 in bt_object_put_ref_no_null_check /home/simark/src/babeltrace/src/lib/object.h:307
#7 0x7faa59a8b47a in bt_object_put_ref /home/simark/src/babeltrace/src/lib/object.h:335
#8 0x7faa59a8ccc4 in bt_packet_put_ref /home/simark/src/babeltrace/src/lib/trace-ir/packet.c:236
#9 0x7faa56643f48 in fs_sink_stream_destroy /home/simark/src/babeltrace/src/plugins/ctf/fs-sink/fs-sink-stream.c:39
#10 0x7faa598959d1 (/usr/lib/libglib-2.0.so.0+0x3c9d1)
previously allocated by thread T0 here:
#0 0x7faa59c1c639 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7faa598a9641 in g_malloc0 (/usr/lib/libglib-2.0.so.0+0x50641)
#2 0x7faa566568b8 in ctf_fs_trace_create /home/simark/src/babeltrace/src/plugins/ctf/fs-src/fs.c:1080
#3 0x7faa566572b0 in ctf_fs_component_create_ctf_fs_trace_one_path /home/simark/src/babeltrace/src/plugins/ctf/fs-src/fs.c:1183
#4 0x7faa5665be1d in ctf_fs_component_create_ctf_fs_trace /home/simark/src/babeltrace/src/plugins/ctf/fs-src/fs.c:2097
#5 0x7faa5665dff0 in ctf_fs_create /home/simark/src/babeltrace/src/plugins/ctf/fs-src/fs.c:2397
#6 0x7faa5665e172 in ctf_fs_init /home/simark/src/babeltrace/src/plugins/ctf/fs-src/fs.c:2431
#7 0x7faa59a39c15 in add_component_with_init_method_data /home/simark/src/babeltrace/src/lib/graph/graph.c:1048
#8 0x7faa59a3a2fb in add_source_component_with_initialize_method_data /home/simark/src/babeltrace/src/lib/graph/graph.c:1127
#9 0x7faa59a3a3a2 in bt_graph_add_source_component /home/simark/src/babeltrace/src/lib/graph/graph.c:1152
#10 0x55e2ffb94343 in cmd_run_ctx_create_components_from_config_components /home/simark/src/babeltrace/src/cli/babeltrace2.c:2252
#11 0x55e2ffb94ff7 in cmd_run_ctx_create_components /home/simark/src/babeltrace/src/cli/babeltrace2.c:2347
#12 0x55e2ffb95825 in cmd_run /home/simark/src/babeltrace/src/cli/babeltrace2.c:2461
#13 0x55e2ffb96a99 in main /home/simark/src/babeltrace/src/cli/babeltrace2.c:2673
#14 0x7faa59696151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
SUMMARY: AddressSanitizer: heap-use-after-free /home/simark/src/babeltrace/src/lib/trace-ir/trace.c:345 in bt_trace_get_environment_entry_count
</pre> Babeltrace - Bug #1254 (New): Trace with non-monotonic clocks make babeltrace2 aborthttps://bugs.lttng.org/issues/12542020-04-07T20:08:37ZSimon Marchisimon.marchi@polymtl.ca
<p>The trace as attachment here: <a class="external" href="https://www.eclipse.org/lists/tracecompass-dev/msg01505.html">https://www.eclipse.org/lists/tracecompass-dev/msg01505.html</a><br />... and the trace here: <a class="external" href="https://filebin.net/8bbv15rl60da6s9g/example.tgz?t=o3y9sgrz">https://filebin.net/8bbv15rl60da6s9g/example.tgz?t=o3y9sgrz</a></p>
<p>... both make babeltrace2 abort with:</p>
<pre>
$ ./src/cli/babeltrace2 /home/simark/Downloads/une-trace
04-07 15:43:15.359 2011726 2011726 F LIB/MSG-ITER call_iterator_next_method@iterator.c:815 Babeltrace 2 library postcondition not satisfied; error is:
04-07 15:43:15.359 2011726 2011726 F LIB/MSG-ITER call_iterator_next_method@iterator.c:815 Clock snapshots are not monotonic
04-07 15:43:15.359 2011726 2011726 F LIB/MSG-ITER call_iterator_next_method@iterator.c:815 Aborting...
[1] 2011726 abort (core dumped) ./src/cli/babeltrace2 /home/simark/Downloads/une-trace
</pre>
<p>This should at least be reported as an error.</p> LTTng-tools - Bug #1248 (New): filter-parser.y creates creates wrong ast for `hello[1][2]`https://bugs.lttng.org/issues/12482020-03-31T03:15:31ZSimon Marchisimon.marchi@polymtl.ca
<p>When parsing the expression <code>hello[1][2]</code>, the filter parser creates a node representing the <code>[1]</code>, but not one for the <code>[2]</code>. So it appears gives exactly the same AST (and therefore IR at the following step) as when parsing <code>hello[1]</code>.</p> LTTng-tools - Bug #1246 (Resolved): --filter expression parser accepts foo[bar]https://bugs.lttng.org/issues/12462020-03-19T21:43:03ZSimon Marchisimon.marchi@polymtl.ca
<p>According to the doc, it is only possible to access arrays elements using positive literal integer numbers. However, the parser accepts:</p>
<pre>./lttng enable-event -u -a --filter 'allo[toi] == 2'</pre>
<p>Internally, <code>create_load_expression</code> creates a <code>ir_load_expression_op</code> node with type <code>IR_LOAD_EXPRESSION_GET_INDEX</code>. However, the associated index value is the value of the pointer to the <code>toi</code> string, interpreted as an unsigned integer by <code>visit_node_load_expression</code> when generating the bytecode.</p>
<p>I think this user error should be caught earlier and result in an error on the client side.</p> Userspace RCU - Feature #1186 (Resolved): Implement a "--enable-werror" configure optionhttps://bugs.lttng.org/issues/11862019-05-27T14:42:02ZSimon Marchisimon.marchi@polymtl.ca
<p>Commit: 5510757134071e2bb6b554e7d0aaf29676150065<br />Configured with: /home/smarchi/src/userspace-rcu/configure 'CFLAGS=-g3 -O0 -Werror -fmax-errors=1 -fdiagnostics-color=always -fsanitize=address -Wall' 'CXXFLAGS=-g3 -O0 -fsanitize=address' 'CC=ccache gcc' 'CXX=ccache g++' '--prefix=/tmp/userspace-rcu'</p>
<p>Expected behavior: it builds<br />Actual behavior: it does not build</p>
<pre>
ccache gcc -DHAVE_CONFIG_H -include config.h -Wall -Wextra -Wno-unused-parameter -pthread -I/home/smarchi/src/userspace-rcu/include -I../../include -I/home/smarchi/src/userspace-rcu/src -I/home/smarchi/src/userspace-rcu/tests/common -g -g3 -O0 -Werror -fmax-errors=1 -fdiagnostics-color=always -fsanitize=address -Wall -MT test_urcu.o -MD -MP -MF .deps/test_urcu.Tpo -c -o test_urcu.o /home/smarchi/src/userspace-rcu/tests/benchmark/test_urcu.c
In file included from /home/smarchi/src/userspace-rcu/tests/benchmark/test_urcu.c:36:0:
/home/smarchi/src/userspace-rcu/tests/common/cpuset.h:40:0: error: "CPU_SET" redefined [-Werror]
# define CPU_SET(cpu, cpuset) do { *(cpuset) |= (1UL << (cpu)); } while(0)
In file included from /usr/include/pthread.h:23:0,
from /home/smarchi/src/userspace-rcu/tests/benchmark/test_urcu.c:24:
/usr/include/sched.h:83:0: note: this is the location of the previous definition
# define CPU_SET(cpu, cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
</pre> LTTng-tools - Bug #308 (Resolved): Compile fails with --disable-lttng-usthttps://bugs.lttng.org/issues/3082012-07-17T05:39:22ZSimon Marchisimon.marchi@polymtl.ca
<p>I don't have LTTng UST installed on my machine. When I try compiling having done ./configure --disable-lttng-ust, it tries to includes <lttng/bug.h> which is apparently in the LTTng UST tree.</p>
<pre>
make[4]: Entering directory `/home/markys/src/lttng-tools/src/lib/lttng-ctl'
CC filter-visitor-generate-bytecode.lo
In file included from filter-visitor-generate-bytecode.c:25:0:
align.h:20:23: fatal error: lttng/bug.h: No such file or directory
compilation terminated.
make[4]: *** [filter-visitor-generate-bytecode.lo] Error 1
</pre>