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

1.14.0 powerpc64le test failures: smoke_dtor, test_typed_arena_drop_small_count #39015

Closed
infinity0 opened this issue Jan 12, 2017 · 19 comments
Closed
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-PowerPC Target: PowerPC processors P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@infinity0
Copy link
Contributor

Build machine: https://db.debian.org/machines.cgi?host=ppc64el-osuosl-01
Build log: https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=ppc64el&ver=1.14.0%2Bdfsg1-3&stamp=1484057235
Raw build log: https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=ppc64el&ver=1.14.0%2Bdfsg1-3&stamp=1484057235&raw=1

This is after applying #38650 and #38675. The LLVM diff between Debian vs Rust is here.

Note that, because of these failures, the whole-compiler tests (e.g. run-pass etc) have not been run, but they probably also have failures.

Relevant links:
https://github.com/rust-lang/rust/blob/1.14.0/src/librustc_back/target/powerpc64le_unknown_linux_gnu.rs
https://github.com/rust-lang/rust/blob/1.14.0/mk/cfg/powerpc64le-unknown-linux-gnu.mk

test thread::local::tests::smoke_dtor ... ok
thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `1`, right: `2`)', src/libstd/thread/local.rs:414
stack backtrace:
   1:         0x38b1f597 - std::sys::imp::backtrace::tracing::imp::write::h33de6ffd1ea231bf
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:         0x38b691a7 - std::panicking::default_hook::{{closure}}::hcabac60ea7b48baf
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:247
   3:         0x38b4b07f - std::panicking::rust_panic_with_hook::h059b28291193443c
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:263
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:451
   4:         0x38b4aaf7 - std::panicking::begin_panic::h929be95e04ca164b
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:413
   5:         0x38b4a8cf - std::panicking::begin_panic_fmt::ha7d9cbddb8702778
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:397
   6:         0x389d70d3 - std::thread::local::tests::smoke_no_dtor::h972e83c12b443a47
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/thread/local.rs:414
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/thread/local.rs:245
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/thread/local.rs:413
   7:         0x38b7b587 - <F as test::FnBox<T>>::call_box::he8581d59e8028413
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1265
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:141
   8:         0x38b6d523 - std::panicking::try::do_call::h83b58d81c874206d
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1211
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
   9:         0x38bc2c8f - __rust_maybe_catch_panic
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  10:         0x38b6ca5b - std::panicking::try::do_call::h636b19c00d03e824
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1210
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  11:         0x38bc2c8f - __rust_maybe_catch_panic
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  12:         0x38b7499f - <F as alloc::boxed::FnBox<A>>::call_box::h15256864a2eaf226
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/thread/mod.rs:287
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:595
  13:         0x38bb856f - std::sys::imp::thread::Thread::new::thread_start::ha102a6120fc52763
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:605
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys_common/thread.rs:21
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys/unix/thread.rs:84
  14:     0x3fff92b3809b - <unknown>
test thread::local::tests::smoke_no_dtor ... FAILED
[..]
test tests::test_typed_arena_zero_sized ... ok
test tests::test_typed_arena_drop_small_count ... FAILED
test tests::test_noncopy ... ok

failures:

---- tests::test_typed_arena_drop_small_count stdout ----
	thread 'tests::test_typed_arena_drop_small_count' panicked at 'assertion failed: `(left == right)` (left: `0`, right: `100`)', src/libarena/lib.rs:465
