rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Illegal instruction on i686

Open puzzlewolf opened this issue 3 years ago • 0 comments

Problem

Hi :)

Installing rustup on i686 fails with Illegal instruction, reported over at https://github.com/rust-lang/rust/issues/100161. @gardell investigated, and produced this stacktrace (posted to https://gitlab.com/sequoia-pgp/sequoia/-/merge_requests/1363):

Thread 1 "rustup-init" received signal SIGILL, Illegal instruction.
0x008d453c in sha2::sha512::x86::sha512_compress_x86_64_avx2 ()
(gdb) bt
#0  0x008d453c in sha2::sha512::x86::sha512_compress_x86_64_avx2 ()
#1  0x008d4499 in sha2::sha512::compress512 ()
#2  0x008cc3eb in sha2::sha512::Engine512::update ()
#3  0x008255c4 in sequoia_openpgp::crypto::backend::rust::hash::<impl sequoia_openpgp::crypto::hash::Digest for sha2::sha512::Sha384>::update ()
#4  0x008733a8 in sequoia_openpgp::parse::hashed_reader::<impl sequoia_openpgp::parse::Cookie>::hash_update ()
#5  0x007759e1 in rustup::dist::signatures::verify_signature ()
#6  0x007732eb in rustup::dist::download::DownloadCfg::check_signature ()
#7  0x0072396e in rustup::dist::download::DownloadCfg::download_and_check ()
#8  0x00722228 in rustup::dist::dist::dl_v2_manifest ()
#9  0x0071d66b in rustup::dist::dist::try_update_from_dist_ ()
#10 0x0071a714 in rustup::install::InstallMethod::install ()
#11 0x00717b8c in rustup::toolchain::DistributableToolchain::install_from_dist
    ()
#12 0x00809958 in rustup::cli::self_update::install ()
#13 0x008037d2 in rustup::cli::setup_mode::main ()
#14 0x0047309b in rustup_init::main ()
#15 0x00470c02 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#16 0x0047392e in main ()

He concluded

This issue is most likely due to https://github.com/RustCrypto/hashes/pull/386 which has been fixed in 0.2.4 of the cpufeatures crate but https://github.com/rust-lang/rustup/blob/master/Cargo.lock#L350 is locked to 0.2.2

Originally posted by @gardell in https://github.com/rust-lang/rust/issues/100161#issuecomment-1262821877

Steps

E.g. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh, (see https://github.com/rust-lang/rust/issues/100161 for more)

Possible Solution(s)

I hope it's sufficient to bump cpufeatures to >= 0.2.4, updating sequoia-openpgp's RustCrypto backend is currently blocked on another dependency :/

Notes

No response

Rustup version

>= 1.25.0, the issue is triggered through sequoia PGP

Installed toolchains

none, rustup is not installed

puzzlewolf avatar Oct 11 '22 09:10 puzzlewolf