Julia 1.8.2 sefaulting when trying to install a package

This is a fresh install of 1.8.2. Julia 1.7.3 works fine and is stable.

(@v1.8) pkg> add LinearAlgebra

signal (11): Segmentation fault
in expression starting at none:0
__pthread_mutex_init at /usr/lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f809974c203)
mbedtls_entropy_init at /usr/lib/x86_64-linux-gnu/libmbedcrypto.so.7 (unknown line)
mbed_connect_common at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
Curl_ssl_connect_nonblocking at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
https_connecting at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
Curl_http_connect at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
multi_runsingle at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
multi_socket at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
curl_multi_socket_action at /opt/local/stow/julia-1.8.2/bin/../lib/julia/libcurl.so (unknown line)
curl_multi_socket_action at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Downloads/src/Curl/Curl.jl:48 [inlined]
curl_multi_socket_action at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Downloads/src/Curl/Curl.jl:56 [inlined]
macro expansion at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Downloads/src/Curl/utils.jl:28 [inlined]
#41 at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Downloads/src/Curl/Multi.jl:176
lock at ./lock.jl:185
macro expansion at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/Downloads/src/Curl/Multi.jl:174 [inlined]
#40 at ./task.jl:484
jfptr_YY.40_66970.clone_1 at /opt/local/stow/julia-1.8.2/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2549
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/julia.h:1839 [inlined]
start_task at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/task.c:931
Allocations: 1863129 (Pool: 1861991; Big: 1138); GC: 3
Segmentation fault (core dumped)

Could you provide more details about your environment?

sure what do you need to see to diagnose it?

I just noticed that I don’t get the same error running the v1.8.2 “Generic Linux on x86” 64-bit release from the official website, on my Fedora 36 system. I guess that you will be asked more details in order to reproduce the error.

I’m running the latest PopOS, which is an Ubuntu variant. From the stack trace it looks like something is missing from the glibc that its hitting.

The same happens for Julia 1.8.1 :frowning:

You’re calling into system mbedtls. How did you install Julia? Do you have the LD_LIBRARY_PATH or LD_PRELOAD environment variables set? If so, what’s the value?

echo $LD_LIBRARY_PATH
/usr/lib/x86_64-linux-gnu

I downloaded Julia binary from the website. I have it installed by stow.

LD_PRELOAD is empty

I don’t understand the significance of this: “you’re calling into system mbedtls”

That’s it; I understand now. Since I have julia install by stow it was picking up the system libraries and not the ones shipped with the julia distribution. Thanks! I just had to change the LD_LIBRARY_PATH

That’s precisely the problem. Start Julia with

LD_LIBRARY_PATH="" julia

Or more simply remove that setting of LD_LIBRARY_PATH (I’m not sure why you have to tell the dynamic loader to search libraries in a system directory where it’d likely look anyway)