Project

General

Profile

Actions

Bug #1085

closed

segfault with Python bindings when accessing the trace_collection from an Event

Added by Julien Desfossez over 7 years ago. Updated about 4 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
12/21/2016
Due date:
% Done:

0%

Estimated time:

Description

#!/usr/bin/env python3

import sys
import time
import argparse

from babeltrace import TraceCollection

traces = TraceCollection()
handle = traces.add_traces_recursive(sys.argv1, "ctf")
if handle is None:
sys.exit(1)

for event in traces.events:
print(event.trace_collection)

Master:
$ ./segfault.py /home/julien/lttng-traces/lttng-analysis-10071-20160527-145206/
<babeltrace.TraceCollection object at 0x7fef9f257780>
<babeltrace.TraceCollection object at 0x7fef9f2576d8>
Segmentation fault (core dumped)

stable-1.5:
$ ./segfault.py /home/julien/lttng-traces/lttng-analysis-10071-20160527-145206/
<babeltrace.TraceCollection object at 0x7fde8ad2e780>
<babeltrace.TraceCollection object at 0x7fde8ad2e6d8>
python3: ../../include/babeltrace/types.h:131: generic_rw: Assertion `pos->rw_table[dispatch_id] != NULL' failed.
Aborted (core dumped)

$ file core
core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'python3 ./lttng-periodfreq /home/julien/lttng-traces/lttng-analysis-8413-201610'

GDB:
Core was generated by `python3 ./lttng-periodfreq /home/julien/lttng-traces/lttng-analysis-8413-201610'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff0b79865d6 in _ctf_visitor_semantic_check (fd=0x7ff0b7e44120, depth=<optimized out>, node=<optimized out>) at ctf-visitor-semantic-validator.c:899
899 bt_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
(gdb) bt
#0 0x00007ff0b79865d6 in _ctf_visitor_semantic_check (fd=0x7ff0b7e44120, depth=<optimized out>, node=<optimized out>) at ctf-visitor-semantic-validator.c:899
#1 0x0000000000a41190 in ?? ()

Actions #1

Updated by Jonathan Rajotte Julien about 4 years ago

  • Status changed from New to Invalid

The state of babeltrace changed a lot.

Closing as invalid. If this still applies to Babeltrace 2, please create a new issue.

Actions

Also available in: Atom PDF