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

PyCall + @threads: SIGSEGV (Address boundary error) #885

Open
anandijain opened this issue Mar 1, 2021 · 0 comments
Open

PyCall + @threads: SIGSEGV (Address boundary error) #885

anandijain opened this issue Mar 1, 2021 · 0 comments

Comments

@anandijain
Copy link

This is possibly a duplicate of #882 but I'm not sure. Below is a MWE.

using PyCall
py"""
def f(x):
    return 2*x
"""
f(x) = py"f($x)"
args = 1:100
batch_data = Vector(undef,length(args))
Threads.@threads for i in 1:length(args)
    batch_data[i] = f(args[i])
end
julia> versioninfo()
Julia Version 1.6.0-rc1
Commit a58bdd9010 (2021-02-06 15:49 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8

result of @threads loop:

signal (11): Segmentation fault
signal (11): Segmentation fault
in expression starting at REPL[6]n expression starting at REPL[6]:1
in expression starting at REPL[6]:1
in expression starting at REPL[6]:1

signal (11): Segmentation fault
in expression starting at REPL[6]:1

signal (11): Segmentation fault

signal (11): Segmentation fault
in expression starting at REPL[6]:1
in expression starting at REPL[6]:1
unknown function (ip: 0x7f1e694ce7c0)
PyCode_Optimize at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
unknown function (ip: 0x7f1e694cd9fc)
unknown function (ip: 0x7f1e6942debc)
unknown function (ip: 0x7f1e694ce7c0)
unknown function (ip: 0x7f1e694ce0d3)
unknown function (ip: 0x7f1e694ce7c0)
PyNode_New at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
PyAST_CompileObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
PyNode_AddChild at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
unknown function (ip: 0x7f1e694ce7c0)
PyNode_New at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
unknown function (ip: 0x7f1e694cd9fc)
PyParser_New at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
Py_CompileStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
unknown function (ip: 0x7f1e6953eac2)
Py_CompileStringExFlags at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/exception.jl:95 [inlined]
unknown function (ip: 0x7f1e694ce0d3)
pyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
PyParser_New at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
f at ./REPL[3]:1
unknown function (ip: 0x7f1e6b10ced2)
PyParser_AddToken at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
PyParser_ASTFromStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
unknown function (ip: 0x7f1e6953ec6b)
PyNode_AddChild at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
PyNode_New at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at ./REPL[6]:2 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:81
PyParser_ASTFromStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
#6#threadsfor_fun at ./threadingconstructs.jl:48
unknown function (ip: 0x7f1e6b10ca2c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
unknown function (ip: 0x7f1e6953eac2)
y_CompileStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
PyParser_AddToken at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
ne)
PyParser_ASTFromStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
PyParser_ASTFromStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unkPy_CompileStringExFlags at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/exception.jl:95 [inlined]
pyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
unknown function (ip: 0x7f1e6953ec6b)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
f at ./REPL[3]:1
unknown function (ip: 0x7f1e6b10ced2)
Py_CompileStringExFlags at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/exception.jl:95 [inlined]
Py_CompileStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
pyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
f at ./REPL[3]:1
unknown function (ip: 0x7f1e6953eac2)
unknown function (ip: 0x7f1e6953eac2)
PyParser_ASTFromStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
macro expansion at ./REPL[6]:2 [inlined]
Py_CompileStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
#6#threadsfor_fun at ./threadingconstructs.jl:81
u/libpython3.8.so.1.0 (unknown line)
ine)
#6#threadsfor_fun at ./threadingconstructs.jl:81
u/libpython3.8.so.1.0 (unknown line)
#6#threadsfor_fun at ./threadingconstructs.jl:81
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/exception.jl:95 [inlined]
pyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
Py_CompileStringObject at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
f at ./REPL[3]:1
unknown function (ip: 0x7f1e6b10ced2)
Py_CompileStringExFlags at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
#6#threadsfor_fun at ./threadingconstructs.jl:48
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
unknown function (ip: 0x7f1e6b10ca2c)
macro expansion at ./REPL[6]:2 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:81
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/exception.jl:95 [inlined]
pyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
Py_CompileStringExFlags at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (unknown line)
macro expansion at ./REPL[6]:2 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:81
unknown function (ip: 0x7f1e6b10ced2)
#6#threadsfor_fun at ./threadingconstructs.jl:48
/PyCall/tqyST/src/exception.jl:95 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:48
pyeval_ at /home/sippycups/.julia/packages/PyCallpyeval_ at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:34
unknown function (ip: 0x7f1e6b10ca2c)
unknown function (ip: 0x7f1e6b10ca2c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
macro expansion at ./REPL[6]:2 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:81
#6#threadsfor_fun at ./threadingconstructs.jl:48
macro expansion at /home/sippycups/.julia/packages/PyCall/tqyST/src/pyeval.jl:230 [inlined]
f at ./REPL[3]:1
unknown function (ip: 0x7f1e6b10ced2)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
unknown function (ip: 0x7f1e6b10ca2c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
macro expansion at ./REPL[6]:2 [inlined]
#6#threadsfor_fun at ./threadingconstructs.jl:81
#6#threadsfor_fun at ./threadingconstructs.jl:48
unknown function (ip: 0x7f1e6b10ca2c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2238 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2420
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1703 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:839
unknown function (ip: (nil))
Allocations: 5942002 (Pool: 5940326; Big: 1676); GC: 6
fish: '/home/sippycups/julia-1.6.0-rc1…' terminated by signal SIGSEGV (Address boundary error)
@anandijain anandijain changed the title PyCall + @threads: free(): invalid pointer SIGSEGV (Address boundary error) PyCall + @threads: SIGSEGV (Address boundary error) Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant