System: caught exception of type

Hi:

Today I tried to install julia on a server but I faced the following error. I haven’t tried to run any codes or install any packages. This error just shows up after I installed julia on the server. Is there a way to fix it?

Thanks

I’m also having exactly that on an ARM CPU (NVIDIA Jetson Xavier) with Julia 1.7.3 / 1.8.0 / 1.8.1…

That’s an ARMv8 64-bit, which has tier 2 support: Download Julia

Tier 2: Julia is guaranteed to build from source using the default build options, but may or may not pass all tests.

The strange thing in my case is that it used to work perfectly up to version 1.7.2 (and up to 1.6.5 also)

I just had the same issue on Ubuntu 18.04.
I tried using JILL cross-platform installer. It did not help.
Downloading the LTS version of Julia instead of the latest version solved the issue for me.
I hope Julia team can solve this problem with the latest version.

1 Like

I’ve had the same problem with 1.8.0 and with 1.8.1 om my Linux VM. See Julia 1.8.0 hangs on startup when LD_LIBRARY_PATH is set · Issue #46409 · JuliaLang/julia · GitHub for more info. The thread also contains a workaround that’s worked for me so far.

2 Likes

I find that downloading julia from github and compiling the files solved my problem.

Well, my LD_LIBRARY_PATH is empty, not sure this is the same issue.
I was able to get a little more info:

➜  ~ julia -E ""
fatal: error thrown and no exception handler available.
ReadOnlyMemoryError()
__aarch64_sync_cache_range at /workspace/srcdir/gcc-11.1.0/libgcc/config/aarch64/sync-cache.c:61
_ZN4llvm3sys6Memory26InvalidateInstructionCacheEPKvm at /home/xxxxxxxxx/.julia/juliaup/julia-1.8.1+0.aarch64/bin/../lib/julia/libLLVM-13jl.so (unknown line)

Hi again. I think this issue will be solved in the next releases, because I tested with a version under development and it worked. In my previous comment I also mentioned that this issue was not seen in 1.6.7. However, I discovered that “Plots” package caused a lot of problems, and I searched for another option Despite @tsela pointed out a workaround, I did not want to set my LD_LIBRARY_PATH everytime (maybe there is a clever way to set it automatically when julia executable is called, I don’t know.).

The working version is the following:

Version 1.9.0-DEV.1434 (2022-09-25)
Commit d5cde865f2

To install, I leave here a small code snippet to help the prospective Julia developers.

cd $HOME
git clone https://github.com/JuliaLang/julia.git
cd julia
# (OPTIONAL) If you want to download the specific version that I installed
# git checkout d5cde865f2
make -j4
# Change 4 with the number of available CPU threads in your PC for faster compilation

To avoid calling the binary as $HOME/julia/julia everytime, create an alias by adding the following line to .bashrc or .bash_aliases

alias julia='$HOME/julia/julia'

Edit:
Okay, there was a simple way to set LD_LIBRARY_PATH.
Just in your Julia session run the following:

ENV["LD_LIBRARY_PATH"] = "\$HOME/.julia"

With this method the problems with “Plots” package in v1.6.7 is solved.
It also solves the same problem in IJulia in v1.9.0-DEV.1434.
N.B. In REPL, v1.9.0-DEV.1434 did not show any signs of problems.

1 Like

Just for clarification, the workaround I was talking about wasn’t about setting LD_LIBRARY_PATH, but about running the following command after installing Julia:

patchelf --force-rpath --set-rpath '$ORIGIN/:$ORIGIN/../' ./julia-1.8.0/lib/julia/libjulia-codegen.so.1.8
patchelf --force-rpath --set-rpath '$ORIGIN/:$ORIGIN/../' ./julia-1.8.0/lib/julia/libjulia-internal.so.1.8

Replacing julia-1.8.0 with the right version of course, and running it in the folder where the two files are located. You only need to do that once and Julia will from then on ignore LD_LIBRARY_PATH altogether (at least until you install a new version over it).

But hopefully this won’t be needed anymore soon.