[lttng-dev] Babeltrace trimmer segfaults on custom trace

Simon Marchi simon.marchi at polymtl.ca
Wed May 5 09:45:58 EDT 2021


On 2021-05-04 9:57 p.m., Simon Marchi via lttng-dev wrote:
> I tried to see if it would be possible for you
> to just not use packets, but unfortunately I stumbled on what looks like
> a bug in the CTF metadata parser, it hardcodes whether streams classes
> have packets to true:
> 
>   https://github.com/efficios/babeltrace/blob/534d93a8b2ba86f56dfdf6aa7a10911da5f6432c/src/plugins/ctf/common/metadata/ctf-meta-translate.c#L576

Hi Dimitri,

After talking with Philippe (Babeltrace 2's main contributor), this is
not a bug in the CTF metadata parser.  According to [1]:

    If the packet size field is missing, the whole stream only contains a single packet. 

So when if you don't have a packet header/context at all, the trace is
considered to have a single big packet.  That's why the metadata parser
always create streams with packets.

But the suggestion of adding timestamps to your packet is still valid.

Simon

[1] https://diamon.org/ctf/#spec5.2


More information about the lttng-dev mailing list