Segmentation fault (core dumped)

Hi,
I just compiled graph-tool 2.2.17 from source under Ubuntu 12.10. When I
enter the command 'import graph_tool' in the python interpreter everything
appears to be working fine.

Whoever when I create a python script (say test.py) containing the command
'import graph_tool' and attempt to run this script from the terminal (using
the command python test.py) I get the error 'Segmentation fault (core
dumped)'.

I would really appreciate any help with this problem
Regards,
Padraig

Hi,

Is the seg fault gtk related ? (Maybe you could post the error message).

I experienced such a seg fault, due to conflicting backends in
matplotlib and graph_tool. A work around is to import matplotlib before
graph_tool:

     import matplotlib.pyplot as plt
     import graph_tool.all as gt

If I remove the first line, I get a seg fault with the following trace:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning:
g_boxed_type_register_static: assertion `g_type_from_name (name) == 0'
failed
   import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning:
specified class size for type `PyGtkGenericCellRenderer' is smaller than
the parent type's `GtkCellRenderer' class size
   from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_get_qdata: assertion `node != NULL' failed
   from gtk import _gtk
Erreur de segmentation (core dumped)

Hope this helps,

Cheers

Guillaume

Thanks Guillaume,
No the the seg fault is not gtk related. The error message is the single
line "Segmentation fault (core dumped)"; a script containing the single line
"import graph_tool" generates this error.

The strange thing is that any program I write appears to execute correctly
but then throws this error as the program terminates.

Padraig

I think you are seeing the same problem as http://projects.skewed.de/graph-tool/ticket/117

Would you please run your script in gdb and provide a stack trace of the
crash?

Also, which version of python and boost are you using?

Cheers,
Tiago

Hi
the trace is below. I am running Python 2.7.3 and Boost 1.49. Yes it looks
to same problem indeed.
Padraig

$ gdb python
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html&gt;
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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/&gt;\.\.\.
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run test.py
Starting program: /usr/bin/python test.py
[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.
0x00000000004b5d5a in ?? ()
(gdb) bt
#0 0x00000000004b5d5a in ?? ()
#1 0x00000000004ef748 in ?? ()
#2 0x000000000048a57e in ?? ()
#3 0x00007ffff6f1f901 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff6f1f985 in exit () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x00007ffff6f05774 in __libc_start_main ()
   from /lib/x86_64-linux-gnu/libc.so.6
#6 0x00000000004ce0ad in _start ()

Hi,

Hi,
I compiled graph-tool myself but I'm just using the Ubuntu Boost package;
I'm actually using the offical Ubuntu versions of Boost and GCC.
Thanks

Does the problem disappear if you disable OpenMP?

Ubuntu provides several GCC versions. You could try some version lower
than the default and see if you see any change.

Hi
I didn't pass the option "--enable-openmp" to the ./configure script;
therefore I presume OpenMP is not enabled

Hi,

Could you please confirm if this still happens with the new 2.2.18
version?

Cheers,
Tiago

Ah... I feel like there is some problem specific to that libc.so ... i feel
like i've seen it somewhere before.

attachment.html (2.06 KB)

Hi,
just tested this now and I can confirm that the problem still persists with
the new 2.2.18 version.
Regards

I upvote the idea that you should reinstall gcc. that .so file comes from
there. it could be an incompatibility?

attachment.html (1.36 KB)

Hi,

This is just to inform that this has been fixed in the new git version.
(see ticket #117, http://projects.skewed.de/graph-tool/ticket/117 ).

Cheers,
Tiago