-
Notifications
You must be signed in to change notification settings - Fork 36
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
JuliaCall fails with segmentation fault (core dumped) #238
Comments
Do you have something in your LD_LIBRARY_PATH or DYLD_LIBRARY_PATH or LD_PRELOAD? |
I have this:
I use OpenFoam in the same computer. |
Can you unset that variable and see if it still crashes? |
I have unset the variable now:
But I'm getting the same error:
|
I have downloaded Chris's latest patch branch, and devtools:check seg faults on 1.11. When I override it to build with JULIA_HOME set to the latest 1.9 release, it builds, but then julia_setup causes R to seg fault. |
I think I'm making progress here. julia_setup is failing, and I see this:
The |
How was the R you are using built and installed? This may be an issue with some LD_LIBRARY_PATH type setting. I always wanted R in Yggdrasil, but IIRC, it does not support cross compilation. But maybe we can just package the upstream binaries like we do for MKL. And at least that way, we can have something that works reliably. |
I don't have any LD_LIBRARY_PATH set, but I tried setting
and then To be clear I only built it from source to enable debugging of the segmentation fault I was having with the packaged R binaries, which are stripped. This didn't help as |
Is |
The |
I was about to test if building R without the recommended packages and then installing them after build and install would change the behavior, but it's now 17:30 here so I'll pick this up tomorrow. |
Is there an issue with 1.10 too? |
It also SEGV'd the last time I tried it, but that might have been with the packaged R binaries so not necessarily the same issue. |
I had the exact same problem yesterday. Downgrading to Ubuntu 22.04.5 LTS (Jammy Jellyfish) solved the issue for me. |
Thanks. I'll spin up a 22 VM and see if that works. |
I tried a bog standard Ubuntu 22 distro adding only r-base, r-base-dev, and the system libraries needed to build devtools, and Julia 1.11. The output from devtools::check() for the latest JuliaCall repo is: ❯ checking compiled code ... OK ❯ checking for future file timestamps ... NOTE ❯ checking for detritus in the temp directory ... NOTE ── Test failures ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── testthat ────
1.4142135623730951 1.4142135623730951 free(): invalid size [47650] signal 6 (-6): Aborted 1 error ✖ | 1 warning ✖ | 2 notes ✖ |
How about with Julia 1.10? |
check() runs ok with 1.10, and the package seems to function. |
I have installed R on Ubuntu 24.04 using binaries via https://eddelbuettel.github.io/r2u/. Could it have something to do with it? I think it should work with Julia 1.10 anyway but the segfault persists |
As far I can I, and the commenter above, can tell, Ubuntu 24 is incompatible with JuliaCall. It will not build with julia 1.10 or 1.11, and while it seemed to build with 1.9, it segfaulted as soon as I attempted to run it. |
I experienced the same issue on Ubuntu 24.04.1 LTS with Julia 1.11 and Julia 1.10.5. I haven't tried downgrading Ubuntu version.
|
I meet the same issue on win11,could someone help? |
This does not seem like the same error on win11 Could you create another issue? |
Just upgraded my EC2 to Ubuntu 24 today and and seeing the same issue with JuliaCall with Julia 1.11, 1.10 - also went back to 1.6. Does indeed seem to be an Ubuntu 24 issue. |
How are you installing R? |
I have reinstalled everything on Ubuntu 22 and all works smoothly, so does seem to be some issue with Ubuntu 24. |
I wonder if it would make sense to install R via conda-forge or other means. Otherwise, we may need to prepend Julia's libraries to the |
This seems to be an
The environment variables used are the ones set when R starts, so JuliaCall can't fix this by unsetting or prepending to WorkaroundIf you need to get JuliaCall working now, you can either preload correct libunwind, e.g. LD_PRELOAD="/home/user/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/lib/julia/libunwind.so.8" R or write a new R wrapper script similar to #!/bin/bash
# subset of the shell wrapper for R executable.
R_HOME=/usr/lib/R
export R_HOME
R_SHARE_DIR=/usr/share/R/share
export R_SHARE_DIR
R_INCLUDE_DIR=/usr/share/R/include
export R_INCLUDE_DIR
R_DOC_DIR=/usr/share/R/doc
export R_DOC_DIR
exec /usr/lib/R/bin/exec/R |
Yeah, confirmed this - the issue bisects to exactly the same change |
Good catch! So to me it seems that the R wrapper scripts used by some distributions are bad citizens as they set |
I have installed R on Ubuntu 24.04 using binaries from this source. These binaries are not maintained by Ubuntu. My |
@jalcam , have you tried setting LD_PRELOAD as in #238 (comment) ? |
I have Julia installed with Juliaup (1.10 and 1.11). When I try to setup juliacall in R with 1.10 I get a segfault:
when I try with Julia 1.11 the error is:
In Julia I've tried:
But the segfault persists when trying JuliaCall
The text was updated successfully, but these errors were encountered: