{"action":"created","issue":{"url":"https://api.github.com/repos/igraph/python-igraph/issues/78","repository_url":"https://api.github.com/repos/igraph/python-igraph","labels_url":"https://api.github.com/repos/igraph/python-igraph/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/igraph/python-igraph/issues/78/comments","events_url":"https://api.github.com/repos/igraph/python-igraph/issues/78/events","html_url":"https://github.com/igraph/python-igraph/issues/78","id":155395226,"number":78,"title":"python-igraph segfaults debugger","user":{"login":"yunesj","id":152988,"avatar_url":"https://avatars.githubusercontent.com/u/152988?v=3","gravatar_id":"","url":"https://api.github.com/users/yunesj","html_url":"https://github.com/yunesj","followers_url":"https://api.github.com/users/yunesj/followers","following_url":"https://api.github.com/users/yunesj/following{/other_user}","gists_url":"https://api.github.com/users/yunesj/gists{/gist_id}","starred_url":"https://api.github.com/users/yunesj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunesj/subscriptions","organizations_url":"https://api.github.com/users/yunesj/orgs","repos_url":"https://api.github.com/users/yunesj/repos","events_url":"https://api.github.com/users/yunesj/events{/privacy}","received_events_url":"https://api.github.com/users/yunesj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-18T00:56:09Z","updated_at":"2016-05-19T10:42:26Z","closed_at":null,"body":"I'm using the master version of python-igraph and the master version of igraph c core.\r\n\r\nWith `--disable-tls`, my debugger (PyCharm remote debugger) seg faults:\r\n```\r\nssh://user@hostname:2222/home/user/projects/agca_directed_remote/venv/bin/python -u /home/user/.pycharm_helpers/pydev/pydevd.py --multiproc --qt-support --client '0.0.0.0' --port 56978 --file /home/user/projects/agca_directed_remote/bin/test.py\r\npydev debugger: process 4279 is connecting\r\n\r\nConnected to pydev debugger (build 145.971)\r\n/home/user/projects/agca_directed_remote/etc/user.conf\r\nbash: line 1:  4279 Segmentation fault      (core dumped) /home/user/projects/agca_directed_remote/venv/bin/python -u /home/user/.pycharm_helpers/pydev/pydevd.py --multiproc --qt-support --client '0.0.0.0' --port 56978 --file /home/user/projects/agca_directed_remote/bin/test.py\r\n\r\nProcess finished with exit code 139\r\n```\r\nSince it doesn't seem to segfault when I'm not debugging, I was thinking it was a multi-threading issue. With `--enable-tls`, I get:\r\n```\r\n    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../src/CHOLMOD/Include -I../src/CHOLMOD/Include -I../src/AMD/Include -I../src/AMD/Include -I../src/COLAMD/Include -I../src/COLAMD/Include -I../src/SuiteSparse_config -I../src/SuiteSparse_config -DNPARTITION -DNTIMER -DNCAMD -Wall -I../optional/glpk -I../src/prpack -DPRPACK_IGRAPH_SUPPORT -fPIC -I/usr/include/libxml2 -MT libigraph_la-igraph_cliquer.lo -MD -MP -MF .deps/libigraph_la-igraph_cliquer.Tpo -c igraph_cliquer.c  -fPIC -DPIC -o .libs/libigraph_la-igraph_cliquer.o\r\n    igraph_cliquer.c:32:1: error: '__thread' before 'static'\r\n     IGRAPH_THREAD_LOCAL static int cliquer_interrupted;\r\n     ^\r\n```\r\nI'm installing it via a pip requirements file (`git+ssh://git@github.com/yunesj/python-igraph.git@master --install-option=\"--c-core-url=https://github.com/igraph/igraph/archive/master.tar.gz\"`).\r\n\r\nAccording to igraph's config.log:\r\n```\r\nconfigure:3262: checking for gcc\r\nconfigure:3278: found /usr/bin/gcc\r\nconfigure:3289: result: gcc\r\nconfigure:3518: checking for C compiler version\r\nconfigure:3527: gcc --version >&5\r\ngcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4\r\n```\r\n\r\nAny suggestions?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/igraph/python-igraph/issues/comments/220289275","html_url":"https://github.com/igraph/python-igraph/issues/78#issuecomment-220289275","issue_url":"https://api.github.com/repos/igraph/python-igraph/issues/78","id":220289275,"user":{"login":"ntamas","id":195637,"avatar_url":"https://avatars.githubusercontent.com/u/195637?v=3","gravatar_id":"","url":"https://api.github.com/users/ntamas","html_url":"https://github.com/ntamas","followers_url":"https://api.github.com/users/ntamas/followers","following_url":"https://api.github.com/users/ntamas/following{/other_user}","gists_url":"https://api.github.com/users/ntamas/gists{/gist_id}","starred_url":"https://api.github.com/users/ntamas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntamas/subscriptions","organizations_url":"https://api.github.com/users/ntamas/orgs","repos_url":"https://api.github.com/users/ntamas/repos","events_url":"https://api.github.com/users/ntamas/events{/privacy}","received_events_url":"https://api.github.com/users/ntamas/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T10:42:26Z","updated_at":"2016-05-19T10:42:26Z","body":"It looks like `gcc` does not like `__thread` appearing before `static` but it compiles just fine if I swap the order of `IGRAPH_THREAD_LOCAL` and `static` in `src/igraph_cliquer.c` and `src/cliquer/cliquer.c`; see 6e492cb . Can you try recompiling after having applied this commit to see whether the original error you are getting is related to thread-safety or not?\r\n"}}