Bug #329
closedInstrumented App get SegFault when filtering on a string field is activated
100%
Description
Version used:
userspace-rcu: origin/master, commit ae51baf
lttng-ust : origin/master, commit 9e4d42a
lttng-tools : origin/master, commit 5168918
When the following filter is enabled: --filter "stringfield=='text'"
for tracepoint: ust_tests_demo2:loop from program "demo" which is
supplied with lttng-ust/test/, the demo program gets segmentation
fault when the session is started.
Steps to reproduce:
1)_ lttng create TC4 -o /cluster/temp/sessiondir/TC4_c
2)_ lttng enable-event ust_tests_demo2:loop -u --filter "stringfield=='text'"
3)_ LTTNG_UST_DEBUG=1 ./demo-trace 50 &
4)_ lttng start
5)_ ./demo-trace: line 3: 14504 Segmentation fault LD_PRELOAD=./liblttng-ust-provider-ust-tests-demo.so:./liblttng-ust-provider-ust-tests-demo3.so ./demo ${*}
The above has been also observed when using our own instrumented application.
(ie: when a filter on a string is given, segmentation fault will occur for the instr app)
Please, see log enclosed.
Files
Updated by David Goulet over 12 years ago
- Status changed from New to Feedback
Can you reproduce it with the latest lttng-ust ?
I'm unable here to reproduce it on my side so, if you can, sending us the GDB backtrace or at least the segfault address could be useful (found in dmesg).
The log attached to the bug seems fine and does not contain any critical errors (from the session daemon stand point).
David
Updated by Mathieu Desnoyers over 12 years ago
- Status changed from Feedback to Confirmed
- Assignee set to Mathieu Desnoyers
- Priority changed from Normal to High
Tracing...
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff721be8a in stack_strcmp (stack=0x7fffffffdaf0, top=3,
cmp_type=0x7ffff723c431 "==") at lttng-filter-interpreter.c:61
61 if (unlikely(p - estack_bx(stack, top)->u.s.str > estack_bx(stack, top)->u.s.seq_len || *p == '\0')) {
working on it.
Updated by Mathieu Desnoyers over 12 years ago
- Project changed from LTTng-tools to LTTng-UST
Updated by Mathieu Desnoyers over 12 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset 27f4b6094f399f2fe231b58801dce98cbd21baa9.
Updated by Mathieu Desnoyers over 12 years ago
FYI, the test case is wrong.
line:
2)_ lttng enable-event ust_tests_demo2:loop -u --filter "stringfield=='text'"
should be:
2)_ lttng enable-event ust_tests_demo2:loop -u --filter 'stringfield=="text"'
Notice that the single quotes are outside, and double-quotes inside. This follows the lttng(1) manpage.
Thanks,
Mathieu