-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Segfault with jl_init__threading with julia 1.6 on macOS #40246
Comments
I can confirm this being an issue on Mac OS as I had the same error occur. |
@staticfloat Apologies for the direct ping, but do you know what might be going on here? It looks like |
Can you check with the latest |
Thanks @staticfloat . I tried the binary from "https://s3.amazonaws.com/julialangnightlies/pretesting/mac/x64/1.7/julia-ac7974acef-mac64.dmg", the old error seems getting fixed, but new error appears which is still some missing symbol and segfault:
|
Thanks @staticfloat for the help! I built from master and see the same as @Non-Contradiction with JuliaCall from R:
which if it helps points to here: On Python/pyjulia, I see a similar error with a different symbol:
which points to here: In both cases it looks like the error is hit before I also tried running the commands from @Non-Contradiction in the OP to load the image directly:
I'm not sure if I am doing something wrong here though after the libjulia-internal change? |
The Is it possible to no longer use that symbol in You should not be loading |
It looks like the |
It seems like neither package uses the symbol, they just check for the existence of it? |
Thanks both for the help! Unfortunately I don't know much about the internals of either package, but hopefully this helps @Non-Contradiction and @tkf |
@staticfloat @vtjnash Thanks for the help! |
Can you try invoking |
same with this issue, and I have tried to reinstall Julia 1.6.1 and RCall, but still. |
Note that c556bb9 broke ABI compatibility: any binary compiled against Julia <= 1.6 and calling If that's truly intentional, I guess we'll have to keep up producing multiple binaries for lots of BinaryBuilder JLLs, one for each major Julia version (and in some cases maybe more, as in the best there were ABI breaks even in patch level updates from 1.x.y to 1.x.(y+1)). However, this migration is tricky, because there won't be a libjulia_jll 1.7 before Julia 1.7 is released, so I can't provide such JLLs linked against 1.7/master until then. This would be less of an issue if there was a clear strategy for such breaking changes in Julia: like, leaving a compatibility stub for |
We can certainly produce a Julia v1.7-compatible
This seems reasonable to me. @JeffBezanson any thoughts? |
Just a small bump on this issue - any updates here? Thank you! P.S. By way of update, I tried this on Julia 1.6.1 and here is the error message now:
Not sure what this means. Thanks all! |
Additional update, I ran the following potential fix: > library('JuliaCall')
> julia <- julia_setup('/Applications/Julia-1.6.app/Contents/Resources/julia/bin/')
Julia version 1.6.1 at location /Applications/Julia-1.6.app/Contents/Resources/julia/bin will be used.
ERROR:
*** caught segfault ***
address 0xfffffffffffffff8, cause 'memory not mapped'
Traceback:
1: juliacall_initialize(.julia$dll_file, .julia$bin_dir, relative_sysimage_path)
2: julia_setup("/Applications/Julia-1.6.app/Contents/Resources/julia/bin/")
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 3 |
So I've been doing some testing trying to get macOS 11.4, Python 3.9, and Julia 1.6 working with pyjulia 0.5.6, and I think I found a way to get it to work somewhat. Some notes:
So my first few observations.
So, as far as I can tell, the issue is that Hoping this info might help in some way! |
The segfault happens as a side-effect of trying to print the error message ( in the second call to Running
I get
I believe the problem boils down to this: julia is effectively calling
This explains why creating the symlink for |
hm, someone does seem to be lying, since that is not the SONAME for LIBJULIA_INTERNAL:
|
I believe the problematic function call is here: Line 656 in bada80c
|
Here's a work-around for the issue that led me here, based on the fact that
I don't get why this only affects initialization from |
Assigning Elliot, since I think he wrote the code that assigns those SONAMEs |
@jonathan-conder-sm With #47220 merged is this ok to close? |
Looks like that should fix the SONAME |
This is still an issue since that PR doesn't touch the 1.6 branch. However #47053 fixes it for me |
On macOS, if we load the julia 1.6 dynamical library and segfault will happen at the
jl_init__threading
function. The same segfault doesn't happen with julia 1.5.For example, with julia 1.6 in R
which causes the following segfault:
*** caught segfault ***
address 0xfffffffffffffff8, cause 'memory not mapped'
Traceback:
1: .C("jl_init__threading")
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
ERROR: Selection:
And the same code runs fine with julia 1.5 in R
With julia 1.6 in python3
And the same code runs fine with julia 1.5 in python3
Discourse post at https://discourse.julialang.org/t/segfault-when-jl-init-in-r-also-python-with-julia-1-6-on-macos/58110/3.
Relevant issue at JuliaInterop/JuliaCall#164.
The text was updated successfully, but these errors were encountered: