LTTng bugs repository: Issueshttps://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912024-02-21T17:04:43ZLTTng bugs repository
Redmine Babeltrace - Feature #1410 (New): Add pretty-print sink options to override how to format floatin...https://bugs.lttng.org/issues/14102024-02-21T17:04:43ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<p>Babeltrace 2, just like its predecessor babeltrace 1.5, uses "%g" to print floating point numbers.</p>
<p>It would be useful to let users optionally override the formatting for floating point numbers, perhaps with a pretty print sink option. They could then choose if exponent notation should be used or not, choose the precision, etc.</p> 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 #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 #1351 (Feedback): Babeltrace2 failes at a negative clock `offset`https://bugs.lttng.org/issues/13512022-03-21T06:30:01ZHeng Guo
<p>Below lttng packages are using in our project.<br />Lttng_tools: 2.12.3<br />Lttng_ust: 2.12.1<br />Babeltrace: 2.0.3</p>
<p>Get below babletrace2 error when we call "babeltrace2 lts21/live", lts21/live is folder name of trace data.<br /><pre>
01-02 06:43:13.098 1029 1029 E PLUGIN/CTF/META/IR-VISITOR get_unary_unsigned@visitor-generate-ir.c:800 [auto-disc-source-ctf-fs] At line 43 in metadata stream: Invalid constant unsigned integer.
01-02 06:43:13.099 1029 1029 E PLUGIN/CTF/META/IR-VISITOR visit_clock_decl_entry@visitor-generate-ir.c:4356 [auto-disc-source-ctf-fs] At line 43 in metadata stream: Unexpected unary expression for clock class's `offset` attribute.
01-02 06:43:13.099 1029 1029 E PLUGIN/CTF/META/IR-VISITOR visit_clock_decl@visitor-generate-ir.c:4530 [auto-disc-source-ctf-fs] At line 43 in metadata stream: Cannot visit clock class's entry: ret=-22
01-02 06:43:13.099 1029 1029 E PLUGIN/CTF/META/IR-VISITOR ctf_visitor_generate_ir_visit_node@visitor-generate-ir.c:4773 [auto-disc-source-ctf-fs] At line 44 in metadata stream: Cannot visit clock class: ret=-22
01-02 06:43:13.099 1029 1029 E PLUGIN/CTF/META/DECODER ctf_metadata_decoder_append_content@decoder.c:336 [auto-disc-source-ctf-fs] Failed to visit AST node to create CTF IR objects: mdec-addr=0xa245b0, ret=-22
01-02 06:43:13.099 1029 1029 E PLUGIN/SRC.CTF.FS/META ctf_fs_metadata_set_trace_class@metadata.c:128 [auto-disc-source-ctf-fs] Cannot update metadata decoder's content.
01-02 06:43:13.099 1029 1029 E PLUGIN/SRC.CTF.FS ctf_fs_component_create_ctf_fs_trace_one_path@fs.c:1204 [auto-disc-source-ctf-fs] Cannot create trace for `/root/lts21/live/xmu03/session-19700101-000023/ust/uid/0/32-bit`.
01-02 06:43:13.099 1029 1029 W LIB/GRAPH add_component_with_init_method_data@graph.c:973 Component initialization method failed: status=ERROR, comp-addr=0xa1be90, 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", comp-class-is-frozen=0, comp-class-so-handle-addr=0xa278f8, comp-class-so-handle-path="/usr/lib/babeltrace2/plugins/babeltrace-plugin-ctf.so", comp-input-port-count=0, comp-output-port-count=0
01-02 06:43:13.099 1029 1029 E CLI cmd_run_ctx_create_components_from_config_components@babeltrace2.c:2295 Cannot create component: plugin-name="ctf", comp-cls-name="fs", comp-cls-type=1, comp-name="auto-disc-source-ctf-fs"
01-02 06:43:13.099 1029 1029 E CLI cmd_run@babeltrace2.c:2480 Cannot create components.
ERROR: [Babeltrace CLI] (../../../git/src/cli/babeltrace2.c:2480)
Cannot create components.
CAUSED BY [Babeltrace CLI] (../../../git/src/cli/babeltrace2.c:2295)
Cannot create component: plugin-name="ctf", comp-cls-name="fs", comp-cls-type=1, comp-name="auto-disc-source-ctf-fs"
CAUSED BY [libbabeltrace2] (../../../../git/src/lib/graph/graph.c:973)
Component initialization method failed: status=ERROR, comp-addr=0xa1be90, 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", comp-class-is-frozen=0, comp-class-so-handle-addr=0xa278f8, comp-class-so-handle-path="/usr/lib/babeltrace2/plugins/babeltrace-plugin-ctf.so", comp-input-port-count=0, comp-output-port-count=0
CAUSED BY [auto-disc-source-ctf-fs: 'source.ctf.fs'] (../../../../../git/src/plugins/ctf/fs-src/fs.c:1204)
Cannot create trace for `/root/lts21/live/xmu03/session-19700101-000023/ust/uid/0/32-bit`.
</pre></p>
<p>Seems the same issue to <a class="external" href="https://bugs.lttng.org/issues/1277">https://bugs.lttng.org/issues/1277</a>, but there is not fix patch yet.<br />We have the same issue on babeltrace version 1.5.8 too, <a class="external" href="https://bugs.lttng.org/issues/1350">https://bugs.lttng.org/issues/1350</a></p>
<p>We fix it with the attached patch: which is based on latest branch: stable-2.0.<br />Please help check it.</p>
<p>Thanks.</p> Babeltrace - Bug #1350 (Feedback): Babeltrace failes at a negative clock `offset`https://bugs.lttng.org/issues/13502022-03-17T07:08:14ZHeng Guo
<p>Below lttng packages are using in our project.<br />Lttng_tools: 2.12.3<br />Lttng_ust: 2.12.1<br />Babeltrace: 1.5.8</p>
<p>1.<br />In Lttng live mode, we get below babletrace error when we call "babeltrace --clock-date --no-delta -i lttng-live net://localhost/host/xxxxx/session" <br /><pre>
[error] ctf_clock_declaration_visit: unexpected unary expression for clock offset
[error] ctf_visitor_construct_metadata: clock declaration error
[error] Error in CTF metadata constructor -22
[error] [Context] Cannot open_mmap_trace of format ctf.
[error] Error adding trace
[warning] [Context] Cannot open_trace of format lttng-live at path net://localhost/host/xxxxx/session.
[warning] [Context] cannot open trace "net://localhost/host/xxxxx/session" for reading.
[error] opening trace "net://localhost/host/xxxxx/session" for reading.
[error] none of the specified trace paths could be opened.
</pre></p>
<p>Finally we port commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852 from master branch to 1.5.8, then the issue is fixed.</p>
<p>2. With this commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852, we find test case: tests/bin/intersection/test_intersection fails.<br />1) The 1st reason is wrong clock offset_s = 1351530929945824323, refer to below :<br /><pre>
cat tests/ctf-traces/intersection/3eventsintersect/metadata
.....
clock {
name = test_clock;
uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140";
description = "This is a test clock";
freq = 1000000000;
precision = 10;
offset_s = 1351530929945824323;
offset = 0;
absolute = TRUE;
};
</pre><br />There is a overflow in clock_offset_ns() if clock offset_s = 1351530929945824323.<br /><pre>
static inline
uint64_t clock_offset_ns(struct ctf_clock *clock)
{
return clock->offset_s * 1000000000ULL
+ clock_cycles_to_ns(clock, clock->offset);
}
</pre></p>
<p>Double check the babeltrace 2, it is already fixed to "offset_s = 13515309;" in tests/data/ctf-traces/intersection/3eventsintersect/metadata</p>
<p>2) The 2nd reason is the regression of commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852. uint64_t should be changed to int64_t in some codes related to option "--stream-intersection".<br />Attach 3 related patches based on branch remotes/origin/stable-1.5.</p>
<p>So why commit 61cf588beae752e5ddfc60b6b5310f769ac9e852 is not merged to branch 1.5? Is there any reason or side effect of this commit?</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 - Feature #1300 (New): babeltrace2 lacks knowledge of bitwise enum produced by lttng-m...https://bugs.lttng.org/issues/13002021-03-23T17:41:47ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<p>This is a follow up on <a class="external" href="https://review.lttng.org/c/babeltrace/+/3045">https://review.lttng.org/c/babeltrace/+/3045</a> now that end users are starting to contact us wondering why up-to-date lttng and babeltrace2 show incomplete information for bitwise enums.</p>
<p>I think we should implement a better stop-gap solution while awaiting CTF2. I recommend that we specialize the babeltrace2 CTF input plugin to detect traces produced by the lttng-modules kernel tracer, for specific known (hardcoded) events and fields which have a bitwise enum semantic, and use this hardcoded knowledge to print the correct bitwise enum to the end user rather than "<unknown>".</p>
<p>This should ensure the current producer/consumer tools work well together (show complete information about those bitwise enums) without requiring to modify tons of documentation about the specific flags needed for bt2 to handle lttng traces appropriately. And this would not lead to misleading scenarios where we print an unknown value as a bitwise enum by mistake.</p>
<p>Hardcoded producer detection/event/fields is of course a last resort solution awaiting proper self-description in the upcoming CTF2 spec.</p> Babeltrace - Bug #1289 (New): docs: document that the "notext" flag is required to build out of t...https://bugs.lttng.org/issues/12892020-11-04T22:06:23ZJérémie Galarneaujeremie.galarneau@efficios.com
<p>This is related to the gerrit change <a href="https://review.lttng.org/c/babeltrace/+/4228" class="external">4228</a></p>
<p>When building an out-of-tree plug-in, users of LLVM ld (freeBSD, but also maybe macOS?) must ensure they pass the 'notext' flag.<br />See the discussion on the gerrit change for more context.</p>
<p>This should probably be documented under <a href="https://github.com/efficios/babeltrace/blob/43c59509042845f8d42c3e99ec74d45fa2dc0908/doc/api/libbabeltrace2/dox/guides.dox#L101" class="external">Compile and link a Babeltrace 2 shared object plugin of guides.dox</a></p> Babeltrace - Feature #1233 (New): Python: Add __str__ to Message types, and perhaps other typeshttps://bugs.lttng.org/issues/12332020-02-17T21:49:43ZSimon Marchisimon.marchi@polymtl.ca
<p>Example use case: I assume that when implementing a sink, people will print() the messages they receive at first. It would be nice if the output was more useful than:</p>
<pre>
<bt2.message._EventMessage object @ 0x607000006530>
<bt2.message._PacketEndMessage object @ 0x6070000065a0>
<bt2.message._PacketBeginningMessage object @ 0x607000006760>
<bt2.message._PacketBeginningMessage object @ 0x6070000049a0>
<bt2.message._EventMessage object @ 0x607000004c40>
<bt2.message._EventMessage object @ 0x607000006a00>
<bt2.message._PacketEndMessage object @ 0x607000006a70>
<bt2.message._PacketBeginningMessage object @ 0x607000006c30>
<bt2.message._EventMessage object @ 0x607000006530>
<bt2.message._PacketEndMessage object @ 0x607000004cb0>
<bt2.message._PacketBeginningMessage object @ 0x607000004e70>
</pre> Babeltrace - Bug #1232 (New): src.ctf.fs: variant option names without their tag equivalent are a...https://bugs.lttng.org/issues/12322020-02-17T21:40:34ZPhilippe Proulxeeppeliteloop@gmail.com
<p>See the attached trace. The metadata is valid for <code>src.ctf.fs</code>, however there's a variant option name (<code>d</code>) without its member in the tag, and there's a tag member (<code>a</code>) without an equivalent variant option name. The trace contains the byte 0 followed with a string. This means the tag's value is <code>a</code>, but then the variant option does not exist. This happens:</p>
<pre>
03-26 15:20:28.111 13242 13242 W PLUGIN-CTF-FS-SRC add_ds_file_to_ds_file_group@fs.c:672 Failed to index CTF stream file '/tmp/zzz/allo'
03-26 15:20:28.111 13242 13242 W PLUGIN-CTF-MSG-ITER bfcr_borrow_variant_selected_field_class_cb@msg-iter.c:2354 Cannot find variant field class's option: notit-addr=0x5557cd2a14f0, var-fc-addr=0x5557cd2ad0a0, u-tag=0, i-tag=0
03-26 15:20:28.111 13242 13242 W PLUGIN-CTF-MSG-ITER read_dscope_begin_state@msg-iter.c:581 BFCR failed to start: notit-addr=0x5557cd2a14f0, bfcr-addr=0x5557cd2a1680, status=BT_BFCR_STATUS_ERROR
03-26 15:20:28.111 13242 13242 W PLUGIN-CTF-MSG-ITER read_event_payload_begin_state@msg-iter.c:1393 Cannot decode event payload field: notit-addr=0x5557cd2a14f0, event-class-addr=0x5557cd2a7200, event-class-name="allo", event-class-id=0, fc-addr=0x5557cd2a7990
03-26 15:20:28.111 13242 13242 W PLUGIN-CTF-MSG-ITER bt_msg_iter_get_next_message@msg-iter.c:2769 Cannot handle state: notit-addr=0x5557cd2a14f0, state=STATE_DSCOPE_EVENT_PAYLOAD_BEGIN
babeltrace: msg-iter.c:1366: read_event_payload_begin_state: Assertion `!notit->dscopes.event_payload' failed.
</pre> Babeltrace - Bug #1230 (New): flt.utils.trimmer: local time can be nonexistent or ambiguous with DSThttps://bugs.lttng.org/issues/12302020-02-17T21:23:16ZPhilippe Proulxeeppeliteloop@gmail.com
<p>In Canada, this time is nonexistent:</p>
<pre>
2019-03-10 2:30
</pre>
<p>This specific time does not exist because DST starts on <code>2019-03-10 2:00</code> (so the local time becomes <code>2019-03-10 3:00</code>, with DST).</p>
<p>This time is ambiguous:</p>
<pre>
2019-11-03 1:30
</pre>
<p>This time occurs twice because DST ends <code>2019-11-03 2:00</code> (so the local time becomes <code>2019-11-03 1:00</code> <em>again</em>, but without DST).</p>
<p>Currently <code>flt.utils.trimmer</code> guesses times when you specify one of these:</p>
<ol>
<li>When you specify <code>2019-03-10 2:30</code> to <code>mktime()</code>, it returns a timestamp which, converted back to a local date/time, is <code>2019-03-10 3:30</code> (with DST). I believe this is unexpected and a completely arbitrary decision.</li>
<li>When you specify <code>2019-11-03 1:30</code> to <code>mktime()</code> and set the <code>tm_isdst</code> member to <code>-1</code>, it returns a timestamp which, converted back to a local date/time, is <code>2019-11-03 1:30</code> (with DST). This is also a completely arbitrary decision.</li>
</ol>
<p>I am disappointed that <code>mktime()</code> does not return an error with a specific code for what's happening in those situations.</p>
<p>To avoid such completely arbitrary decisions, we need a date/time format with which you can specify the time zone, or at least that for your local time zone, when the time is ambiguous, you want it on the DST side or not.</p>
<p><a class="user active" href="https://bugs.lttng.org/users/8">Simon Marchi</a> suggested to use <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external">ISO 8601</a>, as more and more of our tools use this standard, and GLib <a href="https://developer.gnome.org/glib/stable/glib-Date-and-Time-Functions.html#g-time-val-to-iso8601" class="external">has functions</a> to deal with this format. I also checked and it supports having nanoseconds (any number of digits in fact) after seconds (and even after minutes and hours), for example:</p>
<pre>
2019-05-01T18:52:47.192838473
2019-05-01T18:52:47.192838473-04
2019-05-01T18:52:47.192838473Z
18:52:47.192838473
18:52:47.192838473-04
18:52:47.192838473Z
</pre>
<p>All those are valid ISO 8601 date/times. I don't know if GLib can parse nanoseconds however; we could have to parse this part ourselves.</p>
<p>To fix issue 1 (<code>2019-03-10 2:30</code>: nonexistent time), we need to detect that the time does not exist, instead of silently adding one hour, and fail (report nonexistent time).</p>
<p>To fix issue 2 (<code>2019-11-03 1:30</code>: ambiguous time), we need to fail (report ambiguous time) and ask the user to specify the time zone to indicate if DST was ended or not, one of (for Canada):</p>
<pre>
2019-11-03T01:30-04
2019-11-03T01:30-05
</pre>
<p>I hope GLib functions can detect that when you don't specify a time zone (local time).</p> Babeltrace - Bug #1229 (New): flt.utils.trimmer: with no date, beginning time cannot be greater t...https://bugs.lttng.org/issues/12292020-02-17T21:18:06ZPhilippe Proulxeeppeliteloop@gmail.com
<p>If you specify</p>
<pre>
begin="22:34", end="02:17"
</pre>
<p>to <code>flt.utils.trimmer</code>, it fails to initialize and logs that the the beginning time is greater than the end time.</p>
<p>However, it is implicit that, without dates specified, any combination of beginning and end times is correct, and we assume a maximum delta of 23h59:59.999999999. In other words, in the example above, we want to trim from 22:34 to 2:17 the following day.</p>
<p>Would this be accepted:</p>
<pre>
begin="2019-04-11 22:34", end="02:17"
</pre>
<p>Or this:</p>
<pre>
begin="22:34", end="2019-04-12 02:17"
</pre>
<p>If so, we don't need any message to deduce the end time's date. But this is not currently supported.</p> Babeltrace - Bug #1227 (New): cli: Error when using --clock-cycles and -c sink.text.pretty at the...https://bugs.lttng.org/issues/12272020-02-17T21:11:48ZSimon Marchisimon.marchi@polymtl.ca
<p>When using both <code>--clock-cycles</code> and <code>-c sink.text.pretty</code> at the same time, the cli tries to instantiate two pretty components:</p>
<pre>
Source component instances:
'source.test-trimmer.TheSourceOfAllEvil':
Name: source.test-trimmer.TheSourceOfAllEvil
Parameters:
{ }
Filter component instances:
'filter.utils.muxer':
Name: muxer
Parameters:
{ }
'filter.utils.trimmer':
Name: trimmer
Parameters:
begin: 350
Sink component instances:
'sink.text.pretty':
Name: sink.text.pretty
Parameters:
{ }
'sink.text.pretty':
Name: pretty
Parameters:
verbose: yes
clock-cycles: yes
Connections:
source.test-trimmer.TheSourceOfAllEvil.* -> muxer.*
muxer.* -> trimmer.*
trimmer.* -> sink.text.pretty.*
trimmer.* -> pretty.*
</pre>
<p>one of which has an input not connected. It later hits the assertion:</p>
<pre>
06-28 23:41:33.022 26827 26827 F LIB/MSG-ITER bt_self_component_port_input_message_iterator_create@iterator.c:427 Babeltrace 2 library precondition not satisfied; error is:
06-28 23:41:33.022 26827 26827 F LIB/MSG-ITER bt_self_component_port_input_message_iterator_create@iterator.c:427 Port is not connected: port-addr=0x607000002390, port-type=BT_PORT_TYPE_INPUT, port-name="in"
06-28 23:41:33.022 26827 26827 F LIB/MSG-ITER bt_self_component_port_input_message_iterator_create@iterator.c:427 Aborting...
</pre>