Skip to content

the pre-built cargo is broken on powerpc64le #1620

Description

@lu-zero

It seems that the host building it has a faulty openssl.

here the backtrace from simply running cargo

#0  0x0000000100000004 in ?? ()
#1  0x00000001008a8e90 in rand_pool_acquire_entropy ()
#2  0x00000001008a8688 in rand_drbg_get_entropy ()
#3  0x00000001008a5e58 in RAND_DRBG_instantiate ()
#4  0x00000001008a70a8 in drbg_setup ()
#5  0x00000001008a71c8 in do_rand_drbg_init_ossl_ ()
#6  0x00007ffff7f16184 in __pthread_once_slow () from /lib64/libpthread.so.0
#7  0x00000001008cc558 in CRYPTO_THREAD_run_once ()
#8  0x00000001008a7670 in RAND_DRBG_get0_public ()
#9  0x00000001008a7758 in drbg_bytes ()
#10 0x00000001008a8a70 in RAND_bytes ()
#11 0x00000001007ef630 in SSL_CTX_new ()
#12 0x000000010070f738 in git_openssl_stream_global_init ()
#13 0x00000001006e8f44 in init_once ()
#14 0x00007ffff7f16184 in __pthread_once_slow () from /lib64/libpthread.so.0
#15 0x00000001006e90b4 in git_libgit2_init ()
#16 0x0000000100695390 in std::sync::once::Once::call_once::{{closure}} ()
#17 0x00000001009efcb4 in std::sync::once::Once::call_inner () at src/libstd/sync/once.rs:387
#18 0x0000000100695338 in libgit2_sys::init ()
#19 0x0000000100685b30 in git2::config::Config::open_default ()
#20 0x00000001003f5c60 in cargo::ops::registry::http_proxy ()
#21 0x00000001003f42dc in cargo::ops::registry::needs_custom_http_transport ()
#22 0x00000001000c86c8 in cargo::main ()
#23 0x00000001000b5864 in std::rt::lang_start::{{closure}} ()
#24 0x00000001009f1934 in std::rt::lang_start_internal::{{closure}}::{{closure}} () at src/libstd/rt.rs:49
--Type <RET> for more, q to quit, c to continue without paging--
#25 std::sys_common::backtrace::__rust_begin_short_backtrace () at src/libstd/sys_common/backtrace.rs:135
#26 0x00000001009f3f1c in std::rt::lang_start_internal::{{closure}} () at src/libstd/rt.rs:49
#27 std::panicking::try::do_call () at src/libstd/panicking.rs:297
#28 0x0000000100a02a94 in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:92
#29 0x00000001009f4da8 in std::panicking::try () at src/libstd/panicking.rs:276
#30 std::panic::catch_unwind () at src/libstd/panic.rs:388
#31 std::rt::lang_start_internal () at src/libstd/rt.rs:48
#32 0x00000001000cad58 in main ()

And here is a strace:

syscall_0x1047a8e7c(0x11c576690, 0x20, 0x2f90, 0x1, 0x19, 0x190) = -1 ENOSYS (Function not implemented)
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x103f00004} ---
+++ killed by SIGILL +++

uname

Linux sol 4.18.10-gentoo #1 SMP Thu Sep 27 00:19:49 -00 2018 ppc64le POWER9, altivec supported PowerNV T2P9S01 REV 1.01 GNU/Linux

(copied from rust-lang/cargo#6568)

Activity

  1. lu-zero commented on Jan 23, 2019

    @lu-zero
    Author

    I manually built cargo from 1.30 up to the current nightly and everything works as intended.

  2. LutzCle commented on Jan 25, 2019

    @LutzCle

    I can confirm this issue on POWER9 using Ubuntu 18.04.

  3. LutzCle commented on Mar 5, 2019

    @LutzCle

    Are there any updates to this issue? It still persists for me using: stable-powerpc64le-unknown-linux-gnu - rustc 1.33.0 (2aa4c46cf 2019-02-28).

  4. kinnison commented on Mar 5, 2019

    @kinnison
    Contributor

    Is this a rustup issue or a cargo issue?

  5. LutzCle commented on Mar 5, 2019

    @LutzCle

    According to rust-lang/cargo#6568, this is a rustup issue.

  6. kinnison commented on Mar 5, 2019

    @kinnison
    Contributor

    Then this is likely related to #1681 ?

  7. LutzCle commented on Mar 5, 2019

    @LutzCle

    Not sure - is there any way to test this?

  8. lu-zero commented on Mar 5, 2019

    @lu-zero
    Author

    It is not. The openssl used is somehow faulty. Rebuilding cargo using the host openssl makes it work just fine.

  9. LutzCle commented on Mar 5, 2019

    @LutzCle

    Yes, I can verify that everything works with a locally-built cargo.

  10. lu-zero commented on Mar 5, 2019

    @lu-zero
    Author

    I updated the issue so people do not have to look at the cargo issue for the details.

  11. ehuss commented on Mar 5, 2019

    @ehuss
    Contributor

    This does not sound like a rustup issue. cargo is built in rust-lang/rust — see https://github.com/rust-lang/rust/tree/master/src/ci/docker/dist-powerpc64le-linux. There is more information in rust-lang/cargo#6320 and the cause has been identified in rust-lang/rust#57345 (the binutils is likely too old).

  12. added 3 commits that reference this issue on Mar 11, 2019
    98ba2fb
    6a0e3cd
  13. added a commit that references this issue on Mar 18, 2019
    d46ba07
  14. added a commit that references this issue on Mar 19, 2019
    b3490cf
  15. cuviper commented on Mar 21, 2019

    @cuviper
    Member

    This should be fixed by rust-lang/rust#58986 as of rustc 1.35.0-nightly (82e2f3ec2 2019-03-20). It looks like @bors didn't track the auto-close to this issue though.

  16. kinnison commented on Mar 21, 2019

    @kinnison
    Contributor

    Thanks @cuviper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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