我用Ubunto 16.04,Lttng 2.8.1和python3.5.2。我还安装了python3 babeltrace包。第一步是使用Lttng create、evenet enable、start、stop和destroy,完全基于Lttng文档记录一些日志。在第二步中,我编写了一个非常简单的python程序来读取lttng事件,如下所示:
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")
然后我用gdb调试程序,然后输出:
Start
1-Get Path
2-TraceCollection
3-Add trace by ctf
我有个错误:
程序接收信号SIGSEGV,分段错误。 0x00007ffff565d97f在bt\u iter\u add\u trace()中 来自/usr/lib/x86\u 64-linux-gnu/libbabeltrace.so公司.1
有人知道吗?你知道吗
我卸载了所有的软件包,也卸载了ubuntu,然后再次安装,但每次都会出现同样的错误。 我也试着安装ubuntu16.10,但是在安装lttng模块包时,我又遇到了一个错误。你知道吗
更新:
我发现babeltrace命令和lttng视图都不起作用,导致了分割错误。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