Repository navigation
Closed
Description
On Linux, when I try to run the tests on PyCall master, I get a segfault:
signal (11): Segmentation fault
PyObject_IsInstance at /usr/lib/x86_64-linux-gnu/libpython2.7.so (unknown line)
pyisinstance at /home/simon/.julia/PyCall/src/PyCall.jl:100
jlcall_pyisinstance_21189 at (unknown line)
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
pyptr_query at /home/simon/.julia/PyCall/src/conversions.jl:147
pytype_query at /home/simon/.julia/PyCall/src/conversions.jl:783
convert at /home/simon/.julia/PyCall/src/conversions.jl:832
roundtripeq at /home/simon/.julia/PyCall/test/runtests.jl:6
jlcall_roundtripeq_21432 at (unknown line)
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
anonymous at test.jl:92
do_test at test.jl:50
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 0x7f5083fe4ed3)
unknown function (ip: 0x7f5083fe426e)
unknown function (ip: 0x7f5083ff9a0b)
unknown function (ip: 0x7f5083ffa72c)
jl_load at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
include at ./boot.jl:260
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
include_from_node1 at ./loading.jl:271
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
process_options at ./client.jl:316
_start at ./client.jl:411
unknown function (ip: 0x7f50810f0d89)
jl_apply_generic at /usr/local/julia/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 0x401ae7)
unknown function (ip: 0x4016af)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4016f9)
unknown function (ip: (nil))
fish: Job 1, “julia test/runtests.jl” terminated by signal SIGSEGV (Address boundary error)Adding the line Libdl.dlopen(libpython, Libdl.RTLD_LAZY|Libdl.RTLD_DEEPBIND|Libdl.RTLD_GLOBAL) to the start of __init__ appears to fix this. I'm not really sure what's going on, but it appears the segfault is somehow related to the libpython symbols not being available to other libraries.
I can't reproduce this on OS X, but dlopen is global there by default.
My versioninfo() is:
julia> versioninfo()
Julia Version 0.5.0-dev+3
Commit 7cd05db* (2015-09-09 19:05 UTC)
Platform Info:
System: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Metadata
Metadata
Assignees
Labels
No labels
Activity
simonster commentedon Sep 10, 2015
In case it's useful, without RTLD_GLOBAL, importing ctypes here throws:
so the catch clause gets taken. With the
dlopenline above importingctypesworks, but if I force the code in the catch clause to be run, the tests still segfault.tbreloff commentedon Sep 13, 2015
I'm wondering if this crash is related in any way. This was on OS X.
stevengj commentedon Sep 15, 2015
Have you tried the PyCall master?
stevengj commentedon Sep 15, 2015
I can reproduce. Will incorporate the
dlopenworkaround shortly.jmxpearson commentedon Sep 16, 2015
Thank you for this. I have been running into this issue as of this afternoon.