LTTng bugs repository: Issueshttps://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912023-10-26T18:56:27ZLTTng bugs repository
Redmine Babeltrace - Bug #1397 (New): reserved identifier violationhttps://bugs.lttng.org/issues/13972023-10-26T18:56:27ZMarkus Elfring
<p>I would like to point out that a few identifiers do eventually not fit to the expected naming convention of the C language standard.<br /><a class="external" href="https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier">https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier</a></p>
<p>Would you like to adjust your selection for unique names?</p>
Examples:
<ul>
<li>__BT_IN_BABELTRACE_H<br /> <a class="external" href="https://github.com/efficios/babeltrace/blob/8a87cdbd41e2e04b1b64e9959751cdabe72281c1/include/babeltrace2/babeltrace.h#L13-L17">https://github.com/efficios/babeltrace/blob/8a87cdbd41e2e04b1b64e9959751cdabe72281c1/include/babeltrace2/babeltrace.h#L13-L17</a></li>
<li>_BABELTRACE_UTC_H<br /> <a class="external" href="https://github.com/efficios/babeltrace/blob/8a87cdbd41e2e04b1b64e9959751cdabe72281c1/src/compat/utc.h#L7-L8">https://github.com/efficios/babeltrace/blob/8a87cdbd41e2e04b1b64e9959751cdabe72281c1/src/compat/utc.h#L7-L8</a></li>
</ul> 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> Babeltrace - Bug #1384 (New): Assertion `bt_value_get_type(map) == BT_VALUE_TYPE_MAP` failshttps://bugs.lttng.org/issues/13842023-08-08T18:07:42ZErica Bugden
<p>Hello! I triggered an internal assertion while trying to, presumably incorrectly, query the lttng-live component class.</p>
<a name="Software"></a>
<h1 >Software<a href="#Software" class="wiki-anchor">¶</a></h1>
<ul>
<li>lttng tools: <code>lttng (LTTng Trace Control) 2.14.0-pre - O-Beer - v2.12.0-rc1-1528-g5983bb6d3</code></li>
<li>babeltrace2: <code>Babeltrace 2.1.0-rc1 "Codename TBD" [v1.2.0-3704-gdbea6be2]</code> (configured with plugins, python bindings support)</li>
</ul>
<a name="Procedure"></a>
<h1 >Procedure<a href="#Procedure" class="wiki-anchor">¶</a></h1>
<ul>
<li>Start root session daemon: <code>$sudo lttng-sessiond --daemonize</code></li>
<li>Create live session: <code>$lttng create my-session --live</code></li>
<li>Enable events: <code>$lttng enable-event --kernel sched-switch,sched_process_fork</code></li>
<li>Start tracing <code>$lttng start</code></li>
<li>Run python script: <code>python3 lttng-live.py</code> (see below)
<ul>
<li>Assertion</li>
</ul></li>
</ul>
<a name="Python-script"></a>
<h1 >Python script<a href="#Python-script" class="wiki-anchor">¶</a></h1>
<p>Note: The script is noisy as some code/comments are irrelevant/incorrect/inconsistent. (It's originally based on the query example in the Python bindings documentation.)</p>
<pre>
import bt2
import sys
# Get the `source.ctf.fs` component class from the `ctf` plugin.
# `source.ctf.lttng-live` component class instead
# (list plugins/components with $babeltrace2 list-plugins)
comp_cls = bt2.find_plugin('ctf').source_component_classes['lttng-live']
# The `babeltrace.support-info` query operation expects a `type`
# parameter (set to `directory` here) and an `input` parameter (the
# actual path or string to check, in this case the first command-line
# argument).
#
# See `babeltrace2-query-babeltrace.support-info(7)`.
params = {
'url': 'net://localhost/host/luna/my-session'
}
'''
params = {
'type': 'string',
'input': sys.argv[1],
}
'''
# Create a query executor.
#
# This is the environment in which query operations happens. The
# queried component class has access to this executor, for example to
# retrieve the query operation's logging level.
query_exec = bt2.QueryExecutor(comp_cls, 'sessions',
'inputs=net://localhost/host/luna/my-session')
'''
query_exec = bt2.QueryExecutor(comp_cls, 'babeltrace.support-info',
params)
'''
# Query the component class through the query executor.
#
# This method returns the result.
result = query_exec.query()
# Print the result.
print(result)
# Try to iterate on the trace.
'''
for msg in bt2.TraceCollectionMessageIterator('net://localhost/host/luna/my-session'):
if type(msg) is bt2._EventMessageConst:
print(msg.event.name)
'''
</pre>
<p>If I remember correctly, <strong>the script line change that triggered the assertion was expressing the query parameters directly as a string</strong> (rather than a dictionary). As in this:</p>
<pre>
query_exec = bt2.QueryExecutor(comp_cls, 'sessions',
'inputs=net://localhost/host/luna/my-session')
</pre>
<p>instead of this:</p>
<pre>
params = {
'url': 'net://localhost/host/luna/my-session'
}
query_exec = bt2.QueryExecutor(comp_cls, 'sessions',
params)
</pre>
<a name="Output"></a>
<h1 >Output<a href="#Output" class="wiki-anchor">¶</a></h1>
<pre>
erica@luna:~$ python3 lttng-live.py
(╯°□°)╯︵ ┻━┻ param-validation.c:196: validate_map_value(): Assertion `bt_value_get_type(map) == BT_VALUE_TYPE_MAP` failed.
Aborted (core dumped)
</pre> Babeltrace - Bug #1374 (New): Babeltrace fails to read trace with no data stream type ID when the...https://bugs.lttng.org/issues/13742023-04-26T17:57:32ZErica Bugden
<p>Babeltrace is not able to read a trace that does not contain data stream IDs (empty packet header) when the metadata specifies an ID for the stream. Trace Compass is also unable to read this trace. If the lines mentioning the stream ID are removed from the metadata, then babeltrace is able to read the trace.</p>
<a name="Does-this-need-to-be-fixed"></a>
<h3 >Does this need to be fixed?<a href="#Does-this-need-to-be-fixed" class="wiki-anchor">¶</a></h3>
<p>This was first reported as a barectf issue <a class="external" href="https://github.com/efficios/barectf/issues/28">https://github.com/efficios/barectf/issues/28</a> , but after further consideration the issue appears to be in a grey area in the CTF 1.8 specification. Whether it is the CTF generator's (barectf) responsibility or the CTF reader's responsibility is up for debate.</p>
<p>The superfluous metadata information need not prevent the trace from being parsed. For example, yactfr <a class="external" href="https://github.com/eepp/yactfr">https://github.com/eepp/yactfr</a> is able to read the trace. However, considering that:</p>
<ul>
<li>At least two CTF readers (babeltrace and Trace Compass) cannot read the trace, and</li>
<li>It is easy to fix in barectf (Proposed fix: <a class="external" href="https://review.lttng.org/c/barectf/+/9868">https://review.lttng.org/c/barectf/+/9868</a> )</li>
</ul>
<p>this is not a high priority issue in babeltrace.</p>
<a name="Context"></a>
<h1 >Context<a href="#Context" class="wiki-anchor">¶</a></h1>
<p>- Background and reproducer: barectf github issue <a class="external" href="https://github.com/efficios/barectf/issues/28">https://github.com/efficios/barectf/issues/28</a> <br />- Background and specification discussion: barectf fix <a class="external" href="https://review.lttng.org/c/barectf/+/9868">https://review.lttng.org/c/barectf/+/9868</a></p> Babeltrace - Bug #1364 (New): CTF: Mismatching variant and tag selector and field names causes a ...https://bugs.lttng.org/issues/13642022-11-25T22:09:40ZJérémie Galarneaujeremie.galarneau@efficios.com
<p>Running <code>200e2a8d2</code>, decoding a CTF trace that has mismatching variant field and enumeration mapping names results in a crash:</p>
<pre>
❯ babeltrace ~/lttng-traces/auto-20221125-164416/ust/uid/1000/64-bit
(╯°□°)╯︵ ┻━┻ ctf-meta-translate.cpp:276: ctf_field_class_variant_to_ir(): Assertion `mapping` failed.
[1] 215518 IOT instruction (core dumped) babeltrace ~/lttng-traces/auto-20221125-164416/ust/uid/1000/64-bit
</pre>
<pre>
#0 0x00007fc99129964c in ?? () from /usr/lib/libc.so.6
#1 0x00007fc991249958 in raise () from /usr/lib/libc.so.6
#2 0x00007fc99123353d in abort () from /usr/lib/libc.so.6
#3 0x00007fc990ec3bf5 in bt_common_abort () at common.c:2111
#4 0x00007fc990f1d298 in bt_common_assert_failed (file=0x7fc990f28fbb "ctf-meta-translate.cpp",
line=276, func=0x7fc990f290e8 "ctf_field_class_variant_to_ir",
assertion=0x7fc990f2913f "mapping") at assert.c:40
#5 0x00007fc990ed1612 in ctf_field_class_variant_to_ir (fc=0x55568bfbf780, ctx=0x7ffd71c5f7f0)
at ctf-meta-translate.cpp:276
#6 ctf_field_class_to_ir (ctx=ctx@entry=0x7ffd71c5f7f0, fc=0x55568bfbf780)
at ctf-meta-translate.cpp:390
#7 0x00007fc990ed1883 in translate_struct_field_class_members (with_header_prefix=<optimized out>,
context_fc=<optimized out>, ir_fc=<optimized out>, fc=<optimized out>, ctx=<optimized out>)
at ctf-meta-translate.cpp:159
#8 ctf_field_class_struct_to_ir (fc=0x55568bf13490, ctx=0x7ffd71c5f7f0)
at ctf-meta-translate.cpp:173
#9 ctf_field_class_to_ir (ctx=ctx@entry=0x7ffd71c5f7f0, fc=0x55568bf13490)
at ctf-meta-translate.cpp:381
#10 0x00007fc990ed2464 in scope_ctf_field_class_to_ir (ctx=0x7ffd71c5f7f0)
at ctf-meta-translate.cpp:453
#11 ctf_stream_class_to_ir (ctx=0x7ffd71c5f7f0) at ctf-meta-translate.cpp:552
#12 ctf_trace_class_translate (self_comp=<optimized out>, ir_tc=<optimized out>, tc=0x55568bf14150)
at ctf-meta-translate.cpp:641
#13 0x00007fc990eec028 in ctf_visitor_generate_ir_visit_node (ctx=0x55568bf3a620,
node=0x55568bf14040) at visitor-generate-ir.cpp:4776
#14 0x00007fc990ed965a in ctf_metadata_decoder_append_content (mdec=0x55568bf0b340,
fp=<optimized out>) at decoder.cpp:326
#15 0x00007fc990f0caaa in ctf_fs_metadata_set_trace_class (self_comp=self_comp@entry=0x55568bf13970,
ctf_fs_trace=ctf_fs_trace@entry=0x55568bf09da0, config=config@entry=0x55568bf0b478)
at metadata.cpp:103
#16 0x00007fc990f098b8 in ctf_fs_trace_create (log_level=BT_LOGGING_LEVEL_WARNING,
metadata_config=0x55568bf0b478, name=0x0,
path=0x55568bf0b4a0 "/home/jgalar/lttng-traces/auto-20221125-164416/ust/uid/1000/64-bit",
self_comp_class=0x0, self_comp=0x55568bf13970) at fs.cpp:1027
#17 ctf_fs_component_create_ctf_fs_trace_one_path (self_comp_class=0x0, self_comp=0x55568bf13970,
traces=0x55568bf35620, trace_name=0x0, path_param=<optimized out>, ctf_fs=0x55568bf0b460)
at fs.cpp:1129
#18 ctf_fs_component_create_ctf_fs_trace (ctf_fs=ctf_fs@entry=0x55568bf0b460,
paths_value=<optimized out>, trace_name_value=<optimized out>,
self_comp=self_comp@entry=0x55568bf13970, self_comp_class=self_comp_class@entry=0x0)
at fs.cpp:2002
#19 0x00007fc990f0c3c3 in ctf_fs_create (self_comp_src=0x55568bf13970, params=0x55568bf0d9a0)
at fs.cpp:2278
#20 ctf_fs_init (self_comp_src=0x55568bf13970, config=config@entry=0x0,
params=params@entry=0x55568bf0d9a0, init_method_data=init_method_data@entry=0x0) at fs.cpp:2311
#21 0x00007fc991568b4d in add_component_with_init_method_data (graph=graph@entry=0x55568bf13800,
comp_cls=comp_cls@entry=0x55568bf32970,
init_method=0x7fc990f0c320 <ctf_fs_init(bt_self_component_source*, bt_self_component_source_configuration*, bt_value const*, void*)>, name=name@entry=0x55568bf0d910 "auto-disc-source-ctf-fs",
params=params@entry=0x55568bf0d9a0, init_method_data=init_method_data@entry=0x0,
log_level=BT_LOGGING_LEVEL_WARNING, user_component=0x7ffd71c5fd00,
api_func=0x7fc9915a9660 <__func__.13> "bt_graph_add_source_component",
init_method_name=0x7fc9915aa860 "bt_component_class_source_initialize_method") at graph.c:1048
#22 0x00007fc99156aaae in add_source_component_with_initialize_method_data (
api_func=0x7fc9915a9660 <__func__.13> "bt_graph_add_source_component", component=0x7ffd71c5fd00,
log_level=BT_LOGGING_LEVEL_WARNING, init_method_data=0x0, params=0x55568bf0d9a0,
name=0x55568bf0d910 "auto-disc-source-ctf-fs", comp_cls=0x55568bf32970, graph=0x55568bf13800)
at graph.c:1127
#23 bt_graph_add_source_component (graph=0x55568bf13800, comp_cls=comp_cls@entry=0x55568bf32970,
name=0x55568bf0d910 "auto-disc-source-ctf-fs", params=0x55568bf0d9a0,
log_level=BT_LOGGING_LEVEL_WARNING, component=component@entry=0x7ffd71c5fd00) at graph.c:1152
#24 0x000055568aa845d6 in cmd_run_ctx_create_components_from_config_components (
ctx=ctx@entry=0x7ffd71c5fde0, cfg_components=<optimized out>) at babeltrace2.c:2259
#25 0x000055568aa7ffe4 in cmd_run_ctx_create_components (ctx=0x7ffd71c5fde0) at babeltrace2.c:2355
#26 cmd_run (cfg=0x55568bf14390) at babeltrace2.c:2469
--Type <RET> for more, q to quit, c to continue without paging--
#27 main (argc=<optimized out>, argv=<optimized out>) at babeltrace2.c:2679
</pre>
<p>The relevant part of the trace's metadata is as-follows where you can see "_none" and "none" don't match.<br /><pre>
event.context := struct {
enum : integer { size = 8; align = 8; signed = true; } {
"none" = 0,
"_int8" = 1,
"_int16" = 2,
"_int32" = 3,
"_int64" = 4,
"_uint8" = 5,
"_uint16" = 6,
"_uint32" = 7,
"_uint64" = 8,
"_float" = 9,
"_double" = 10,
"_string" = 11
} __app_lol_gooo_tag;
variant <__app_lol_gooo_tag> {
struct {} _none;
integer { size = 8; align = 8; signed = true; } _int8;
integer { size = 16; align = 8; signed = true; } _int16;
integer { size = 32; align = 8; signed = true; } _int32;
integer { size = 64; align = 8; signed = true; } _int64;
integer { size = 8; align = 8; } _uint8;
integer { size = 16; align = 8; } _uint16;
integer { size = 32; align = 8; } _uint32;
integer { size = 64; align = 8; } _uint64;
floating_point { align = 8; mant_dig = 24; exp_dig = 8; } _float;
floating_point { align = 8; mant_dig = 53; exp_dig = 11; } _double;
string _string;
} __app_lol_gooo;
};
</pre></p>
<p>Arguably, the CTF 1.8.3 specification says that:<br /><pre>
Each variant type selector possess a field name, which is a unique identifier within the variant. The identifier is not allowed to use any reserved keyword. Replacing reserved keywords with underscore-prefixed field names is recommended. Fields starting with an underscore should have their leading underscore removed by the CTF trace readers.
</pre></p>
<p>As the term "should" is used, this presumably means that the reader could choose to match those or not. I can confirm that Babeltrace 1.5 also fails (but doesn't crash) so it seems reasonable to require an exact match.</p>
<p>I'm joining a trace that reproduces the issue.</p> Babeltrace - Bug #1348 (New): Assertion failure when passing `smalltrace` CTF test trace twice to...https://bugs.lttng.org/issues/13482022-03-11T21:29:01ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<p>Command used:<br /><pre>
src/cli/babeltrace2 tests/data/ctf-traces/succeed/smalltrace tests/data/ctf-traces/succeed/smalltrace
</pre></p>
<p>The same issue can be reproduce with the <code>env-warning</code> test trace.</p>
<p>Error print out:<br /><pre>
03-11 16:21:26.766 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:64 Babeltrace 2 library precondition not satisfied.
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:66 ------------------------------------------------------------------------
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:67 Condition ID: `pre:self-component-source-add-output-port:output-port-is-unique`.
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:69 Function: bt_self_component_source_add_output_port().
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:70 ------------------------------------------------------------------------
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:71 Error is:
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:73 Output port name is not unique: name="2a6422d0-6cee-11e0-8c08-cb07d7b3a564 | 0 | /home/frdeso/projets/babeltrace/tests/data/ctf-traces/succeed/smalltrace/dummystream", comp-addr=0x5555555961c0, comp-name="auto-disc-source-ctf-fs", comp-log-level=WARNING, comp-class-type=SOURCE, comp-class-name="fs", comp-class-partial-descr="Read CTF traces from the file sy"
03-11 16:21:26.767 2579249 2579249 F LIB/ASSERT-COND bt_lib_assert_cond_failed@assert-cond.c:76 Aborting...
Program received signal SIGABRT, Aborted.
</pre></p>
<p>GDB stack trace:<br /><pre>
#0 0x00007ffff7bd003b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7baf859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff7ee32e5 in bt_common_abort () at common.c:2111
#3 0x00007ffff7ee408a in bt_lib_assert_cond_failed (cond_type=cond_type@entry=0x7ffff7f521c4 "pre", func=func@entry=0x7ffff7f59fc0 <__func__.17520> "bt_self_component_source_add_output_port", id_suffix=id_suffix@entry=0x7ffff7f59e51 "output-port-is-unique", fmt=fmt@entry=0x7ffff7f59ec8 "Output port name is not unique: name=\"%s\", %![comp-]c") at assert-cond.c:77
#4 0x00007ffff7f00410 in bt_self_component_source_add_output_port (self_comp=0x5555555961c0, name=0x5555555d01f0 "2a6422d0-6cee-11e0-8c08-cb07d7b3a564 | 0 | /home/frdeso/projets/babeltrace/tests/data/ctf-traces/succeed/smalltrace/dummystream", user_data=0x5555555d8440, self_port=0x0) at component-source.c:127
#5 0x00007ffff7ab7622 in create_one_port_for_trace (ctf_fs=0x555555596360, ctf_fs_trace=0x555555594d40, ds_file_group=0x5555555cb8c0, self_comp_src=0x5555555961c0) at fs.cpp:436
#6 0x00007ffff7ab735f in create_ports_for_trace (ctf_fs=0x555555596360, ctf_fs_trace=0x555555594d40, self_comp_src=0x5555555961c0) at fs.cpp:469
#7 0x00007ffff7ab2fc8 in ctf_fs_create (params=0x5555555bc2e0, self_comp_src=0x5555555961c0) at fs.cpp:2287
#8 0x00007ffff7ab2ebc in ctf_fs_init (self_comp_src=0x5555555961c0, config=0x0, params=0x5555555bc2e0, init_method_data=0x0) at fs.cpp:2311
#9 0x00007ffff7f05bb3 in add_component_with_init_method_data (graph=graph@entry=0x5555555bd240, comp_cls=comp_cls@entry=0x5555555b80e0, init_method=0x7ffff7ab2e90 <ctf_fs_init(bt_self_component_source*, bt_self_component_source_configuration*, bt_value const*, void*)>, name=name@entry=0x5555555bc2b0 "auto-disc-source-ctf-fs", params=params@entry=0x5555555bc2e0, init_method_data=init_method_data@entry=0x0, log_level=BT_LOGGING_LEVEL_WARNING, user_component=0x7fffffffe0a0, api_func=0x7ffff7f5c400 <__func__.18097> "bt_graph_add_source_component", init_method_name=0x7ffff7f5ca48 "bt_component_class_source_initialize_method") at graph.c:1048
#10 0x00007ffff7f0654f in add_source_component_with_initialize_method_data (graph=0x5555555bd240, comp_cls=0x5555555b80e0, name=0x5555555bc2b0 "auto-disc-source-ctf-fs", params=0x5555555bc2e0, init_method_data=0x0, log_level=BT_LOGGING_LEVEL_WARNING, component=0x7fffffffe0a0, api_func=0x7ffff7f5c400 <__func__.18097> "bt_graph_add_source_component") at graph.c:1127
#11 0x00007ffff7f0932d in bt_graph_add_source_component (graph=<optimized out>, comp_cls=comp_cls@entry=0x5555555b80e0, name=<optimized out>, params=<optimized out>, log_level=<optimized out>, component=component@entry=0x7fffffffe0a0) at graph.c:1152
#12 0x0000555555561c42 in cmd_run_ctx_create_components_from_config_components (ctx=ctx@entry=0x7fffffffe170, cfg_components=<optimized out>, cfg_components=<optimized out>) at babeltrace2.c:2259
#13 0x000055555555cda9 in cmd_run_ctx_create_components (ctx=0x7fffffffe170) at babeltrace2.c:2355
#14 cmd_run (cfg=0x55555559fc70) at babeltrace2.c:2469
#15 main (argc=<optimized out>, argv=<optimized out>) at babeltrace2.c:2679
</pre></p>
<p>Commit:<br /><pre>
commit 53a47a3f01d6bfa4e940e1943e7645cb89d04cd5 (HEAD -> master, review/master, origin/master, origin/HEAD, eepp,simark/master)
Author: Michael Jeanson <mjeanson@efficios.com>
Date: Wed Mar 2 13:25:05 2022 -0500
fix: add dependency between cli bin and plugins when built-in
</pre></p> Babeltrace - Bug #1346 (New): sink.ctf.fs: Assertion failure while encoding length FC of dynamic ...https://bugs.lttng.org/issues/13462022-02-15T16:14:22ZFrancis Deslauriersfrancis.deslauriers@efficios.com
<p>I witnessed this issue while working on the CTF2 support of the sink.ctf.fs component class.</p>
<pre>
(╯°□°)╯︵ ┻━┻ translate-trace-ir-to-ctf-ir.cpp:283: create_relative_field_ref(): Assertion `bt_field_path_item_get_type(fp_item) == BT_FIELD_PATH_ITEM_TYPE_INDEX` failed.
</pre>
<p>The problem is triggered when a length field class of a dynamic array field class is contained within an element of a static array field class. Both dynamic array and its length are in the same element within the static array.</p>
<p>I attached the source of a Python plugin that reproduces this issue.</p>
<p>I can reproduce the issue with the following command:<br /><pre>
babeltrace2 --plugin-path=/home/frdeso/projets/babeltrace-fun-plugins/my-first-components/ -c source.reprod.MyFirstSource -c sink.ctf.fs -p path=\"ici\"
</pre></p>
<p>Here is the full stack trace of the assertion failure:<br /><pre>
#3 0x00007ffff6534c11 in bt_common_assert_failed (file=0x7ffff654c62c "translate-trace-ir-to-ctf-ir.cpp", line=283, func=0x7ffff654cf00 "create_relative_field_ref", assertion=0x7ffff654cf3a "bt_field_path_item_get_type(fp_item) == BT_FIELD_PATH_ITEM_TYPE_INDEX") at assert.c:40
#4 0x00007ffff6505624 in create_relative_field_ref (ctx=0x7fffffffe0f8, tgt_ir_field_path=0x5555555980a0, tgt_field_ref=0x555555599900, user_tgt_fc=0x0) at translate-trace-ir-to-ctf-ir.cpp:283
#5 0x00007ffff650529b in resolve_field_class (ctx=0x7fffffffe0f8, tgt_ir_field_path=0x5555555980a0, tgt_field_ref=0x555555599900, create_before=0x55555559b420, user_tgt_fc=0x0) at translate-trace-ir-to-ctf-ir.cpp:510
#6 0x00007ffff6503ccb in translate_dynamic_array_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:1087
#7 0x00007ffff65035b7 in translate_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:1191
#8 0x00007ffff6502e5a in translate_structure_field_class_members (ctx=0x7fffffffe0f8, struct_fc=0x55555559b2f0, ir_fc=0x5555556fed80) at translate-trace-ir-to-ctf-ir.cpp:615
#9 0x00007ffff650398a in translate_structure_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:638
#10 0x00007ffff6503570 in translate_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:1187
#11 0x00007ffff6503b18 in translate_static_array_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:1061
#12 0x00007ffff650358f in translate_field_class (ctx=0x7fffffffe0f8) at translate-trace-ir-to-ctf-ir.cpp:1189
#13 0x00007ffff6502e5a in translate_structure_field_class_members (ctx=0x7fffffffe0f8, struct_fc=0x55555559b120, ir_fc=0x5555557500d0) at translate-trace-ir-to-ctf-ir.cpp:615
#14 0x00007ffff6502819 in translate_scope_field_class (ctx=0x7fffffffe0f8, scope=BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD, fc=0x55555559b028, ir_fc=0x5555557500d0) at translate-trace-ir-to-ctf-ir.cpp:1446
#15 0x00007ffff6501ab9 in translate_event_class (fs_sink=0x555555598510, sc=0x55555559ae80, ir_ec=0x5555557166e0, out_ec=0x7fffffffe1e8) at translate-trace-ir-to-ctf-ir.cpp:1503
#16 0x00007ffff6501955 in try_translate_event_class_trace_ir_to_ctf_ir (fs_sink=0x555555598510, sc=0x55555559ae80, ir_ec=0x5555557166e0, out_ec=0x7fffffffe1e8) at translate-trace-ir-to-ctf-ir.cpp:1532
#17 0x00007ffff64fe4a4 in handle_event_msg (fs_sink=0x555555598510, msg=0x55555559a530) at fs-sink.cpp:266
#18 0x00007ffff64fe082 in ctf_fs_sink_consume (self_comp=0x555555598480) at fs-sink.cpp:957
</pre></p> Babeltrace - Bug #1338 (New): Crash when specifying convert command with custom python plug-inhttps://bugs.lttng.org/issues/13382021-12-02T21:39:41ZJérémie Galarneaujeremie.galarneau@efficios.com
<pre>
babeltrace2 convert -d --plugin-path=. input.aoc21
</pre>
<p>Results in a crash at</p>
<pre>
(gdb) bt
#0 0x00007fc325f61d22 in raise () from /usr/lib/libc.so.6
#1 0x00007fc325f4b862 in abort () from /usr/lib/libc.so.6
#2 0x000055882abffe3a in bt_common_abort () at common.c:2111
#3 0x000055882ac0d4ee in bt_config_convert_from_args (argc=argc@entry=3,
argv=argv@entry=0x7ffee7a2c538, cfg_out=cfg_out@entry=0x7ffee7a2c378, plugin_paths=0x55882cc26da0,
default_log_level=default_log_level@entry=0x7ffee7a2c2a4,
interrupter=interrupter@entry=0x55882cc26d60, consumed_args=1) at babeltrace2-cfg-cli-args.c:3606
#4 0x000055882ac123b0 in bt_config_cli_args_create (argc=argc@entry=5, argv=argv@entry=0x7ffee7a2c528,
cfg=cfg@entry=0x7ffee7a2c378, omit_system_plugin_path=omit_system_plugin_path@entry=false,
omit_home_plugin_path=<optimized out>, omit_home_plugin_path@entry=false,
initial_plugin_paths=initial_plugin_paths@entry=0x0, interrupter=0x55882cc26d60)
at babeltrace2-cfg-cli-args.c:4951
#5 0x000055882ac140d2 in bt_config_cli_args_create_with_default (argc=argc@entry=5,
argv=argv@entry=0x7ffee7a2c528, cfg=cfg@entry=0x7ffee7a2c378, interrupter=<optimized out>)
at babeltrace2-cfg-cli-args-default.c:70
#6 0x000055882abffef3 in main (argc=5, argv=0x7ffee7a2c528) at babeltrace2.c:2642
</pre>
<p>The current path (to which plugin-path points) contains a python plug-in.</p>
<pre>
import bt2
bt2.register_plugin(__name__, "aoc21")
class AOC21SourceValuesIterator(bt2._UserMessageIterator):
def __init__(self, config, output_port):
self._values_file = output_port.user_data[0]
self._ping_ec = output_port.user_data[1]
ping_sc = self._ping_ec.stream_class
tc = ping_sc.trace_class
trace = tc()
self._value_stream = trace.create_stream(ping_sc)
self._stream_begin_msg = self._create_stream_beginning_message(
self._value_stream
)
self._stream_end_msg = self._create_stream_end_message(self._value_stream)
def __next__(self):
if self._stream_begin_msg:
msg = self._stream_begin_msg
self._stream_begin_msg = None
return msg
try:
line = next(self._values_file)
except StopIteration:
if self._stream_end_msg:
msg = self._stream_end_msg
self._stream_end_msg
return msg
else:
raise StopIteration
event_msg = self._create_event_message(
self._ping_ec, self._value_stream, default_clock_snapshot=0
)
event_msg.event.payload_field["depth"] = int(line)
return event_msg
@bt2.plugin_component_class
class AOC21Source(
bt2._UserSourceComponent, message_iterator_class=AOC21SourceValuesIterator
):
def __init__(self, config, params, obj):
if "path" not in params:
raise ValueError("AOC21Source: missing `path` parameter")
path = params["path"]
if type(path) != bt2._StringValueConst:
raise TypeError(
"AOC21Source: expecting `path` parameter to be a string, got a {}".format(
type(path)
)
)
values_file = open(str(path), "r")
tc = self._create_trace_class()
cc = self._create_clock_class()
sc = tc.create_stream_class(default_clock_class=cc)
ping_event_payload = tc.create_structure_field_class()
ping_event_payload.append_member(
"depth", tc.create_unsigned_integer_field_class()
)
ping_event_ec = sc.create_event_class(
name="ping", payload_field_class=ping_event_payload
)
self._add_output_port("the-values", (values_file, ping_event_ec))
class WindowSum:
def __init__(self, size: int):
self._size = size
self._values = []
def add_value(self, value: int):
if len(self._values) >= 3:
raise RuntimeError
self._values.append(value)
@property
def is_full(self) -> bool:
return len(self._values) == 3
@property
def sum(self) -> int:
return sum(self._values)
def clear(self):
self._values.clear()
@bt2.plugin_component_class
class AOC21Sink(bt2._UserSinkComponent):
def __init__(self, config, params, obj):
self._port = self._add_input_port("holiday-spirit")
self._increase_count = 0
self._last_completed_window_sum = None
self._windows = []
def _user_graph_is_configured(self):
self._it = self._create_message_iterator(self._port)
def _user_consume(self):
msg = next(self._it)
if type(msg) is bt2._EventMessageConst:
depth = msg.event["depth"]
# Initialize windows one after the other to maintain an offset
# between them
if len(self._windows) < 3:
self._windows.append(WindowSum(3))
for window in self._windows:
window.add_value(depth)
if window.is_full:
if (
self._last_completed_window_sum
and window.sum > self._last_completed_window_sum
):
self._increase_count = self._increase_count + 1
self._last_completed_window_sum = window.sum
window.clear()
elif type(msg) is bt2._StreamEndMessageConst:
print(self._increase_count)
raise bt2.Stop
</pre> 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> Babeltrace - Bug #1322 (New): Assert in ctf_msg_iter_destroy()https://bugs.lttng.org/issues/13222021-08-15T23:30:51ZSergei Dyshel
<p>#0 0x00007ff0426ad495 in raise () from /lib64/libc.so.6<br />#1 0x00007ff0426aec75 in abort () from /lib64/libc.so.6<br />#2 0x00007ff0426eb3a7 in __libc_message () from /lib64/libc.so.6<br />#3 0x00007ff0426f0dee in malloc_printerr () from /lib64/libc.so.6<br />#4 0x00007ff0426f3c3d in _int_free () from /lib64/libc.so.6<br />#5 0x00007ff041fd91cd in ctf_msg_iter_destroy (msg_it=0x47d700) at msg-iter.c:2870<br />#6 0x00007ff041ffa61d in lttng_live_stream_iterator_destroy (stream_iter=0x57e520)<br /> at data-stream.c:300<br /><a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Bug: Double PID registering and unregistering race (Resolved)" href="https://bugs.lttng.org/issues/7">#7</a> 0x00007ff042c858c4 in g_ptr_array_foreach (array=0x446140,<br /> func=0x7ff041ffa5f0 <lttng_live_stream_iterator_destroy>, user_data=0x0) at garray.c:1500<br />#8 0x00007ff042c859ed in ptr_array_free (flags=<optimized out>, array=0x446140)<br /> at garray.c:1086<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: LTTng-UST java jni wrapper does not build with OpenJDK (Resolved)" href="https://bugs.lttng.org/issues/9">#9</a> g_ptr_array_free (array=0x446140, free_segment=free_segment@entry=1) at garray.c:1073<br /><a class="issue tracker-1 status-5 priority-6 priority-highest closed" title="Bug: tor instrumentation only works partly (Resolved)" href="https://bugs.lttng.org/issues/10">#10</a> 0x00007ff041ff625b in lttng_live_destroy_trace (trace=0x4a6260) at lttng-live.c:164<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Python sometimes registers to sessiond as lttng-ust application (Resolved)" href="https://bugs.lttng.org/issues/11">#11</a> 0x00007ff042c858c4 in g_ptr_array_foreach (array=0x4463a0,<br /> func=0x7ff041ff61f0 <lttng_live_destroy_trace>, user_data=0x0) at garray.c:1500<br />#12 0x00007ff042c859ed in ptr_array_free (flags=<optimized out>, array=0x4463a0)<br /> at garray.c:1086<br />#13 g_ptr_array_free (array=0x4463a0, free_segment=free_segment@entry=1) at garray.c:1073<br />#14 0x00007ff041ff6356 in lttng_live_destroy_session (session=0x44a4a0) at lttng-live.c:300<br /><a class="issue tracker-2 status-7 priority-3 priority-lowest overdue behind-schedule" title="Feature: LTTng simple trace (Confirmed)" href="https://bugs.lttng.org/issues/15">#15</a> 0x00007ff042c858c4 in g_ptr_array_foreach (array=0x4462e0,<br /> func=0x7ff041ff62c0 <lttng_live_destroy_session>, user_data=0x0) at garray.c:1500<br />#16 0x00007ff042c859ed in ptr_array_free (flags=<optimized out>, array=0x4462e0)<br /> at garray.c:1086<br />#17 g_ptr_array_free (array=0x4462e0, free_segment=free_segment@entry=1) at garray.c:1073<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Define the libbabeltrace API for trace reading (Resolved)" href="https://bugs.lttng.org/issues/18">#18</a> 0x00007ff041ff6806 in lttng_live_msg_iter_destroy (lttng_live_msg_iter=0x4a5a00)<br /> at lttng-live.c:323<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Make use tracer "environment" metadata (Resolved)" href="https://bugs.lttng.org/issues/19">#19</a> lttng_live_msg_iter_finalize (self_msg_iter=<optimized out>) at lttng-live.c:351<br /><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Finish x86 syscalls (Resolved)" href="https://bugs.lttng.org/issues/20">#20</a> 0x00007ff042de2417 in bt_message_iterator_try_finalize (iterator=iterator@entry=0x4a5890)<br /> at iterator.c:219<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Emit tracer environment metadata for the kernel (Resolved)" href="https://bugs.lttng.org/issues/21">#21</a> 0x00007ff042ddc310 in bt_connection_end (conn=conn@entry=0x4a54b0,<br /> try_remove_from_graph=try_remove_from_graph@entry=false) at connection.c:213<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Show "syscalls activated" in output (Resolved)" href="https://bugs.lttng.org/issues/22">#22</a> 0x00007ff042ddc62e in destroy_connection (obj=0x4a54b0) at connection.c:65<br /><a class="issue tracker-2 status-8 priority-4 priority-default closed" title="Feature: Implement trace log levels (Invalid)" href="https://bugs.lttng.org/issues/23">#23</a> 0x00007ff042c858c4 in g_ptr_array_foreach (array=0x43a0e0, func=0x7ff042ddc880 <bt_object_try_spec_release>, user_data=0x0) at garray.c:1500<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add a helper script to automatically generate the probe header file (Resolved)" href="https://bugs.lttng.org/issues/24">#24</a> 0x00007ff042c859ed in ptr_array_free (flags=<optimized out>, array=0x43a0e0) at garray.c:1086<br /><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Emit tracer environment metadata (Resolved)" href="https://bugs.lttng.org/issues/25">#25</a> g_ptr_array_free (array=0x43a0e0, free_segment=free_segment@entry=1) at garray.c:1073<br /><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Add a "lttng view" command (Resolved)" href="https://bugs.lttng.org/issues/26">#26</a> 0x00007ff042ddc934 in destroy_graph (obj=0x43c000) at graph.c:114<br />#27 0x000000000040add3 in cmd_run_ctx_destroy (ctx=ctx@entry=0x7ffe56fd41c0) at babeltrace2.c:1703<br /><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Implement the State Dump (Resolved)" href="https://bugs.lttng.org/issues/28">#28</a> 0x0000000000408236 in cmd_run (cfg=0x4438e0) at babeltrace2.c:2556<br /><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Add integration with SystemTap/DTrace probes with sdt.h (Resolved)" href="https://bugs.lttng.org/issues/29">#29</a> main (argc=<optimized out>, argv=<optimized out>) at babeltrace2.c:2691</p>
<p>Details of lttng/babeltrace session as in <a class="external" href="https://bugs.lttng.org/issues/1319">https://bugs.lttng.org/issues/1319</a></p> Babeltrace - Bug #1321 (New): Segfault in bfcr_unsigned_int_cb()https://bugs.lttng.org/issues/13212021-08-15T23:28:57ZSergei Dyshel
<p>#0 0x00007fe6cdfe0d62 in bfcr_unsigned_int_cb (value=65535, fc=0x23d1240, data=0x1e6ca30)<br /> at msg-iter.c:2005<br />#1 0x00007fe6cdfdc615 in read_basic_int_and_call_cb (at=<optimized out>,<br /> buf=<optimized out>, bfcr=0x1e6cc00) at bfcr.c:661<br />#2 read_bit_array_class_and_call_begin (read_basic_and_call_cb=<optimized out>,<br /> bfcr=0x1e6cc00) at bfcr.c:758<br />#3 read_basic_int_class_and_call_begin (bfcr=0x1e6cc00) at bfcr.c:797<br />#4 read_basic_begin_state (bfcr=0x1e6cc00) at bfcr.c:942<br />#5 handle_state (bfcr=0x1e6cc00) at bfcr.c:1178<br />#6 bt_bfcr_start (bfcr=0x1e6cc00, cls=cls@entry=0x23d5b10, buf=<optimized out>,<br /> offset=<optimized out>, packet_offset=<optimized out>, sz=<optimized out>,<br /> status=<optimized out>) at bfcr.c:1315<br /><a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Bug: Double PID registering and unregistering race (Resolved)" href="https://bugs.lttng.org/issues/7">#7</a> 0x00007fe6cdfe2c5d in read_dscope_begin_state (dscope_field=0x0,<br /> continue_state=STATE_DSCOPE_EVENT_HEADER_CONTINUE, done_state=STATE_AFTER_EVENT_HEADER,<br /> dscope_fc=0x23d5b10, msg_it=0x1e6ca30) at msg-iter.c:602<br />#8 read_event_header_begin_state (msg_it=msg_it@entry=0x1e6ca30) at msg-iter.c:1223<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: LTTng-UST java jni wrapper does not build with OpenJDK (Resolved)" href="https://bugs.lttng.org/issues/9">#9</a> 0x00007fe6cdfe4a03 in handle_state (msg_it=0x1e6ca30) at msg-iter.c:1739<br /><a class="issue tracker-1 status-5 priority-6 priority-highest closed" title="Bug: tor instrumentation only works partly (Resolved)" href="https://bugs.lttng.org/issues/10">#10</a> ctf_msg_iter_get_next_message (msg_it=0x1e6ca30, message=message@entry=0x7ffdf1b5ac08)<br /> at msg-iter.c:2892<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Python sometimes registers to sessiond as lttng-ust application (Resolved)" href="https://bugs.lttng.org/issues/11">#11</a> 0x00007fe6ce002fd8 in lttng_live_iterator_next_handle_one_active_data_stream (<br /> lttng_live_stream=0x1bd3460, lttng_live_stream=0x1bd3460, message=0x7ffdf1b5ac08,<br /> lttng_live_msg_iter=0x1e69da0) at lttng-live.c:821<br />#12 lttng_live_iterator_next_msg_on_stream (curr_msg=0x7ffdf1b5ac08, stream_iter=0x1bd3460,<br /> lttng_live_msg_iter=0x1e69da0) at lttng-live.c:990<br />#13 next_stream_iterator_for_trace (live_trace=0x1bd3970, live_trace=0x1bd3970,<br /> youngest_trace_stream_iter=<synthetic pointer>, lttng_live_msg_iter=0x1e69da0)<br /> at lttng-live.c:1113<br />#14 next_stream_iterator_for_session (youngest_session_stream_iter=<synthetic pointer>,<br /> session=0x1e6b1e0, lttng_live_msg_iter=0x1e69da0) at lttng-live.c:1345<br /><a class="issue tracker-2 status-7 priority-3 priority-lowest overdue behind-schedule" title="Feature: LTTng simple trace (Confirmed)" href="https://bugs.lttng.org/issues/15">#15</a> lttng_live_msg_iter_next (self_msg_it=<optimized out>, msgs=0x1e69d10, capacity=15,<br /> count=0x7ffdf1b5adb8) at lttng-live.c:1538</p>
<p>Details of LTTNG session and babeltrace usage are same as in <a class="external" href="https://bugs.lttng.org/issues/1319">https://bugs.lttng.org/issues/1319</a></p> Babeltrace - Bug #1319 (New): Assert in emit_inactivity_messagehttps://bugs.lttng.org/issues/13192021-06-17T11:54:52ZSergei Dyshel
<p>While using babeltrace 2.0.3 with lttng-live (latest lttng version) we encountered the following assert:</p>
<pre>
(gdb) bt
#0 0x00007f9023fc3495 in raise () from /lib64/libc.so.6
#1 0x00007f9023fc4c75 in abort () from /lib64/libc.so.6
#2 0x00007f902391d8d3 in bt_common_abort () at common.c:2111
#3 0x00007f902391b9ff in bt_common_assert_failed (file=0x7f9023921495 "lttng-live.c", line=613, func=0x7f902393f500 <__func__.17246> "emit_inactivity_message", assertion=0x7f9023931c70 "stream_iter->trace->clock_class")
at assert.c:40
#4 0x00007f902390be67 in emit_inactivity_message (stream_iter=0x472100, timestamp=<optimized out>, message=0x7ffe76aa8d98, lttng_live_msg_iter=0x471810) at lttng-live.c:613
#5 lttng_live_iterator_next_handle_one_quiescent_stream (message=0x7ffe76aa8d98, lttng_live_stream=0x472100, lttng_live_msg_iter=0x471810) at lttng-live.c:653
#6 lttng_live_iterator_next_msg_on_stream (curr_msg=0x7ffe76aa8d98, stream_iter=0x472100, lttng_live_msg_iter=0x471810) at lttng-live.c:961
#7 next_stream_iterator_for_trace (live_trace=0x4721a0, live_trace=0x4721a0, youngest_trace_stream_iter=<synthetic pointer>, lttng_live_msg_iter=0x471810) at lttng-live.c:1093
#8 next_stream_iterator_for_session (youngest_session_stream_iter=<synthetic pointer>, session=0x471d70, lttng_live_msg_iter=0x471810) at lttng-live.c:1325
#9 lttng_live_msg_iter_next (self_msg_it=<optimized out>, msgs=0x471780, capacity=15, count=0x7ffe76aa8ee8) at lttng-live.c:1518
#10 0x00007f90247031e2 in call_iterator_next_method (capacity=15, user_count=0x7ffe76aa8ee8, msgs=0x471780, iterator=0x4716a0) at iterator.c:803
#11 bt_message_iterator_next (iterator=0x4716a0, msgs=msgs@entry=0x7ffe76aa8ee0, user_count=user_count@entry=0x7ffe76aa8ee8) at iterator.c:859
#12 0x00007f90238841e9 in muxer_upstream_msg_iter_next (is_ended=<synthetic pointer>, muxer_upstream_msg_iter=0x471fc0) at muxer.c:399
#13 validate_muxer_upstream_msg_iter (is_ended=<synthetic pointer>, muxer_upstream_msg_iter=0x471fc0) at muxer.c:958
#14 validate_muxer_upstream_msg_iters (muxer_msg_iter=0x471650) at muxer.c:985
#15 muxer_msg_iter_do_next_one (msg=0x449850, muxer_msg_iter=0x471650, muxer_comp=0x4524f0) at muxer.c:1048
#16 muxer_msg_iter_do_next (count=0x7ffe76aa8f70, capacity=15, msgs=0x449850, muxer_msg_iter=0x471650, muxer_comp=0x4524f0) at muxer.c:1132
#17 muxer_msg_iter_next (self_msg_iter=0x471570, msgs=0x449850, capacity=15, count=0x7ffe76aa8f70) at muxer.c:1414
#18 0x00007f90247031e2 in call_iterator_next_method (capacity=15, user_count=0x7ffe76aa8f70, msgs=0x449850, iterator=0x471570) at iterator.c:803
#19 bt_message_iterator_next (iterator=0x471570, msgs=msgs@entry=0x7ffe76aa8f78, user_count=user_count@entry=0x7ffe76aa8f70) at iterator.c:859
#20 0x00007f9023821514 in bx_view_consume (comp=0x43a7d0) at traces//babeltrace-plugin/component.cc:272
#21 0x00007f90246ff3d8 in consume_graph_sink (comp=0x43a7d0) at graph.c:447
#22 consume_sink_node (graph=0x43b7d0, node=0x442e00) at graph.c:491
#23 consume_no_check (api_func=<synthetic pointer>, graph=0x43b7d0) at graph.c:566
#24 bt_graph_run (graph=0x43b7d0) at graph.c:710
#25 0x0000000000408a81 in cmd_run (cfg=0x451eb0) at babeltrace2.c:2485
#26 main (argc=<optimized out>, argv=<optimized out>) at babeltrace2.c:2673
</pre>
<p>I did initial prints in gdb to see that this is not some kind of obvious memory corruption:<br /><pre>
(gdb) p stream_iter->trace
$1 = (struct lttng_live_trace *) 0x4721a0
(gdb) p stream_iter->trace->clock_class
$2 = (const bt_clock_class *) 0x0
(gdb) p stream_iter->trace[0]
$3 = {log_level = BT_LOGGING_LEVEL_WARNING, self_comp = 0x43c050, session = 0x471d70, id = 1, trace = 0x66fc30,
trace_class = 0x66bef0, metadata = 0x66bb00, clock_class = 0x0, stream_iterators = 0x442d20,
metadata_stream_state = LTTNG_LIVE_METADATA_STREAM_STATE_NOT_NEEDED}
(gdb) p stream_iter->trace->trace_class
$4 = (bt_trace_class *) 0x66bef0
(gdb) p stream_iter->trace->trace_class->stream_classes
$5 = (GPtrArray *) 0x43a4a0
(gdb) p stream_iter->trace->trace_class->stream_classes->len
$6 = 0
</pre></p>
<p>Unfortunately I can't attach the coredump here but I can provide any relevant information from it.</p> 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>