Project

General

Profile

Actions

Bug #1121

open

Babeltrace 2.0-pre reports negative timestamp with ctf-writer traces

Added by Anonymous over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/07/2017
Due date:
% Done:

0%

Estimated time:

Description

I am trying to read the following two traces with Babeltrace 2:
https://github.com/tracecompass/tracecompass-test-traces/tree/master/ctf/src/main/resources/ctfwriter_JF8nq3
https://github.com/tracecompass/tracecompass-test-traces/tree/master/ctf/src/main/resources/funky_trace

The timestamps are reported as negative, like this:

[-8828042786.100214613] (+0.000000001) Spammy_Event: { custom_packet_context_field = 2 }, { common_event_context = 29 }, { field_1 = 28169, a_string = "This is a test" }
[warning] Fallback to [sec.ns] to print negative time value. Use --clock-seconds.

The timestamps were reported correctly with Babeltrace 1 on the same traces.

Actions #1

Updated by Mathieu Desnoyers over 7 years ago

In those traces, the metadata has a clock offset_s value that clearly overflows
64-bit when transformed into nanoseconds, thus leading to the negative timestamps. e.g.:

offset_s = 1351530929945824323;

We're adding checks in babeltrace2 to refuse such metadata, and provide an appropriate error message.

You may want to use a much smaller offset_s value in the test case.

Actions

Also available in: Atom PDF