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

Crash on Apple M1 with Julia 1.8-rc1 #185

Closed
gnuille opened this issue Jun 16, 2022 · 2 comments
Closed

Crash on Apple M1 with Julia 1.8-rc1 #185

gnuille opened this issue Jun 16, 2022 · 2 comments

Comments

@gnuille
Copy link
Contributor

gnuille commented Jun 16, 2022

When initializing the juliacall module on a machine with an apple M1, it crashes:

% python -c "import juliacall"
fatal: error thrown and no exception handler available.
ErrorException("could not load symbol "jl_n_threads":
dlsym(RTLD_DEFAULT, jl_n_threads): symbol not found")
ijl_errorf at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
ijl_dlsym at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
ijl_load_and_lookup at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
nthreads at ./threadingconstructs.jl:23 [inlined]
__preinit_threads__ at ./task.jl:706
jfptr___preinit_threads___50438 at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
_finish_julia_init at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
julia_init at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
ijl_init at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
ffi_call_SYSV at /usr/lib/libffi.dylib (unknown line)

Using PDB I have been able to locate and isolate the issue although I don't understand why the crash is caused.

The line that crashes is:
https://github.com/cjdoris/PythonCall.jl/blob/73ae3059032c6951f9f0856494add524e798c05a/pysrc/juliacall/__init__.py#L124

A minimal example that reproduces the issue:

import ctypes
lib = ctypes.CDLL("/Applications/Julia-1.8.app/Contents/Resources/julia/lib/libjulia.1.8.dylib")
lib.jl_init__threading()
@giordano
Copy link

Duplicate of #175?

@gnuille
Copy link
Contributor Author

gnuille commented Jun 16, 2022

Yes, sorry

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

2 participants