0

I used Ubunto 16.04, Lttng 2.8.1 and python3.5.2. I also installed python3-babeltrace package. The first step was I recorded some logs exactly based on Lttng documents with lttng create, evenet-enable, start, stop, destroy. In the second step I write a very simple python program to read lttng events, some thing like this:

from collections import Counter
import babeltrace
import sys

print("Start")

trace_path = sys.argv[1]

print("1-Get Path")

col = babeltrace.TraceCollection()

print("2-TraceCollection")

# (LTTng traces always have the 'ctf' format)
if col.add_trace(trace_path, 'ctf') is None:
    raise RuntimeError('Cannot add trace')

print("3-Add trace by ctf")

for event in col.events:
    print(event.name)

print("4-Get all events") 

then I debug the program with gdb and after this outputs:

Start
1-Get Path
2-TraceCollection
3-Add trace by ctf

I got the error:

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff565d97f in bt_iter_add_trace () from /usr/lib/x86_64-linux-gnu/libbabeltrace.so.1

Does any one have any idea about this?

I uninstall all of the packages, also uninstall ubuntu and then installed again but each time I got the same error. I also try to install Ubuntu 16.10 but with that one I got another error in lttng-module package installation.

Update:

I found that none of babeltrace command and lttng view not worked, and caused the segmentation fault error.

Saeid
  • 13,224
  • 32
  • 107
  • 173
  • I found something that solved the problem. I don't know why but against Lttng Docs, for install Lttng on Ubuntu 16.04 I don't use ppa:lttng/stable-2.8 and normally install it like Ubuntu 16.10. – Saeid Nov 20 '16 at 15:35
  • The LTTng Documentation says: _LTTng 2.8 is available on Ubuntu 16.10 Yakkety Yak. For previous releases of Ubuntu, use the LTTng Stable 2.8 PPA._ So why did you pretend to do this "against Lttng Docs"? – eepp Nov 21 '16 at 17:26
  • @eepp First I do exactly the Lttng documents said: used of LTTng Stable 2.8 PPA that caused the error in this question (lttng view and babeltrace commands caused error), then I try without use of LTTng Stable 2.8 PPA and that worked. – Saeid Nov 21 '16 at 17:44

0 Answers0