Bug #329

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

Added by Tan le tran about 8 years ago. Updated about 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


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=./ ./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.



Updated by David Goulet about 8 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).



Updated by Mathieu Desnoyers about 8 years ago

  • Status changed from Feedback to Confirmed
  • Assignee set to Mathieu Desnoyers
  • Priority changed from Normal to High

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 about 8 years ago

  • Project changed from LTTng-tools to LTTng-UST

Updated by Mathieu Desnoyers about 8 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

Updated by Mathieu Desnoyers about 8 years ago

FYI, the test case is wrong.


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.



Also available in: Atom PDF