Project

General

Profile

Actions

Bug #1389

open

src.ctf.fs crash with invalid trace

Added by Simon Marchi over 1 year ago. Updated 27 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
09/18/2023
Due date:
% Done:

0%

Estimated time:

Description

Using the attached trace, I get:

$ ./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...


Files

trace.tgz (430 Bytes) trace.tgz Simon Marchi, 09/18/2023 04:16 PM
traces.zip (5.59 KB) traces.zip Marin Jurjević, 03/05/2025 03:15 AM
Actions #1

Updated by Simon Marchi over 1 year ago

A bit more details: I think the trace was valid until I added the uint8_t timestamp; line in the event header. With that line added (and without adjusting the data stream), the data stream is too short, it ends in the middle of an event, and babeltrace doesn't seem to like it.

Actions #3

Updated by Simon Marchi 10 months ago

This still fails with the ctf2 branch, but with a different error:

05-23 11:58:14.164 246275 246275 F LIB/ASSERT-COND bt_lib_assert_cond_failed@/home/smarchi/src/babeltrace/src/lib/assert-cond.c:66 Condition ID: `pre:message-packet-beginning-create-with-default-clock-snapshot:without-default-clock-snapshot`.
05-23 11:58:14.164 246275 246275 F LIB/ASSERT-COND bt_lib_assert_cond_failed@/home/smarchi/src/babeltrace/src/lib/assert-cond.c:68 Function: bt_message_packet_beginning_create_with_default_clock_snapshot().
05-23 11:58:14.164 246275 246275 F LIB/ASSERT-COND bt_lib_assert_cond_failed@/home/smarchi/src/babeltrace/src/lib/assert-cond.c:69 ------------------------------------------------------------------------
05-23 11:58:14.164 246275 246275 F LIB/ASSERT-COND bt_lib_assert_cond_failed@/home/smarchi/src/babeltrace/src/lib/assert-cond.c:70 Error is:
05-23 11:58:14.164 246275 246275 F LIB/ASSERT-COND bt_lib_assert_cond_failed@/home/smarchi/src/babeltrace/src/lib/assert-cond.c:72 Unexpected stream class configuration when creating a packet beginning or end message: no default clock snapshot is needed, but one was provided: stream-addr=0x50c00001cd80, stream-id=0, stream-name="/home/smarchi/Downloads/trace/channel0_0", stream-stream-class-addr=0x510000000c40, stream-stream-class-id=0, stream-trace-class-addr=0x508000002620, stream-trace-addr=0x50d0000017d0, stream-trace-name="", stream-packet-pool-size=0, stream-packet-pool-cap=0, sc-addr=0x510000000c40, sc-id=0, sc-is-frozen=1, sc-event-class-count=1, sc-packet-context-fc-addr=(nil), sc-event-common-context-fc-addr=(nil), sc-assigns-auto-ec-id=0, sc-assigns-auto-stream-id=0, sc-supports-packets=1, sc-packets-have-begin-default-cs=0, sc-packets-have-end-default-cs=0, sc-supports-discarded-events=0, sc-discarded-events-have-default-cs=0, sc-supports-discarded-packets=0, sc-discarded-packets-have-default-cs=0, sc-trace-class-addr=0x508000002620, sc-pcf-pool-size=0, sc-pcf-pool-cap=0, with-cs=1, cs-val=0
Actions #4

Updated by Simon Marchi 28 days ago

Still fails with Babeltrace 2.1. Do we want to get this fixed and backport the fix to the 2.1 branch?

Actions #5

Updated by Marin Jurjević 28 days ago

Simon Marchi wrote in #note-3:

This still fails with the ctf2 branch, but with a different error:

[...]

I've encountered the same issue while using Zephyr RTOS and babeltrace2 (I'm using AUR package v2.1.0-1).

babeltrace2 tracing-native
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:63 Babeltrace 2 library precondition not satisfied.
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:65 ------------------------------------------------------------------------
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:66 Condition ID: `pre:message-packet-beginning-create-with-default-clock-snapshot:without-default-clock-snapshot`.
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:68 Function: bt_message_packet_beginning_create_with_default_clock_snapshot().
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:69 ------------------------------------------------------------------------
03-05 09:10:14.204 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:70 Error is:
03-05 09:10:14.205 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:72 Unexpected stream class configuration when creating a packet beginning or end message: no default clock snapshot is needed, but one was provided: stream-addr=0x555a687ec6e0, stream-id=0, stream-name="/home/marin/zephyrproject/zephyr/samples/subsys/tracing/tracing-native/channel0_0", stream-stream-class-addr=0x555a687da2d0, stream-stream-class-id=0, stream-trace-class-addr=0x555a688c08a0, stream-trace-addr=0x555a6884d460, stream-trace-name="", stream-packet-pool-size=0, stream-packet-pool-cap=0, sc-addr=0x555a687da2d0, sc-id=0, sc-is-frozen=0, sc-event-class-count=109, sc-packet-context-fc-addr=(nil), sc-event-common-context-fc-addr=(nil), sc-assigns-auto-ec-id=0, sc-assigns-auto-stream-id=0, sc-supports-packets=1, sc-packets-have-begin-default-cs=0, sc-packets-have-end-default-cs=0, sc-supports-discarded-events=0, sc-discarded-events-have-default-cs=0, sc-supports-discarded-packets=0, sc-discarded-packets-have-default-cs=0, sc-trace-class-addr=0x555a688c08a0, sc-pcf-pool-size=0, sc-pcf-pool-cap=0, with-cs=1, cs-val=0
03-05 09:10:14.205 122459 122459 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:75 Aborting...
[1]    122459 IOT instruction (core dumped)  babeltrace2 tracing-native

I've attached metadata and traces in zip archive.

Actions #6

Updated by Simon Marchi 27 days ago

Marin Jurjević wrote in #note-5:

Simon Marchi wrote in #note-3:

This still fails with the ctf2 branch, but with a different error:

[...]

I've encountered the same issue while using Zephyr RTOS and babeltrace2 (I'm using AUR package v2.1.0-1).

[...]

I've attached metadata and traces in zip archive.

Thanks, I confirm that it looks like the same bug, the backtraces look similar.

Actions

Also available in: Atom PDF