Project

General

Profile

Actions

Bug #329

closed

Instrumented App get SegFault when filtering on a string field is activated

Added by Tan le tran over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
High
Target version:
-
Start date:
09/03/2012
Due date:
% Done:

100%

Estimated time:

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

Actions #1

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

Actions #2

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.

Actions #3

Updated by Mathieu Desnoyers over 12 years ago

  • Project changed from LTTng-tools to LTTng-UST
Actions #4

Updated by Mathieu Desnoyers over 12 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100
Actions #5

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

Actions

Also available in: Atom PDF