[graph-tool-tickets] [graph-tool] Ticket #149: Segfault when drawing a graph

graph-tool webmaster at skewed.de
Wed Dec 4 10:30:03 UTC 2013


#149: Segfault when drawing a graph
testing defect
---------------------------------------------------------------------
Reporter: daniel at danifold.net
Owner: tiago peixoto
Priority: normal
Milestone: 2.2

---------------------------------------------------------------------
Comment (by daniel at danifold.net):

Yes, I am using the latest git version (commit [995c8809de191ae6e8b12342d1671053a509a1d1]). Below is the backtrace as requested. I also bisected the Python code to find the exact spot where the segfault occurs: It's in graphviz_draw.py, line 470:
{{{
    ge = libgv.agedge(gvg,
                      libgv.agnode(gvg, str(int(e.source())).encode("utf8")),
                      libgv.agnode(gvg, str(int(e.target())).encode("utf8")))
}}}
(The libgv.agnode doesn't produce the segfault, it's the call to libgv.agedge.)

Here is the backtrace:
{{{
[muellner at desktop ~]$ gdb python
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python3.3...(no debugging symbols found)...done.
(gdb) run gttest.py 
Starting program: /usr/bin/python gttest.py
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffd1e2e700 (LWP 2498)]
[New Thread 0x7fffd085d700 (LWP 2501)]
[New Thread 0x7fffcbfff700 (LWP 2502)]
[New Thread 0x7fffcb7fe700 (LWP 2503)]
[New Thread 0x7fffcaffd700 (LWP 2504)]
[New Thread 0x7fffca7fc700 (LWP 2505)]
[New Thread 0x7fffc9ffb700 (LWP 2506)]
[New Thread 0x7fffc97fa700 (LWP 2507)]
Start drawing

Program received signal SIGSEGV, Segmentation fault.
0x00007fffd0e8189f in agmapnametoid () from /usr/lib/libcgraph.so.6
(gdb) bt
#0  0x00007fffd0e8189f in agmapnametoid () from /usr/lib/libcgraph.so.6
#1  0x00007fffd0e7f715 in agedge () from /usr/lib/libcgraph.so.6
#2  0x00007ffff2b01d8c in ffi_call_unix64 () from /usr/lib/libffi.so.6
#3  0x00007ffff2b016bc in ffi_call () from /usr/lib/libffi.so.6
#4  0x00007ffff2d1421b in _ctypes_callproc () from /usr/lib/python3.3/lib-dynload/_ctypes.cpython-33m.so
#5  0x00007ffff2d0e62f in ?? () from /usr/lib/python3.3/lib-dynload/_ctypes.cpython-33m.so
#6  0x00007ffff79ca1bc in PyObject_Call (func=func at entry=0x7fffd38b3a10, arg=arg at entry=0x7ffff691eb40, kw=kw at entry=0x0)
    at Objects/abstract.c:2064
#7  0x00007ffff7a759ff in do_call (nk=<optimized out>, na=<optimized out>, pp_stack=0x7fffffffdf20, func=<optimized out>)
    at Python/ceval.c:4289
#8  call_function (oparg=<optimized out>, pp_stack=0x7fffffffdf20) at Python/ceval.c:4092
#9  PyEval_EvalFrameEx (f=f at entry=0x1216900, throwflag=throwflag at entry=0) at Python/ceval.c:2679
#10 0x00007ffff7a793b1 in PyEval_EvalCodeEx (_co=_co at entry=0x7fffd162a540, globals=<optimized out>, locals=locals at entry=0x0, 
    args=<optimized out>, argcount=argcount at entry=1, kws=0x69cf38, kwcount=6, defs=0x7fffe7218b08, defcount=27, kwdefs=0x0, 
    closure=0x0) at Python/ceval.c:3439
#11 0x00007ffff7a783b9 in fast_function (nk=<optimized out>, na=1, n=<optimized out>, pp_stack=0x7fffffffe140, func=<optimized out>)
    at Python/ceval.c:4167
#12 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe140) at Python/ceval.c:4090
#13 PyEval_EvalFrameEx (f=f at entry=0x69cdb0, throwflag=throwflag at entry=0) at Python/ceval.c:2679
#14 0x00007ffff7a793b1 in PyEval_EvalCodeEx (_co=_co at entry=0x7ffff6c76930, globals=globals at entry=0x7ffff6c197e8, 
    locals=locals at entry=0x7ffff6c197e8, args=args at entry=0x0, argcount=argcount at entry=0, kws=kws at entry=0x0, kwcount=kwcount at entry=0, 
    defs=defs at entry=0x0, defcount=defcount at entry=0, kwdefs=kwdefs at entry=0x0, closure=closure at entry=0x0) at Python/ceval.c:3439
#15 0x00007ffff7a7947b in PyEval_EvalCode (co=co at entry=0x7ffff6c76930, globals=globals at entry=0x7ffff6c197e8, 
    locals=locals at entry=0x7ffff6c197e8) at Python/ceval.c:771
#16 0x00007ffff7a92be4 in run_mod (mod=<optimized out>, filename=filename at entry=0x7ffff6c299b0 "gttest.py", 
    globals=globals at entry=0x7ffff6c197e8, locals=locals at entry=0x7ffff6c197e8, flags=flags at entry=0x7fffffffe400, 
    arena=arena at entry=0x604000) at Python/pythonrun.c:1995
#17 0x00007ffff7a94918 in PyRun_FileExFlags (fp=fp at entry=0x6da050, filename=filename at entry=0x7ffff6c299b0 "gttest.py", 
    start=start at entry=257, globals=globals at entry=0x7ffff6c197e8, locals=locals at entry=0x7ffff6c197e8, closeit=closeit at entry=1, 
    flags=flags at entry=0x7fffffffe400) at Python/pythonrun.c:1951
#18 0x00007ffff7a95641 in PyRun_SimpleFileExFlags (fp=fp at entry=0x6da050, filename=<optimized out>, closeit=closeit at entry=1, 
    flags=flags at entry=0x7fffffffe400) at Python/pythonrun.c:1451
#19 0x00007ffff7a96453 in PyRun_AnyFileExFlags (fp=fp at entry=0x6da050, filename=<optimized out>, closeit=closeit at entry=1, 
    flags=flags at entry=0x7fffffffe400) at Python/pythonrun.c:1173
#20 0x00007ffff7aaa097 in run_file (p_cf=0x7fffffffe400, filename=0x629ff0 L"gttest.py", fp=0x6da050) at Modules/main.c:307
#21 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:744
#22 0x0000000000400b29 in main ()
(gdb) q
A debugging session is active.

	Inferior 1 [process 2493] will be killed.

Quit anyway? (y or n) y
[muellner at desktop ~]$ 
}}}
--
Ticket URL: <URL:http://graph-tool.skewed.de/ticket/149>
graph-tool <URL:http://graph-tool.skewed.de>
An efficient python module for graph analysis and manipulation.


More information about the graph-tool-tickets mailing list