Skip to content

SIGILL on PPC32 inside RAND_poll() called by libgit2_sys::init() #3852

Closed
@tarcieri

Description

@tarcieri

I am encountering cargo crashing with SIGILL on 32-bit PowerPC 7447A after installing with rustup:

Program received signal SIGILL, Illegal instruction.
0x20d89334 in RAND_poll ()
(gdb) bt
#0  0x20d89334 in RAND_poll ()
#1  0x20d887dc in ssleay_rand_bytes ()
#2  0x20c6e5fc in SSL_CTX_new ()
#3  0x20b42e64 in git_openssl_stream_global_init ()
#4  0x20b291d4 in init_common ()
#5  0x20b29388 in init_once ()
#6  0x20707cdc in __GI___pthread_once (once_control=0x20fe78e8 <_once_init>, init_routine=0x20b29324 <init_once>) at ../nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c:86
#7  0x20b29414 in git_libgit2_init ()
#8  0x20b25e1c in std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::h4f3f0378b6841f4d ()
#9  0x20df95e4 in std::sync::once::{{impl}}::call_inner () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libstd/sync/once.rs:288
#10 0x20b25fa0 in libgit2_sys::init::h9ec74b5dead701aa ()
#11 0x20b19840 in git2::config::Config::open_default::h2c6ef11c5f7ed621 ()
#12 0x209841bc in cargo::ops::registry::http_proxy::h8d5082d31cf4d553 ()
#13 0x20984348 in cargo::ops::registry::http_proxy_exists::hd3c3ce97150bd2ac ()
#14 0x2081e254 in cargo::execute::hde538bc4de650fee ()
#15 0x20814dc8 in cargo::call_main_without_stdin::hba58ee9cd44dd247 ()
#16 0x2081de04 in cargo::main::h4a870b5478195f89 ()
#17 0x20e05f30 in std::panicking::try::do_call<fn(),()> () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libstd/panicking.rs:460
#18 0x20e0f058 in panic_unwind::__rust_maybe_catch_panic () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libpanic_unwind/lib.rs:98
#19 0x20e06ad8 in try<(),fn()> () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libstd/panicking.rs:436
#20 catch_unwind<fn(),()> () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libstd/panic.rs:361
#21 std::rt::lang_start () at /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-rustbuild-linux/build/src/libstd/rt.rs:57
#22 0x20862910 in main ()

This occurs after a SIGILL inside OPENSSL_crypto207_probe(), which appears deliberate as that function is probing CPU capabilities. The OPENSSL_crypto207_probe() handles the SIGILL it causes, but RAND_poll() appears to be using an unsupported instruction which causes cargo to crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions