Wind River Support Network

HomeDefectsLIN1023-330
Fixed

LIN1023-330 : Babeltrace cannot handle negative clock offset

Created: Apr 27, 2023    Updated: Nov 14, 2024
Resolved Date: Nov 14, 2024
Found In Version: 10.23.30.1
Fix Version: 10.23.30.2
Severity: Severe
Applicable for: Wind River Linux LTS 23
Component/s: Userspace

Description

babeltrace v1.5.* has the following issue.

If Epoch is arbitrary (e.g. embedded system starting at 0, without any
network access), the "0" can be used as correlation point between
various components, and some components could start before the
correlation point. Therefore, especially in traces where the time is
meant to be shown in nanoseconds or cycles from the correlation point,
it also makes sense to have a negative time value.

It introduces API-breaking changes in the C and Python APIs, since we
need to be able to return negative time values, which were previously
used as errors (-1ULL).

The --offset and --offset-ns command line parameters can now take
negative offset (seconds and nanoseconds) values too.

The [sec.ns] format is used as fallback so we don't attempt to pass
a negative time value to POSIX time-formatting APIs.


This problem can be fixed by the following patch.
https://lists.openembedded.org/g/openembedded-core/message/171079?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Cbabeltrace%3A+Handle+negative+time+and+offset+from+Epoch%2C20%2C2%2C0%2C93941441

babeltrace v2.* had already be available, so the upstream and Yocto rejected to merge this patch.
Live chat
Online