lttng team mailing list archive
-
lttng team
-
Mailing list archive
-
Message #01236
[Bug 1316617] [NEW] babeltrace unaligned access bus errors
Public bug reported:
Decoding an lttng user space trace on an ARM platform results in a bus
error. Gdb shows this to be:
0x4004358c in yyparse (scanner=0x19fe0, yyscanner=0x199f0)
at ctf-parser.y:1210
1210 $$->u.unary_expression.u.unsigned_constant = $1;
(gdb) where
#0 0x4004358c in yyparse (scanner=0x19fe0, yyscanner=0x199f0)
at ctf-parser.y:1210
#1 0x400380ca in ctf_trace_metadata_read (td=td@entry=0x1a600,
metadata_fp=metadata_fp@entry=0x0, scanner=0x19fe0, append=append@entry=0)
at ctf.c:1281
#2 0x40039d38 in ctf_open_trace_read (metadata_fp=0x0,
packet_seek=0x40039295 <ctf_packet_seek>, flags=0,
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", td=0x1a600) at ctf.c:2111
#3 ctf_open_trace (
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", flags=0, packet_seek=0x40039295 <ctf_packet_seek>, metadata_fp=0x0)
at ctf.c:2206
#4 0x400242f8 in bt_context_add_trace (ctx=ctx@entry=0x15f30,
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", format_name=format_name@entry=0x15ff0 "ctf",
packet_seek=packet_seek@entry=0x0, stream_list=stream_list@entry=0x0,
metadata=metadata@entry=0x0) at context.c:95
#5 0x0000a7d2 in bt_context_add_traces_recursive (ctx=ctx@entry=0x15f30,
path=path@entry=0x18968 "/home/phablet/lttng-traces/auto-20130101-023753", format_str=0x15ff0 "ctf", packet_seek=packet_seek@entry=0x0)
at babeltrace.c:529
#6 0x00009c86 in main (argc=<optimized out>, argv=<optimized out>)
A workaround is to enable misaligned access handling in the kernel:
echo 2 | sudo tee /proc/cpu/alignment
Alternatively, making struct ctf_node in formats/ctf/metadata/ctf-ast.h
packed using the gcc attribute __attribute__((packed())) seems to stop
this.
I think this is reported upstream too: https://bugs.lttng.org/issues/789
** Affects: babeltrace (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
LTTng, which is subscribed to babeltrace in Ubuntu.
Matching subscriptions: babeltrace-bugs
https://bugs.launchpad.net/bugs/1316617
Title:
babeltrace unaligned access bus errors
Status in “babeltrace” package in Ubuntu:
New
Bug description:
Decoding an lttng user space trace on an ARM platform results in a bus
error. Gdb shows this to be:
0x4004358c in yyparse (scanner=0x19fe0, yyscanner=0x199f0)
at ctf-parser.y:1210
1210 $$->u.unary_expression.u.unsigned_constant = $1;
(gdb) where
#0 0x4004358c in yyparse (scanner=0x19fe0, yyscanner=0x199f0)
at ctf-parser.y:1210
#1 0x400380ca in ctf_trace_metadata_read (td=td@entry=0x1a600,
metadata_fp=metadata_fp@entry=0x0, scanner=0x19fe0, append=append@entry=0)
at ctf.c:1281
#2 0x40039d38 in ctf_open_trace_read (metadata_fp=0x0,
packet_seek=0x40039295 <ctf_packet_seek>, flags=0,
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", td=0x1a600) at ctf.c:2111
#3 ctf_open_trace (
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", flags=0, packet_seek=0x40039295 <ctf_packet_seek>, metadata_fp=0x0)
at ctf.c:2206
#4 0x400242f8 in bt_context_add_trace (ctx=ctx@entry=0x15f30,
path=0x19ab0 "/home/phablet/lttng-traces/auto-20130101-023753/ust/uid/0/32-bit", format_name=format_name@entry=0x15ff0 "ctf",
packet_seek=packet_seek@entry=0x0, stream_list=stream_list@entry=0x0,
metadata=metadata@entry=0x0) at context.c:95
#5 0x0000a7d2 in bt_context_add_traces_recursive (ctx=ctx@entry=0x15f30,
path=path@entry=0x18968 "/home/phablet/lttng-traces/auto-20130101-023753", format_str=0x15ff0 "ctf", packet_seek=packet_seek@entry=0x0)
at babeltrace.c:529
#6 0x00009c86 in main (argc=<optimized out>, argv=<optimized out>)
A workaround is to enable misaligned access handling in the kernel:
echo 2 | sudo tee /proc/cpu/alignment
Alternatively, making struct ctf_node in formats/ctf/metadata/ctf-
ast.h packed using the gcc attribute __attribute__((packed())) seems
to stop this.
I think this is reported upstream too:
https://bugs.lttng.org/issues/789
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/babeltrace/+bug/1316617/+subscriptions
Follow ups
References