Skip to content
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

the pre-built cargo is broken on powerpc64le #1620

Closed
lu-zero opened this issue Jan 21, 2019 · 13 comments · Fixed by rust-lang/rust#58986
Closed

the pre-built cargo is broken on powerpc64le #1620

lu-zero opened this issue Jan 21, 2019 · 13 comments · Fixed by rust-lang/rust#58986

Comments

@lu-zero
Copy link

lu-zero commented Jan 21, 2019

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)

@lu-zero
Copy link
Author

lu-zero commented Jan 23, 2019

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

@LutzCle
Copy link

LutzCle commented Jan 25, 2019

I can confirm this issue on POWER9 using Ubuntu 18.04.

@LutzCle
Copy link

LutzCle commented Mar 5, 2019

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).

@kinnison
Copy link
Contributor

kinnison commented Mar 5, 2019

Is this a rustup issue or a cargo issue?

@LutzCle
Copy link

LutzCle commented Mar 5, 2019

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

@kinnison
Copy link
Contributor

kinnison commented Mar 5, 2019

Then this is likely related to #1681 ?

@LutzCle
Copy link

LutzCle commented Mar 5, 2019

Not sure - is there any way to test this?

@lu-zero
Copy link
Author

lu-zero commented Mar 5, 2019

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

@LutzCle
Copy link

LutzCle commented Mar 5, 2019

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

@lu-zero
Copy link
Author

lu-zero commented Mar 5, 2019

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

@ehuss
Copy link
Contributor

ehuss commented Mar 5, 2019

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).

cuviper added a commit to cuviper/rust that referenced this issue Mar 7, 2019
Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<rust-lang#57345 (comment)>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang#57345
Closes rust-lang/rustup#1620
kennytm added a commit to kennytm/rust that referenced this issue Mar 11, 2019
[CI] Update binutils for powerpc64 and powerpc64le

Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<rust-lang#57345 (comment)>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang#57345
Closes rust-lang/rustup#1620
kennytm added a commit to kennytm/rust that referenced this issue Mar 15, 2019
[CI] Update binutils for powerpc64 and powerpc64le

Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<rust-lang#57345 (comment)>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang#57345
Closes rust-lang/rustup#1620

r? @alexcrichton
sanxiyn added a commit to sanxiyn/rust that referenced this issue Mar 18, 2019
[CI] Update binutils for powerpc64 and powerpc64le

Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<rust-lang#57345 (comment)>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang#57345
Closes rust-lang/rustup#1620

r? @alexcrichton
kennytm added a commit to kennytm/rust that referenced this issue Mar 19, 2019
[CI] Update binutils for powerpc64 and powerpc64le

Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<rust-lang#57345 (comment)>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang#57345
Closes rust-lang/rustup#1620

r? @alexcrichton
@cuviper
Copy link
Member

cuviper commented Mar 21, 2019

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.

@kinnison
Copy link
Contributor

Thanks @cuviper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants