-
Notifications
You must be signed in to change notification settings - Fork 91
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: Could not load platform certs #335
Comments
I just managed to reinstall juliaup by using the 1.6.9 installer: curl -o juliaup_installer https://julialang-s3.julialang.org/juliaup/bin/juliainstaller-1.6.9-x86_64-unknown-linux-gnu
chmod +x juliaup_installer
./juliaup_installer Afterwards, version 1.6.10 is succesfully installed:
But trying a self update is again frought with trouble:
Report file: name = 'Juliaup'
operating_system = 'unix:Ubuntu'
crate_version = '1.6.10'
explanation = '''
Panic occurred in file '/cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ureq-2.5.0/src/rtls.rs' at line 66
'''
cause = 'Could not load platform certs: Custom { kind: InvalidData, error: "Could not load PEM file \"/usr/lib/ssl/certs/ca-certificates.crt\"" }'
method = 'Panic'
backtrace = '''
0: 0x558925e67c2b - once_cell::imp::OnceCell<T>::initialize::{{closure}}::h5bfcc1d88491955f
1: 0x558925d6bc64 - once_cell::imp::initialize_or_wait::h1ec0dac3b5a4b4b2
2: 0x558925c4ee2b - once_cell::imp::OnceCell<T>::initialize::hb0b596b192b33afe
3: 0x558925e66080 - ureq::agent::AgentBuilder::new::hd3bc112ff06394f3
4: 0x558925d61454 - juliaup::command_selfupdate::run_command_selfupdate::hd36b7b3ec05e50b9
5: 0x558925c5e6ab - juliaup::main::h23171212412d87b3
6: 0x558925c4f743 - std::sys_common::backtrace::__rust_begin_short_backtrace::h601d65d54d71e8ea
7: 0x558925c78852 - main
8: 0x7ffb5bac8d90 - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
9: 0x7ffb5bac8e40 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:392
10: 0x558925c4f639 - _start
11: 0x0 - <unresolved>''' So, the problem is likely related to the changes between the two versions: v1.6.9...v1.6.10 I did try running update-ca-certificates, but to no effect:
Afterwards the error with juliaup is the same. Though |
Yeah, I changed how we handle TLS for 1.6.10, instead of using a hard coded list of root certificates that we ship ourselves (the webpki list), we are now trying to use the system root cert list. Apparently, that doesn't always work reliably... My current plan is to change this on Linux so that it first attempts to load the system certificates, and if that fails (like it does in your case) to fall back on the webpki list of certificates that we used previously. Note that on Windows on Mac we stopped validating certs ourselves entirely and just had that off to the OS. CC @StefanKarpinski does this all make sense to you? |
Ok, new plan: I will go back to the hardcoded webpki list that we used for the last year or so on Linux. The crate that implements the functionality of using the native cert list (https://github.com/rustls/rustls-native-certs) has this language:
That to me sounds sufficiently scary that I think we probably don't want to use that as a default no matter what. We can still add a configuration option at some later point to use the native cert list on Linux, but as an opt-in. |
Thanks for the fast response 🚀, it is appreciated. If I can test something, point me at it. As for the underlying reason: While I can't comment on whether it is a good idea or not to use Debian's ca-certificates, it can't be the issue in this case, since curl eats my
So curl works fine with local certs, but with the exact same SSL file juliaup v1.6.10 crashes:
report: name = 'Juliaup'
operating_system = 'unix:Ubuntu'
crate_version = '1.6.10'
explanation = '''
Panic occurred in file '/cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ureq-2.5.0/src/rtls.rs' at line 66
'''
cause = 'Could not load platform certs: Custom { kind: InvalidData, error: "Could not load PEM file \"/etc/ssl/certs/ca-certificates.crt\"" }'
method = 'Panic'
backtrace = '''
0: 0x5640a8067c2b - once_cell::imp::OnceCell<T>::initialize::{{closure}}::h5bfcc1d88491955f
1: 0x5640a7f6bc64 - once_cell::imp::initialize_or_wait::h1ec0dac3b5a4b4b2
2: 0x5640a7e4ee2b - once_cell::imp::OnceCell<T>::initialize::hb0b596b192b33afe
3: 0x5640a8066080 - ureq::agent::AgentBuilder::new::hd3bc112ff06394f3
4: 0x5640a7f61454 - juliaup::command_selfupdate::run_command_selfupdate::hd36b7b3ec05e50b9
5: 0x5640a7e5e6ab - juliaup::main::h23171212412d87b3
6: 0x5640a7e4f743 - std::sys_common::backtrace::__rust_begin_short_backtrace::h601d65d54d71e8ea
7: 0x5640a7e78852 - main
8: 0x7f313e178d90 - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
9: 0x7f313e178e40 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:392
10: 0x5640a7e4f639 - _start
11: 0x0 - <unresolved>''' So it seems like there is an issue with https://github.com/rustls/rustls-native-certs here. I'll see if I can reproduce the issue with a little Rust example and maybe I can open an issue there. Let's see. |
So for now I've just reverted back to always using the Mozilla cert list on Linux. Primarily we need to have a version that works for Juliacon ;) If we can get the native cert stuff working down the road on Linux as well that would be great! |
Just installed from the dev channel with
I'll change back to the release channel once 1.6.12 has that status. |
Great! |
I think this should probably be reverted once the |
Trying to perform any downloads with my juliaup installation doesn't work and tells me to make a bug report.
Steps to Reproduce
Trying to update juliaup gives an error:
The same happens with every other operation downloading something. The associated report shows it's a cert problem:
Versions
Ideas
I recently upgraded to Ubuntu 22.04 LTS which might or might not be relevant.
I removed the installation with
juliaup self uninstal
. Reinstalling withcurl -fsSL https://install.julialang.org | sh
shows the same error again after accepting the default config. The report file is this:The text was updated successfully, but these errors were encountered: