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

[Help wanted] Try to drop GIL #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Moelf
Copy link

@Moelf Moelf commented Nov 3, 2023

Fixes #535

currently it segfaults:

In [1]: from julia import Base

[10620] signal (11.1): Segmentation fault
in expression starting at /home/akako/.julia/packages/PyCall/ilqDX/src/PyCall.jl:994
_PyInterpreterState_GET at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_pystate.h:116 [inlined]
get_list_state at /usr/local/src/conda/python-3.11.3/Objects/listobject.c:24 [inlined]
PyList_New at /usr/local/src/conda/python-3.11.3/Objects/listobject.c:165 [inlined]
PyImport_Import at /usr/local/src/conda/python-3.11.3/Python/import.c:1984
PyImport_ImportModule at /usr/local/src/conda/python-3.11.3/Python/import.c:1453
_pyimport at /home/akako/.julia/packages/PyCall/ilqDX/src/PyCall.jl:483
pyimport at /home/akako/.julia/packages/PyCall/ilqDX/src/PyCall.jl:507
__init__ at /home/akako/.julia/packages/PyCall/ilqDX/src/pyinit.jl:207
unknown function (ip: 0x7ffa61f01674)
_jl_invoke at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:2892 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:3074
jl_apply at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/julia.h:1976 [inlined]
jl_module_run_initializer at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:76
jl_eval_module_expr at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:280 [inlined]
jl_toplevel_eval_flex at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:736
jl_toplevel_eval_flex at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:877
ijl_toplevel_eval_in at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:985
eval at ./boot.jl:383 [inlined]
include_string at ./loading.jl:2070
_jl_invoke at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:2892 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:3074
_include at ./loading.jl:2130
include at ./Base.jl:489
jfptr_include_46226.1 at /home/akako/Documents/github/dotFiles/homedir/.julia/juliaup/julia-1.10.0-beta3+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:2892 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:3074
_require at ./loading.jl:2008
__require_prelocked at ./loading.jl:1806
jfptr___require_prelocked_80675.1 at /home/akako/Documents/github/dotFiles/homedir/.julia/juliaup/julia-1.10.0-beta3+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:2892 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:3074
jl_apply at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/julia.h:1976 [inlined]
jl_f__call_in_world at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/builtins.c:831
#invoke_in_world#3 at ./essentials.jl:921 [inlined]
invoke_in_world at ./essentials.jl:918 [inlined]
_require_prelocked at ./loading.jl:1797 [inlined]
_require_prelocked at ./loading.jl:1796 [inlined]
macro expansion at ./lock.jl:267 [inlined]
require at ./loading.jl:1791
jfptr_require_80612.1 at /home/akako/Documents/github/dotFiles/homedir/.julia/juliaup/julia-1.10.0-beta3+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:2892 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/gf.c:3074
jl_apply at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/julia.h:1976 [inlined]
do_call at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/interpreter.c:125
eval_value at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/interpreter.c:222
eval_stmt_value at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/interpreter.c:173 [inlined]
eval_body at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/interpreter.c:616
jl_interpret_toplevel_thunk at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/interpreter.c:774
jl_toplevel_eval_flex at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:934
jl_toplevel_eval_flex at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:877
ijl_toplevel_eval_in at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/toplevel.c:985
ijl_eval_string at /cache/build/default-amdci5-7/julialang/julia-release-1-dot-10/src/jlapi.c:117
ffi_call_unix64 at /home/akako/.conda/envs/hep/lib/python3.11/lib-dynload/../../libffi.so.8 (unknown line)
ffi_call_int at /home/akako/.conda/envs/hep/lib/python3.11/lib-dynload/../../libffi.so.8 (unknown line)
ffi_call at /home/akako/.conda/envs/hep/lib/python3.11/lib-dynload/../../libffi.so.8 (unknown line)
_call_function_pointer at /usr/local/src/conda/python-3.11.3/Modules/_ctypes/callproc.c:923 [inlined]
_ctypes_callproc at /usr/local/src/conda/python-3.11.3/Modules/_ctypes/callproc.c:1262
PyCFuncPtr_call at /usr/local/src/conda/python-3.11.3/Modules/_ctypes/_ctypes.c:4201
_PyObject_MakeTpCall at /usr/local/src/conda/python-3.11.3/Objects/call.c:214
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:4773
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438 [inlined]
_PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
_PyObject_FastCallDictTstate at /usr/local/src/conda/python-3.11.3/Objects/call.c:141 [inlined]
_PyObject_Call_Prepend at /usr/local/src/conda/python-3.11.3/Objects/call.c:482 [inlined]
slot_tp_init at /usr/local/src/conda/python-3.11.3/Objects/typeobject.c:7863
type_call at /usr/local/src/conda/python-3.11.3/Objects/typeobject.c:1112 [inlined]
_PyObject_MakeTpCall at /usr/local/src/conda/python-3.11.3/Objects/call.c:214
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:4773
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438 [inlined]
_PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92 [inlined]
PyObject_CallOneArg at /usr/local/src/conda/python-3.11.3/Objects/call.c:376 [inlined]
property_descr_get at /usr/local/src/conda/python-3.11.3/Objects/descrobject.c:1630
_PyObject_GenericGetAttrWithDict at /usr/local/src/conda/python-3.11.3/Objects/object.c:1278
PyObject_GenericGetAttr at /usr/local/src/conda/python-3.11.3/Objects/object.c:1368 [inlined]
PyObject_GetAttr at /usr/local/src/conda/python-3.11.3/Objects/object.c:916
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:3465
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438 [inlined]
_PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92 [inlined]
object_vacall at /usr/local/src/conda/python-3.11.3/Objects/call.c:819
PyObject_CallMethodObjArgs at /usr/local/src/conda/python-3.11.3/Objects/call.c:879
import_find_and_load at /usr/local/src/conda/python-3.11.3/Python/import.c:1736 [inlined]
PyImport_ImportModuleLevelObject at /usr/local/src/conda/python-3.11.3/Python/import.c:1835
builtin___import___impl at /usr/local/src/conda/python-3.11.3/Python/bltinmodule.c:277 [inlined]
builtin___import__ at /usr/local/src/conda/python-3.11.3/Python/clinic/bltinmodule.c.h:78
cfunction_vectorcall_FASTCALL_KEYWORDS at /usr/local/src/conda/python-3.11.3/Objects/methodobject.c:443
do_call_core at /usr/local/src/conda/python-3.11.3/Python/ceval.c:7328 [inlined]
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:5380
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438 [inlined]
_PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:393
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92 [inlined]
object_vacall at /usr/local/src/conda/python-3.11.3/Objects/call.c:819
PyObject_CallMethodObjArgs at /usr/local/src/conda/python-3.11.3/Objects/call.c:879
PyImport_ImportModuleLevelObject at /usr/local/src/conda/python-3.11.3/Python/import.c:1906
import_name at /usr/local/src/conda/python-3.11.3/Python/ceval.c:7428 [inlined]
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:3950
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438
PyEval_EvalCode at /usr/local/src/conda/python-3.11.3/Python/ceval.c:1154
builtin_exec_impl at /usr/local/src/conda/python-3.11.3/Python/bltinmodule.c:1077 [inlined]
builtin_exec at /usr/local/src/conda/python-3.11.3/Python/clinic/bltinmodule.c.h:465
cfunction_vectorcall_FASTCALL_KEYWORDS at /usr/local/src/conda/python-3.11.3/Objects/methodobject.c:443
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92 [inlined]
PyObject_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:299
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:4773
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
gen_send_ex2 at /usr/local/src/conda/python-3.11.3/Objects/genobject.c:219
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:2590
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
gen_send_ex2 at /usr/local/src/conda/python-3.11.3/Objects/genobject.c:219
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:2590
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
gen_send_ex2 at /usr/local/src/conda/python-3.11.3/Objects/genobject.c:219
gen_send_ex at /usr/local/src/conda/python-3.11.3/Objects/genobject.c:287
method_vectorcall_O at /usr/local/src/conda/python-3.11.3/Objects/descrobject.c:481
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92 [inlined]
PyObject_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:299
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:4773
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438 [inlined]
_PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.3/Objects/call.c:393 [inlined]
_PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_call.h:92
method_vectorcall at /usr/local/src/conda/python-3.11.3/Objects/classobject.c:59
_PyVectorcall_Call at /usr/local/src/conda/python-3.11.3/Objects/call.c:257 [inlined]
_PyObject_Call at /usr/local/src/conda/python-3.11.3/Objects/call.c:328 [inlined]
PyObject_Call at /usr/local/src/conda/python-3.11.3/Objects/call.c:355
do_call_core at /usr/local/src/conda/python-3.11.3/Python/ceval.c:7356 [inlined]
_PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.3/Python/ceval.c:5380
_PyEval_EvalFrame at /usr/local/src/conda/python-3.11.3/Include/internal/pycore_ceval.h:73 [inlined]
_PyEval_Vector at /usr/local/src/conda/python-3.11.3/Python/ceval.c:6438
PyEval_EvalCode at /usr/local/src/conda/python-3.11.3/Python/ceval.c:1154
run_eval_code_obj at /usr/local/src/conda/python-3.11.3/Python/pythonrun.c:1714
run_mod at /usr/local/src/conda/python-3.11.3/Python/pythonrun.c:1735
pyrun_file at /usr/local/src/conda/python-3.11.3/Python/pythonrun.c:1630
_PyRun_SimpleFileObject at /usr/local/src/conda/python-3.11.3/Python/pythonrun.c:440
_PyRun_AnyFileObject at /usr/local/src/conda/python-3.11.3/Python/pythonrun.c:79
pymain_run_file_obj at /usr/local/src/conda/python-3.11.3/Modules/main.c:360 [inlined]
pymain_run_file at /usr/local/src/conda/python-3.11.3/Modules/main.c:379 [inlined]
pymain_run_python at /usr/local/src/conda/python-3.11.3/Modules/main.c:601 [inlined]
Py_RunMain at /usr/local/src/conda/python-3.11.3/Modules/main.c:680
Py_BytesMain at /usr/local/src/conda/python-3.11.3/Modules/main.c:734
unknown function (ip: 0x7ffa65bfbccf)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
_start at /home/akako/.conda/envs/hep/bin/python (unknown line)
Allocations: 19037106 (Pool: 19019657; Big: 17449); GC: 20
fish: Job 1, 'ipython' terminated by signal SIGSEGV (Address boundary error)

@Moelf Moelf changed the title Try to drop GIL [Help wanted] Try to drop GIL Nov 3, 2023
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

Successfully merging this pull request may close these issues.

What does it take for pyjulia to drop GIL?
1 participant