Project

General

Profile

Actions

Bug #1146

open

LD_PRELOAD applications using lttng-ust-pthread

Added by Majid Rezazadeh over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/12/2018
Due date:
% Done:

0%

Estimated time:

Description

I am using lttng-ust-libc-wrapper for instrumenting some calls to libc for some applications like Firefox and Chrome, but I receive "Segmentation fault (core dumped)". I compile lttng-ust-pthread.c (gcc -fPIC -shared -o test.so lttng-ust-pthread.c -ldl) and then I use "LD_PRELOAD=test.so firefox" but I receive segmentation fault (I have exported LD_LIBRARY_PATH to the absolute path of test.so file). I found out that when I replace tracepoints with printf in lttng_ust_pthread.c, I receive no error. It seems that hooking tracepoints in this wrapper makes some problems. However, I used gdb to discover the problem but I could get the following information:

(gdb) thread apply all bt
(gdb) run
Starting program: /usr/bin/env LD_PRELOAD=test.so google-chrome
process 34004 is executing new program: /bin/bash
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7de76a8 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) bt full
#0 0x00007ffff7de76a8 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#1 0x00007ffff7de77f3 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#2 0x00007ffff7de1e4a in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#3 0x00007ffff7de6db4 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#4 0x00007ffff7def517 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#5 0x00007fffffffe898 in ?? ()
No symbol table info available.
#6 0x00007fffffffe8a8 in ?? ()
No symbol table info available.
#7 0x00007fffffffe8b3 in ?? ()
No symbol table info available.
#8 0x00007fffffffe8dd in ?? ()
No symbol table info available.
#9 0x00007fffffffe90c in ?? ()
No symbol table info available.
#10 0x00007fffffffe929 in ?? ()
No symbol table info available.

Do you have any idea in this regard?

No data to display

Actions

Also available in: Atom PDF