stack backtrace:
   1:         0x50fdbe47 - std::sys::imp::backtrace::tracing::imp::write::h917062bce4ff48c3
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:         0x50fe2dc7 - std::panicking::default_hook::{{closure}}::h0bacac31b5ed1870
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:247
   3:         0x50fe0003 - std::panicking::default_hook::h5897799da33ece67
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:257
   4:         0x50fe0bbb - std::panicking::rust_panic_with_hook::h109e116a3a861224
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:451
   5:         0x50fe09b7 - std::panicking::begin_panic::hbb38be1379e09df0
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:413
   6:         0x50fe085f - std::panicking::begin_panic_fmt::h26713cea9bce3ab0
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:397
   7:         0x50f8fc6b - arena::tests::test_typed_arena_drop_small_count::h4439ca27c88207e8
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libarena/lib.rs:465
   8:         0x50fa2427 - <F as test::FnBox<T>>::call_box::he8581d59e8028413
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1265
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:141
   9:         0x50f943c3 - std::panicking::try::do_call::h83b58d81c874206d
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1211
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  10:         0x50fe9b2f - __rust_maybe_catch_panic
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  11:         0x50f938fb - std::panicking::try::do_call::h636b19c00d03e824
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1210
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  12:         0x50fe9b2f - __rust_maybe_catch_panic
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  13:         0x50f9b83f - <F as alloc::boxed::FnBox<A>>::call_box::h15256864a2eaf226
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/thread/mod.rs:287
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:595
  14:         0x50fdf40f - std::sys::imp::thread::Thread::new::thread_start::ha102a6120fc52763
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:605
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys_common/thread.rs:21
                        at /«BUILDDIR»/rustc-1.14.0+dfsg1/src/libstd/sys/unix/thread.rs:84
  15:     0x3fff8474809b - <unknown>


failures:
    tests::test_typed_arena_drop_small_count

test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured

/«BUILDDIR»/rustc-1.14.0+dfsg1/mk/tests.mk:423: recipe for target 'tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-arena.ok' failed
make[2]: *** [tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-arena.ok] Error 101
make[2]: *** Waiting for unfinished jobs....
test sync::mpsc::tests::stress_recv_timeout_two_threads ... ok

failures:

failures:
    thread::local::tests::smoke_no_dtor

test result: FAILED. 773 passed; 1 failed; 0 ignored; 0 measured

/«BUILDDIR»/rustc-1.14.0+dfsg1/mk/tests.mk:423: recipe for target 'tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-std.ok' failed
make[2]: *** [tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-std.ok] Error 101
@brson brson added A-testsuite Area: The testsuite used to check the correctness of rustc O-PowerPC Target: PowerPC processors I-wrong and removed A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 12, 2017
@racardoso
Copy link

Those tests aren't failing on master but they're failing on branch 1.15.0 as well

	thread 'tests::test_typed_arena_drop_small_count' panicked at 'assertion failed: `(left == right)` (left: `0`, right: `100`)', src/libarena/lib.rs:465
test thread::local::tests::smoke_dtor ... ok
thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `1`, right: `2`)', src/libstd/thread/local.rs:414

@racardoso
Copy link

racardoso commented Feb 13, 2017

The test tests::test_typed_arena_drop_small_count seems to works fine running unoptimized
~/rust/src/libarena$ ../../build/powerpc64le-unknown-linux-gnu/stage0/bin/cargo test

