Summary: | dev-python/graph-tool - segmentation fault in PyInit_libgraph_tool_generation () at graph_generation.cc:99 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Justin Keogh <bugs.gentoo.org> |
Component: | [OLD] Development | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 536734 | ||
Bug Blocks: | |||
Attachments: |
backtrace.log
backtrace.full.log emerge.info graph_tool_segfault_gdb_log.txt graph_tool_segfault_gdb_log_new.txt remove_all_tr1hash.patch |
Description
Justin Keogh
2015-01-19 12:36:58 UTC
Would you care to get a gdb backtrace of that segmentation fault? Quoting memory addresses isn't very useful here. OK thanks. Learning. I enabled -ggdb and splitdebug, then recompiled python, gmp, boost, glibc, and graph-tool. backtraces and updated emerge --info attached line 99 of: https://github.com/count0/graph-tool/blob/master/src/graph/generation/graph_generation.cc seems to be the problem? Created attachment 394374 [details]
backtrace.log
Created attachment 394376 [details]
backtrace.full.log
Created attachment 394378 [details]
emerge.info
Was this just caused by bug #536734? No, it was just dependent on it because you would get 'unknown symbol' instead of a segfault without first applying the fix for bug 536734. With the patch for 536734 applied, you can at least do some stuff, like: $/usr/bin/python3.3 -c 'import graph_tool ; print(graph_tool.__version__)' 2.2.37dev (commit 201879ac, Fri Jan 9 15:46:17 2015 +0100) which previously would give 'unknown symbol' I posted a request for help upstream: http://thread.gmane.org/gmane.comp.science.graph.graph-tool.general/1807 Upstream suggested this might be a py2.7 vs 3.3 issue. I disabled python2.7: PYTHON_TARGETS="python3_3" PYTHON_SINGLE_TARGET="python3_3" USE_PYTHON='3.3' and recompiled boost, graph-tool, libgmp - and more. Same problem. LD_DEBUG="all" shows an unresolved symbol: <snip> 18820: /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so: error: symbol lookup error: undefined symbol: _ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3_ (fatal) 18820: opening file=/usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so [0]; direct_opencount=1 18820: 18820: 18820: add /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so [0] to global scope 18820: 18820: add /usr/lib64/libgmp.so.10 [0] to global scope 18820: symbol=PyInit_libgraph_tool_generation; lookup in file=/usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so [0] 18820: binding file /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so [0] to /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so [0]: normal symbol `PyInit_libgraph_tool_generation' Segmentation fault $nm -D /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so | grep _ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3_ U _ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3_ $grep -r ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3 /var/tmp/portage/dev-python/graph-tool-9999/ Binary file /var/tmp/portage/dev-python/graph-tool-9999/work/graph-tool-9999-python3_3/src/graph/generation/.libs/graph_rewiring.o matches Binary file /var/tmp/portage/dev-python/graph-tool-9999/work/graph-tool-9999-python3_3/src/graph/generation/.libs/libgraph_tool_generation.so matches $nm -D /usr/lib64/python3.3/site-packages/graph_tool/generation/libgraph_tool_generation.so | grep _ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3_ U _ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3_ $grep -r ZNKSt3tr14hashISt6vectorISsSaISsEEEclES3 /var/tmp/portage/dev-python/graph-tool-9999/ Binary file /var/tmp/portage/dev-python/graph-tool-9999/work/graph-tool-9999-python3_3/src/graph/generation/.libs/graph_rewiring.o matches Binary file /var/tmp/portage/dev-python/graph-tool-9999/work/graph-tool-9999-python3_3/src/graph/generation/.libs/libgraph_tool_generation.so matches With help from #gdb, I was able to instruction step to the segfault source, log graph_tool_segfault_gdb_log.txt attached, unfortunately I don't yet know how to break before 0x7fffd80982b0 changes, right now it's got the bad value already when I break on graph_generation.cc:99 Created attachment 395036 [details]
graph_tool_segfault_gdb_log.txt
Per suggestion from upstream, I passed ./configure --disable-sparsehash, this resolved the segfault. Still working on understanding how to fix with sparsehash enabled. $/usr/bin/python3.3 -c 'import graph_tool.all as gt ; print(gt.__version__)' 2.2.37dev (commit 201879ac, Fri Jan 9 15:46:17 2015 +0100) Created attachment 395102 [details]
graph_tool_segfault_gdb_log_new.txt
New log to assist upstream. This is with removetr1hash.patch applied and sparsehash enabled.
This is fixed in git, for 2.2.36 and 2.2.36-r1 the attached pach is needed. http://article.gmane.org/gmane.comp.science.graph.graph-tool.general/1826 Created attachment 396156 [details, diff]
remove_all_tr1hash.patch
Patch for graph-tool-2.2.36-r1 and graph-tool-2.2.36
I'm assuming this is fixed in 2.2.37 when it gets bumped. Yes, it's fixed in 9999 now. Closing since this should be fixed in more recent releases. |