2

I'm experiencing a Segmentation fault while importing the graph-tool module into Python. I have conducted some tests:

  1. import graph_tool doesn't result in any problems.
>>> import graph_tool as gt
>>> gt.__version__
'2.29 (commit d4154c6c, Tue Aug 27 13:21:10 2019 +0000)'
  1. from graph_tool.all import * results in Segmentation fault.

Upon executing from graph_tool.draw import graph_draw I get the same error (and the error stack) that I get with from graph_tool.all import *.

By using faulthandler I got the following output:

>>> from graph_tool.all import *
Fatal Python error: Segmentation fault

Current thread 0x00007fcc6e68d740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1043 in create_module
  File "<frozen importlib._bootstrap>", line 583 in module_from_spec
  File "<frozen importlib._bootstrap>", line 670 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 983 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1035 in _handle_fromlist
  File "<string>", line 1 in <module>
  File "/opt/anaconda3/lib/python3.7/site-packages/graph_tool/dl_import.py", line 61 in dl_import
  File "/opt/anaconda3/lib/python3.7/site-packages/graph_tool/draw/cairo_draw.py", line 89 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 728 in exec_module
  File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 983 in _find_and_load
  File "/opt/anaconda3/lib/python3.7/site-packages/graph_tool/draw/__init__.py", line 880 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 728 in exec_module
  File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 983 in _find_and_load
  File "/opt/anaconda3/lib/python3.7/site-packages/graph_tool/all.py", line 35 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 728 in exec_module
  File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 983 in _find_and_load
  File "<stdin>", line 1 in <module>

The OS:

   Static hostname: XXXXXXXXXXX
         Icon name: computer-vm
           Chassis: vm
        Machine ID: XXXXXXXXXXX
           Boot ID: XXXXXXXXXXX
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-1062.4.3.el7.x86_64
      Architecture: x86-64

Python is from Anaconda:

(base) -bash-4.2$ python --version
Python 3.7.3
(base) -bash-4.2$ conda --version
conda 4.8.0

One lead that I've been following is the fact that the problematic import (please see no. 2) works on other server that have the following configuration:

  • Python 3.7.6
  • Conda 4.8.0
  • graph_tool version is the same as in the case I'm trying to solve.

One difference that stands out is the number of pending signals in ulimit -a (other values returned by the command are identical). The server that the import works on has 256898 pending signals and the server affected by the problem has 127882. I tried increasing the lower value but I couldn't since pending signals: cannot modify limit: Operation not permitted.

Please note that I have posted the same problem as an issue in the graph-tool's GitLab repo. I decided to ask a question on StackOverflow because the audience may be bigger here than in the repo's issue queue.

balkon16
  • 1,338
  • 4
  • 20
  • 40

0 Answers0