package:  ~/rust/src/tools/compiletest/Cargo.toml
workspace: ~/rust/src/Cargo.toml
   Compiling arena v0.0.0 (file:///~/rust/src/libarena)
    Finished debug [unoptimized + debuginfo] target(s) in 1.40 secs
     Running ~/rust/src/target/debug/deps/arena-3b56f105f34c9b1f

running 13 tests
test tests::bench_copy ... ok
test tests::bench_copy_nonarena ... ok
test tests::bench_noncopy ... ok
test tests::test_arena_alloc_nested ... ok
test tests::bench_noncopy_nonarena ... ok
test tests::test_typed_arena_drop_count ... ok
test tests::test_typed_arena_drop_on_clear ... ok
test tests::test_typed_arena_drop_small_count ... ok
test tests::test_unused ... ok
test tests::test_typed_arena_zero_sized ... ok
test tests::test_typed_arena_clear ... ok
test tests::test_copy ... ok
test tests::test_noncopy ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured

But on release mode it fails:
~/rust/src/libarena$ rust/build/powerpc64le-unknown-linux-gnu/stage0/bin/cargo test --release

Compiling arena v0.0.0 (file:///rust/src/libarena)
    Finished release [optimized] target(s) in 1.66 secs
     Running /rust/src/target/release/deps/arena-3b56f105f34c9b1f

running 13 tests
test tests::bench_copy_nonarena ... ok
test tests::bench_noncopy ... ok
test tests::bench_copy ... ok
test tests::bench_noncopy_nonarena ... ok
test tests::test_arena_alloc_nested ... ok
test tests::test_typed_arena_drop_on_clear ... ok
test tests::test_typed_arena_drop_count ... ok
test tests::test_typed_arena_drop_small_count ... FAILED
test tests::test_typed_arena_clear ... ok
test tests::test_copy ... ok
test tests::test_unused ... ok
test tests::test_typed_arena_zero_sized ... ok
test tests::test_noncopy ... ok

failures:

---- tests::test_typed_arena_drop_small_count stdout ----
	thread 'tests::test_typed_arena_drop_small_count' panicked at 'assertion failed: `(left == right)` (left: `0`, right: `100`)', lib.rs:591
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    tests::test_typed_arena_drop_small_count

test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured

Seems to me that some optimization is making this test fail.

@er-1
Copy link
Contributor

er-1 commented Feb 20, 2017

I tried a build without the optimization.
smoke_dtor and test_typed_arena_drop_small_count didn't fail, but then I got 6 new failing tests:

failures:
    [compile-fail] compile-fail/asm-bad-clobber.rs
    [compile-fail] compile-fail/asm-in-bad-modifier.rs
    [compile-fail] compile-fail/asm-misplaced-option.rs
    [compile-fail] compile-fail/asm-out-assign-imm.rs
    [compile-fail] compile-fail/asm-out-no-modifier.rs
    [compile-fail] compile-fail/asm-out-read-uninit.rs

test result: FAILED. 2569 passed; 6 failed; 13 ignored; 0 measured

thread 'main' panicked at 'Some tests failed', /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/main.rs:304
stack backtrace:
   1:     0x3fffb6d33c13 - std::sys::imp::backtrace::tracing::imp::write::h917062bce4ff48c3
                        at /root/rustc-1.14.0+dfsg1/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x3fffb6d74a5f - std::panicking::default_hook::{{closure}}::h0bacac31b5ed1870
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:247
   3:     0x3fffb6d61df7 - std::panicking::default_hook::h5897799da33ece67
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:263
   4:     0x3fffb6d62a3f - std::panicking::rust_panic_with_hook::h109e116a3a861224
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:451
   5:         0x591ccbb3 - std::panicking::begin_panic::h634e2b37a96f78d4
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:413
   6:         0x59270543 - compiletest::run_tests::hd41b3b3a007825c7
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/main.rs:304
   7:         0x5926a0fb - compiletest::main::he8a84d59ab8da8df
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/main.rs:72
   8:     0x3fffb6d74baf - core::ops::FnOnce::call_once::h346b3ee6a997d309
   9:     0x3fffb6d623ef - std::panicking::try::do_call::h006598d33c40d6c2
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  10:     0x3fffb6d7e197 - __rust_try
  11:     0x3fffb6d7de73 - __rust_maybe_catch_panic
                        at /root/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  12:     0x3fffb6d62123 - std::panicking::try::hb2dca1165100b5a8
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
  13:     0x3fffb6d0ffef - std::panic::catch_unwind::h7cf531dfc5b2ca07
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
  14:     0x3fffb6d63c47 - std::rt::lang_start::hd661476ce2fc2931
                        at /root/rustc-1.14.0+dfsg1/src/libstd/rt.rs:57
  15:         0x5928397b - main
  16:     0x3fffb6a2289b - <unknown>
/root/rustc-1.14.0+dfsg1/mk/tests.mk:771: recipe for target 'tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-cfail.ok' failed
make[2]: *** [tmp/check-stage2-T-powerpc64le-unknown-linux-gnu-H-powerpc64le-unknown-linux-gnu-cfail.ok] Error 101

output of asm-out-read-uninit as example:


---- [compile-fail] compile-fail/asm-out-read-uninit.rs stdout ----
	

executing powerpc64le-unknown-linux-gnu/stage2/bin/rustc /root/rustc-1.14.0+dfsg1/src/test/compile-fail/asm-out-read-uninit.rs -L powerpc64le-unknown-linux-gnu/test/compile-fail/ --target=powerpc64le-unknown-linux-gnu --error-format json -L powerpc64le-unknown-linux-gnu/test/compile-fail/asm-out-read-uninit.stage2-powerpc64le-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o powerpc64le-unknown-linux-gnu/test/compile-fail/asm-out-read-uninit.stage2-powerpc64le-unknown-linux-gnu -C link-args=-Wl,-z,relro -C rpath -O -L powerpc64le-unknown-linux-gnu/rt
------stdout------------------------------

------stderr------------------------------
{"message":"function is never used: `foo`, #[warn(dead_code)] on by default","code":null,"level":"warning","spans":[{"file_name":"/root/rustc-1.14.0+dfsg1/src/test/compile-fail/asm-out-read-uninit.rs","byte_start":507,"byte_end":546,"line_start":15,"line_end":15,"column_start":1,"column_end":40,"is_primary":true,"text":[{"text":"fn foo(x: isize) { println!(\"{}\", x); }","highlight_start":1,"highlight_end":40}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}

------------------------------------------

error: compile-fail test compiled successfully!
status: exit code: 0
command: powerpc64le-unknown-linux-gnu/stage2/bin/rustc /root/rustc-1.14.0+dfsg1/src/test/compile-fail/asm-out-read-uninit.rs -L powerpc64le-unknown-linux-gnu/test/compile-fail/ --target=powerpc64le-unknown-linux-gnu --error-format json -L powerpc64le-unknown-linux-gnu/test/compile-fail/asm-out-read-uninit.stage2-powerpc64le-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o powerpc64le-unknown-linux-gnu/test/compile-fail/asm-out-read-uninit.stage2-powerpc64le-unknown-linux-gnu -C link-args=-Wl,-z,relro -C rpath -O -L powerpc64le-unknown-linux-gnu/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
{"message":"function is never used: `foo`, #[warn(dead_code)] on by default","code":null,"level":"warning","spans":[{"file_name":"/root/rustc-1.14.0+dfsg1/src/test/compile-fail/asm-out-read-uninit.rs","byte_start":507,"byte_end":546,"line_start":15,"line_end":15,"column_start":1,"column_end":40,"is_primary":true,"text":[{"text":"fn foo(x: isize) { println!(\"{}\", x); }","highlight_start":1,"highlight_end":40}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}

------------------------------------------

thread '[compile-fail] compile-fail/asm-out-read-uninit.rs' panicked at 'explicit panic', /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:2394
stack backtrace:
   1:     0x3fffb6d33c13 - std::sys::imp::backtrace::tracing::imp::write::h917062bce4ff48c3
                        at /root/rustc-1.14.0+dfsg1/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x3fffb6d74a5f - std::panicking::default_hook::{{closure}}::h0bacac31b5ed1870
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:247
   3:     0x3fffb6d61dbb - std::panicking::default_hook::h5897799da33ece67
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:257
   4:     0x3fffb6d62a3f - std::panicking::rust_panic_with_hook::h109e116a3a861224
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:451
   5:         0x591ccbb3 - std::panicking::begin_panic::h634e2b37a96f78d4
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:413
   6:         0x5926776b - compiletest::runtest::ProcRes::fatal::h54a5408aa7f1b4ae
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:2394
   7:         0x5925aea3 - compiletest::runtest::TestCx::fatal_proc_rec::h048763087fdecee5
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:1610
   8:         0x59246167 - compiletest::runtest::TestCx::run_cfail_test::h6107dfa9bf737ccb
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:147
   9:         0x59245dbf - compiletest::runtest::TestCx::run_revision::h28948cf4de3d8165
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:113
  10:         0x59245a1b - compiletest::runtest::run::h9a013f2d7d043e98
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/runtest.rs:68
  11:         0x59279f37 - compiletest::make_test_closure::{{closure}}::h1d99800c1710baec
                        at /root/rustc-1.14.0+dfsg1/src/tools/compiletest/src/main.rs:475
  12:         0x591d722f - <F as test::FnBox<T>>::call_box::h4ad2e7c32cefe3ee
                        at /root/rustc-1.14.0+dfsg1/src/libtest/lib.rs:141
  13:     0x3fffb70c01d7 - test::run_test::run_test_inner::{{closure}}::{{closure}}::h45ac1c5b9ec21047
                        at /root/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1211
  14:     0x3fffb70a4f53 - <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once::h25100c493af17208
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
  15:     0x3fffb705774f - std::panicking::try::do_call::h83b58d81c874206d
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  16:     0x3fffb6d7e197 - __rust_try
  17:     0x3fffb6d7de73 - __rust_maybe_catch_panic
                        at /root/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  18:     0x3fffb7057227 - std::panicking::try::hc02417aadfb71d2a
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
  19:     0x3fffb705648b - std::panic::catch_unwind::h5a63093655e8b6d3
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
  20:     0x3fffb70c04d7 - test::run_test::run_test_inner::{{closure}}::h6976ff3c0d36456b
                        at /root/rustc-1.14.0+dfsg1/src/libtest/lib.rs:1210
  21:     0x3fffb70a5003 - <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once::h58d3803097181a5b
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panic.rs:295
  22:     0x3fffb70575c3 - std::panicking::try::do_call::h636b19c00d03e824
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:356
  23:     0x3fffb6d7e197 - __rust_try
  24:     0x3fffb6d7de73 - __rust_maybe_catch_panic
                        at /root/rustc-1.14.0+dfsg1/src/libpanic_unwind/lib.rs:97
  25:     0x3fffb7056ed7 - std::panicking::try::h903e0fe874149ae4
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panicking.rs:332
  26:     0x3fffb70563fb - std::panic::catch_unwind::h1d25dd81ac04550e
                        at /root/rustc-1.14.0+dfsg1/src/libstd/panic.rs:351
  27:     0x3fffb70bea93 - std::thread::Builder::spawn::{{closure}}::h28a406b7a5ba6398
                        at /root/rustc-1.14.0+dfsg1/src/libstd/thread/mod.rs:287
  28:     0x3fffb708353f - <F as alloc::boxed::FnBox<A>>::call_box::h15256864a2eaf226
                        at /root/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:595
  29:     0x3fffb6c76f03 - <Box<alloc::boxed::FnBox<A, Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..FnOnce$LT$A$GT$$GT$::call_once::hea74365c035f0007
                        at /root/rustc-1.14.0+dfsg1/src/liballoc/boxed.rs:605
  30:     0x3fffb6d2e9b7 - std::sys_common::thread::start_thread::h92084fba4ec169b2
                        at /root/rustc-1.14.0+dfsg1/src/libstd/sys_common/thread.rs:21
  31:     0x3fffb6d5bdb7 - std::sys::imp::thread::Thread::new::thread_start::ha102a6120fc52763
                        at /root/rustc-1.14.0+dfsg1/src/libstd/sys/unix/thread.rs:84
  32:     0x3fffb691809b - <unknown>

@arielb1
Copy link
Contributor

arielb1 commented Feb 20, 2017

The asm tests are just missing ignore-powerpc flags or whatever (they already have ignore-arm etc. - they only work on x86). What's the correct spelling? cc @alexcrichton

@racardoso
Copy link

@er-1 Doing a quick looking on the output you sent, the code is warning a dead code and (maybe) the warning output is not expected since the optimizations should do a dead code elimination:

------stderr------------------------------
{"message":"function is never used: `foo`, #[warn(dead_code)]  ...

'smoke_dtor' and typed_arena_drop_small_count fails with opt-level equals 2 or greater. I'll try to build with opt-level=1 to see if those tests fails.

@er-1
Copy link
Contributor

er-1 commented Feb 20, 2017

I've added ignore flags in the related asm test files. I'll let you know how the build goes.

@er-1
Copy link
Contributor

er-1 commented Feb 22, 2017

As said I added the ignore flags in the related asm test files.
I also made a little change into src/test/run-make/issue-24445/Makefile:

--- a/src/test/run-make/issue-24445/Makefile
+++ b/src/test/run-make/issue-24445/Makefile
@@ -3,9 +3,9 @@
 ifeq ($(UNAME),Linux)
 all:
 	$(RUSTC) foo.rs
-	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -o $(TMPDIR)/foo
+	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -o $(TMPDIR)/foo
 	$(call RUN,foo)
-	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -pie -fPIC -o $(TMPDIR)/foo
+	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -pie -fPIC -o $(TMPDIR)/foo
 	$(call RUN,foo)
 else
 all:

And then I'm able to build and test rust on ppc64el :)

@amboar
Copy link

amboar commented Feb 22, 2017

@er-1 I've been meaning to send a pull req to mark those asm tests as ignored on powerpc64* for a while. Thanks for that.

Separately, I've been investigating the failure of test_typed_arena_drop_small_count on powerpc64le. It appears to be an issue with the difference between the llvm inline and always-inline passes. I've put up a repository to demonstrate the failure: https://github.com/amboar/libarena-ppc64le-small-drop

Here libarena was extracted from 1.15.0 and hacked up a bit to remove the already passing test cases. It shouldn't matter what version it comes from though as it's the optimiser that's failing, and it's still failing with recent nightly rustcs as well as 1.15.0 itself.

I haven't yet looked into the details of inline vs always-inline but I plan to when I have some time.

er-1 added a commit to er-1/rust that referenced this issue Feb 22, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 23, 2017
eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
@amboar
Copy link

amboar commented Feb 27, 2017

Following up on my comment above, it seems the opt pipeline -sroa -simplifycfg -inline -instcombine is the minimal pipeline that produces the break. The test case will pass if any one pass is removed. I've updated demo.sh in the repository above to demonstrate.

@amboar
Copy link

amboar commented Feb 27, 2017

I began testing against upstream LLVM with the reduced optimisation pipeline. The problem has been resolved in upstream, specifically by commit llvm-mirror/llvm@21c68fa

I have created an LLVM tree which backports relevant patches to the rust branch: amboar/llvm@ed2c001, and demo.sh is now passing for each case using the artifacts built from this tree.

I didn't put much effort into the backport so it's a complete hatchet-job on @hfinkle's patches. I'll try to clean it up in the next day or so and submit a pull request.

@amboar
Copy link

amboar commented Feb 28, 2017

@TimNN has a pull-req open to bump llvm to release_40: #40123 - this will resolve the test_typed_arena_drop_small_count failure.

er-1 added a commit to er-1/rust that referenced this issue Mar 1, 2017
…4445.

It prevents the test to fail on ppc64el at least.

Part of rust-lang#39015
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Mar 2, 2017
Add a reference to the dl library to the Makefile of the test issue-2…

…4445.

It prevents the test to fail on ppc64el at least.

Part of rust-lang#39015
@arielb1 arielb1 added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 23, 2017
@nagisa
Copy link
Member

nagisa commented Mar 30, 2017

cc me

@arielb1 arielb1 added P-high High priority and removed I-nominated labels Mar 30, 2017
@nagisa
Copy link
Member

nagisa commented Apr 1, 2017

So I said last meeting I had a powerpc virtual machine I could test whether LLVM 4.0 really fixes this. Sadly, turns out this machine is not 64-bit powerpc nor it is the low endian one, sadly.

@pnkfelix pnkfelix mentioned this issue Apr 6, 2017
5 tasks
@brson brson added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Apr 11, 2017
@shepmaster shepmaster mentioned this issue Apr 13, 2017
23 tasks
@nikomatsakis
Copy link
Contributor

triage: P-medium

Downgrading to P-medium. Blocked on LLVM 4.0 upgrade (#37609).

@rust-highfive rust-highfive added P-medium Medium priority and removed P-high High priority labels Apr 13, 2017
@shahn
Copy link
Contributor

shahn commented Apr 25, 2017

llvm 4.0 upgrade has just landed, so this might be fixed/fixable now

@amboar
Copy link

amboar commented Apr 25, 2017

@shahn thanks for the heads-up, I'll try to test this tomorrow

@sanxiyn
Copy link
Member

sanxiyn commented Jun 8, 2017

How did the test go?

@amboar
Copy link

amboar commented Jun 19, 2017

@sanxiyn Sorry for the delay. I tested with 554c685 and both test_typed_arena_drop_small_count and smoke_dtor now pass on ppc64le.

@sanxiyn
Copy link
Member

sanxiyn commented Jun 19, 2017

Thanks for testing! Closing.

@sanxiyn sanxiyn closed this as completed Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-PowerPC Target: PowerPC processors P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests