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

Illegal instruction in hamt-rs in Rust 1.15 #38683

Closed
brson opened this issue Dec 29, 2016 · 7 comments
Closed

Illegal instruction in hamt-rs in Rust 1.15 #38683

brson opened this issue Dec 29, 2016 · 7 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Dec 29, 2016

This did not happen in Rust 1.14.

https://github.com/michaelwoerister/hamt-rs commit 7bb893a2e4e5258b9bfcef46355a1dedfe0fc596

rustc 1.15.0-beta.1 (d9a0f0d 2016-12-19)

x86_64-unknown-linux-gnu

brian@ip-10-145-43-250:~/dev/hamt-rs⟫ cargo +beta test
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/hamt_rs-848cb67a347f2678

running 18 tests
test hamt::tests::test_eq_empty_copy ... ok
test hamt::tests::test_default_copy ... ok
test hamt::tests::test_get_index ... ok
test hamt::tests::test_insert_ascending_copy ... FAILED
thread panicked while panicking. aborting.
error: process didn't exit successfully: `/mnt2/dev/hamt-rs/target/debug/deps/hamt_rs-848cb67a347f2678` (signal: 4, SIGILL: illegal instruction)

To learn more, run the command again with --verbose.

cc @michaelwoerister

@brson brson added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 29, 2016
@alexcrichton
Copy link
Member

Looks like this is actually a panic in a panic with the test harness hiding the output. The actual error is a debug assertion tripping

test hamt::tests::stress_test_copy ... thread 'hamt::tests::stress_test_copy' panicked at 'assertion failed: new_i == (new_node.entry_count() as usize)', src/hamt.rs:985
stack backtrace:
   1:     0x5594987f996a - std::sys::imp::backtrace::tracing::imp::write::hc924c01e14fdf084
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x5594987fcb0f - std::panicking::default_hook::{{closure}}::h3c7e4ff009c61db6
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:349
   3:     0x5594987fc70e - std::panicking::default_hook::h4684c234c8ae64c1
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:365
   4:     0x5594987fcfb7 - std::panicking::rust_panic_with_hook::h03d5a3ece8e80bc6
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:553
   5:     0x55949876fe23 - std::panicking::begin_panic::ha0a1db1d8e138dd3
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:515
   6:     0x559498791857 - <hamt_rs::hamt::UnsafeNode<K, V, IS, H>>::copy_with_new_entry::h6c170073efd5c707
                        at /home/alex/code/hamt-rs/src/hamt.rs:985
   7:     0x5594987891a5 - <hamt_rs::hamt::UnsafeNode<K, V, IS, H>>::insert::ha7423a2a61f77503
                        at /home/alex/code/hamt-rs/src/hamt.rs:445
   8:     0x55949878a3fa - <hamt_rs::hamt::UnsafeNode<K, V, IS, H>>::try_insert_in_place::h1bcf3ca8f1746725
                        at /home/alex/code/hamt-rs/src/hamt.rs:559
   9:     0x559498795caf - <hamt_rs::hamt::HamtMap<K, V, IS, H>>::insert_internal::h537ed4c9d168ec7b
                        at /home/alex/code/hamt-rs/src/hamt.rs:1233
  10:     0x559498797266 - <hamt_rs::hamt::HamtMap<K, V, IS, H>>::insert::hd0643ef38ae5494f
                        at /home/alex/code/hamt-rs/src/hamt.rs:1310
  11:     0x5594987a7da7 - hamt_rs::testing::Test::random_insert_remove_stress_test::he6910fa41eadaaf1
                        at /home/alex/code/hamt-rs/src/testing.rs:211
  12:     0x55949879afb9 - hamt_rs::hamt::tests::stress_test_copy::hf915b13afc66be76
                        at /home/alex/code/hamt-rs/src/hamt.rs:1699
  13:     0x5594987cae1e - <F as test::FnBox<T>>::call_box::h5eb8a1547b6faa57
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libtest/lib.rs:1349
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libtest/lib.rs:140
  14:     0x559498803eca - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  15:     0x5594987bf293 - std::panicking::try::do_call::h22cb7a85a3940175
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:434
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panic.rs:351
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libtest/lib.rs:1294
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panic.rs:295
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:458
  16:     0x559498803eca - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  17:     0x5594987c5e62 - <F as alloc::boxed::FnBox<A>>::call_box::h676aac362446d380
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:434
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panic.rs:351
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/thread/mod.rs:301
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/liballoc/boxed.rs:605
  18:     0x5594987fbe14 - std::sys::imp::thread::Thread::new::thread_start::h29f4c99db4339ba7
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/liballoc/boxed.rs:615
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
  19:     0x7f38cd5236b9 - start_thread
  20:     0x7f38cd04382c - clone
21: 0x0 - <unknown>

@alexcrichton
Copy link
Member

I was in the process of minimizing this when I realized that this has been fixed on nightly...

@alexcrichton
Copy link
Member

This was fixed by some PR in this range.

My guess is that #38600 fixed it, but that's a total shot in the dark. @eddyb does anything in that range look like it'd fix this bug to you? perhaps #38449?

@eddyb
Copy link
Member

eddyb commented Dec 30, 2016

#38600 is far more likely than my own PR (which shouldn't affect codegen).

@michaelwoerister
Copy link
Member

Nice! Thanks for fixing my crate :)

@nikomatsakis
Copy link
Contributor

So, I tried a build from the beta branch (which I believe includes a backport of #38600). I don't see any illegal instructions, but instead running the hamt-rs tests just hangs and never completes! Indeed, using the latest nightly build (from Dec 28 or so) still exhibits the error. I haven't tried a plain vanilla master build yet.

@alexcrichton
Copy link
Member

@nikomatsakis oh I don't think it's hanging it's just taking awhile (takes a long time for me on stable too). I just let it run to completion and it finished successfully on both beta/stable.

So looks like the beta backport fixed the issue, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

5 participants