Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Segfault] Graph.pagerank() #636

Closed
ntfrgl opened this issue Jun 26, 2014 · 14 comments
Closed

[Segfault] Graph.pagerank() #636

ntfrgl opened this issue Jun 26, 2014 · 14 comments
Assignees
Labels
high High-priority issue; typically for cases when igraph returns incorrect result for non-corner cases

Comments

@ntfrgl
Copy link

ntfrgl commented Jun 26, 2014

Arch Linux 3.15.1
Python 2.7.7
igraph 0.7.1
python-igraph 0.7.0

import igraph
igraph.Graph(n=2, edges=[[0, 1], [1, 0]]).pagerank()

Consistently crashes with an error message like the following:

[:] *** Process received signal ***
[:] Signal: Segmentation fault (11)
[:] Signal code: Address not mapped (1)
[:] Failing at address: 0x7fc23f506255
[:] [ 0] /usr/lib/libpthread.so.0(+0xf4b0)[0x7fc21d53f4b0]
[:] [ 1] /usr/lib/libpython2.7.so.1.0(PyObject_IsTrue+0x1f)[0x7fc21d7d508f]
[:] [ 2] /usr/lib/python2.7/site-packages/igraph/_igraph.so(igraphmodule_Graph_personalized_pagerank+0x45b)[0x7fc2136f001b]
[:] [ 3] /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x56c9)[0x7fc21d82f669]
[...]
[:] [17] /usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7fc21d830970]
[:] [18] /usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7fc21d830a69]
[:] [19] /usr/lib/libpython2.7.so.1.0(+0xfbeaf)[0x7fc21d849eaf]
[:] [20] /usr/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0x72)[0x7fc21d84b0d2]
[:] [21] /usr/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xe7)[0x7fc21d84c2d7]
[:] [22] /usr/lib/libpython2.7.so.1.0(Py_Main+0xc7a)[0x7fc21d85d66a]
[:] [23] /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fc21d1a2000]
[:] [24] python2[0x40073e]
[:] *** End of error message ***
zsh: segmentation fault (core dumped)

Everything else works. The same code runs fine on OS X. Perhaps something is being interpreted differently between gcc and clang?

@ntamas
Copy link
Member

ntamas commented Jun 26, 2014

Also works on Ubuntu Linux where igraph is compiled with gcc so I'm pretty sure it's not a gcc vs clang issue. I'll try to install Arch in a VM soon and reproduce it.

@ntamas ntamas self-assigned this Jun 26, 2014
@dacapo1142
Copy link

I've got this problem too on Ubuntu 14.04 (python3, python-igraph0.7)

@ntfrgl
Copy link
Author

ntfrgl commented Aug 8, 2014

Is there any further useful information I could provide?

@ntamas
Copy link
Member

ntamas commented Aug 14, 2014

Finally managed to reproduce the issue in an Ubuntu VM. I'll keep this issue updated as I make progress.

@ntamas
Copy link
Member

ntamas commented Aug 14, 2014

Found a workaround (although the cause is still not clear): just call personalized_pagerank() instead of pagerank().

@ntfrgl
Copy link
Author

ntfrgl commented Sep 25, 2014

Thank you! That works for me.

@crsqq
Copy link

crsqq commented Sep 29, 2014

Got the same symptoms using two different environments: Ubuntu 14.04 and OS X 10.9, both with python (3.4.0 / 3.4.1), python-igraph==0.7 and igraph 0.7.1.

@ntamas
Copy link
Member

ntamas commented Oct 2, 2014

Fun fact: this does not happen when using the debug build of Python on Ubuntu, only with the release build.

@ntamas
Copy link
Member

ntamas commented Oct 2, 2014

Okay, this is fixed in the development branch now; see the patch above.

@ntamas ntamas added this to the 0.7.2 milestone Oct 2, 2014
@ntamas ntamas closed this as completed Oct 2, 2014
@ntamas
Copy link
Member

ntamas commented Oct 2, 2014

For the record: the problem was that the eps argument was parsed as a double on the C side even though the variable that was supposed to store the parsed value was declared as a float. The workaround works because calling personalized_pagerank directly does not pass any value to the eps argument so the default does not get overwritten. An alternative workaround is to update the Graph.pagerank() method in igraph/__init__.py so it does not forward the eps argument to personalized_pagerank.

@dimpase
Copy link

dimpase commented Mar 18, 2019

Why was this closed? There is still a segfault on pagerank() in the latest release, although not in the development version (as we see on https://trac.sagemath.org/ticket/27502).

@ntamas
Copy link
Member

ntamas commented Mar 18, 2019

I tend to close issues after the fix has been committed and not after releases. However, development has stalled on python-igraph as I don't have time for it any more so there was no new release since the fix was committed. Your best bet right now is to compile the Python interface from source instead.

@dimpase
Copy link

dimpase commented Mar 18, 2019

For igraph, from the current master I am able to make a release tarball (after some changes in src/Makefile.am, which I should offer as a PR), and it passes the testsuite on Linux (I didn't try anything else, yet). Would you be willing to make at least a pre-release based on this? After all it'd be just 5 minutes or so at the keyboard for you...

@ntamas
Copy link
Member

ntamas commented May 9, 2019

Sorry, it's not that easy, but I wanted to let you know that it seems like igraph's development will hopefully gain some momentum; we aim for a proper 0.8.0 release next month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high High-priority issue; typically for cases when igraph returns incorrect result for non-corner cases
Projects
None yet
Development

No branches or pull requests

5 participants