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

Fingerprint assertion failed (Bevy/Rapier) #84269

Closed
GreenXenith opened this issue Apr 17, 2021 · 2 comments
Closed

Fingerprint assertion failed (Bevy/Rapier) #84269

GreenXenith opened this issue Apr 17, 2021 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@GreenXenith
Copy link

Note: This seems to be extremely temperamental. Sometimes it works for no apparent reason but then it fails after trying to do more.

Code

use bevy::prelude::*;

// ColliderSet resource is the specific issue. Removing it and/or using other resources works fine.
fn crash(mut colliders: ResMut<bevy_rapier3d::rapier::geometry::ColliderSet>) {}

fn main() {
    App::build()
        .insert_resource(Msaa { samples: 4 })
        .add_plugins(DefaultPlugins)
        .add_plugin(bevy_rapier3d::physics::RapierPhysicsPlugin)
        .add_system(crash.system())
        .run();
}

TOML:

[package]
name = "crashy"
version = "0.1.0"
edition = "2018"

[dependencies]
bevy = "0.5"
bevy_rapier3d = { version = "*", features = [ "simd-nightly" ] }

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (132b4e5d1 2021-04-13)
binary: rustc
commit-hash: 132b4e5d167b7e622fcc11fa2b67b931105b4de1
commit-date: 2021-04-13
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(212923312148573672, 18320173992410164289))`,
 right: `Some(Fingerprint(8537439170242672706, 4648092694241280842))`: found unstable fingerprints for evaluate_obligation(ec72a45d41155054-768b49212a0839c0): Ok(EvaluatedToOkModuloRegions)', /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (132b4e5d1 2021-04-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `bevy_rapier3d::nalgebra::Translation<f32, bevy_rapier3d::nalgebra::U3>: std::marker::Send`
#1 [typeck] type-checking `main`
end of query stack
error: could not compile `crashy`
Backtrace

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(212923312148573672, 18320173992410164289))`,
 right: `Some(Fingerprint(8537439170242672706, 4648092694241280842))`: found unstable fingerprints for evaluate_obligation(ec72a45d41155054-768b49212a0839c0): Ok(EvaluatedToOkModuloRegions)', /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0:     0x7f7835794320 - std::backtrace_rs::backtrace::libunwind::trace::hdcf4f90f85129e83
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f7835794320 - std::backtrace_rs::backtrace::trace_unsynchronized::h2669e30cb82f6732
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7835794320 - std::sys_common::backtrace::_print_fmt::hfbda19e17f6db318
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f7835794320 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1a8751bf59281272
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f783580567f - core::fmt::write::h7aa6cd0067dca82a
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/core/src/fmt/mod.rs:1094:17
   5:     0x7f7835788b45 - std::io::Write::write_fmt::hd7dd3a1df9b6befb
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/io/mod.rs:1580:15
   6:     0x7f7835797f0b - std::sys_common::backtrace::_print::h551e9ec8a9fa8106
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f7835797f0b - std::sys_common::backtrace::print::ha4b1c5e95fa040b3
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f7835797f0b - std::panicking::default_hook::{{closure}}::h0b34c9ab7fb9f857
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/panicking.rs:208:50
   9:     0x7f78357979ed - std::panicking::default_hook::h3067e8318decd17a
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/panicking.rs:225:9
  10:     0x7f7835f5cd4d - rustc_driver::report_ice::h0582ed2432eb0d01
  11:     0x7f7835798620 - std::panicking::rust_panic_with_hook::h81b8facc50f34daa
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/panicking.rs:595:17
  12:     0x7f78357981f7 - std::panicking::begin_panic_handler::{{closure}}::ha376ab85d95a000e
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/panicking.rs:497:13
  13:     0x7f78357947dc - std::sys_common::backtrace::__rust_end_short_backtrace::h6795c8afdd1a77e6
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7f7835798159 - rust_begin_unwind
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/panicking.rs:493:5
  15:     0x7f78357660f1 - core::panicking::panic_fmt::hbe99dddd3092ba3c
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/core/src/panicking.rs:92:14
  16:     0x7f783580212e - core::panicking::assert_failed_inner::h4fdb1013d187f202
  17:     0x7f7836612f3c - core::panicking::assert_failed::h2cb4c07ec1e15c78
  18:     0x7f7837e4a6b8 - rustc_query_system::query::plumbing::incremental_verify_ich::hc7bc723f3d64cb27
  19:     0x7f7837e56b6e - rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory::hef65e4baccecf519
  20:     0x7f7837e76d18 - rustc_data_structures::stack::ensure_sufficient_stack::h716fb88f7c1bfd6b
  21:     0x7f783731ea07 - rustc_query_system::query::plumbing::get_query_impl::haaf90bc2178abcb4
  22:     0x7f783739ea13 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation::hc11225f16a20b0e2
  23:     0x7f783785b2a8 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation::h0c8b2a62132aa028
  24:     0x7f783785b5b0 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow::hf3c078b8eaaed6d6
  25:     0x7f78378695d9 - rustc_trait_selection::traits::fulfill::FulfillProcessor::process_trait_obligation::h62c69d92cfc2d8f9
  26:     0x7f7837867daa - rustc_trait_selection::traits::fulfill::FulfillProcessor::progress_changed_obligations::h7ee3bafec1ed42ba
  27:     0x7f78378848b2 - rustc_data_structures::obligation_forest::ObligationForest<O>::process_obligations::h2b00554f3dc3f7c0
  28:     0x7f78378678fb - <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_where_possible::h103c08b87e905efd
  29:     0x7f7837137307 - rustc_typeck::check::fn_ctxt::_impl::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::resolve_vars_with_obligations::hfec2dc787f42b3d6
  30:     0x7f783713fd78 - rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_method_argument_types::h9ac749b6b14cd4f6
  31:     0x7f783712c67b - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind::hc69621785e3c6692
  32:     0x7f783712b815 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation::h47456aee4a906d1b
  33:     0x7f7837140572 - rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types::h9108ef99f47bc2a0
  34:     0x7f783713fe95 - rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_method_argument_types::h9ac749b6b14cd4f6
  35:     0x7f783712c67b - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind::hc69621785e3c6692
  36:     0x7f783712b815 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation::h47456aee4a906d1b
  37:     0x7f783712c582 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind::hc69621785e3c6692
  38:     0x7f783712b815 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation::h47456aee4a906d1b
  39:     0x7f7837142aa6 - rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt::h1939f56db9cb9380
  40:     0x7f7837143352 - rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected::hab00c51512c24e20
  41:     0x7f783712b815 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation::h47456aee4a906d1b
  42:     0x7f7837136ff3 - rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr::h40d0689891d304b0
  43:     0x7f78371f6130 - rustc_typeck::check::check::check_fn::h039d226300b0410d
  44:     0x7f78371b632d - rustc_infer::infer::InferCtxtBuilder::enter::he3255c23a431a459
  45:     0x7f783720465d - rustc_typeck::check::typeck::hb4ebe1ffe254a5f2
  46:     0x7f7837f2e31b - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::ha97e411563a02509
  47:     0x7f783738eb24 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h6c8a89e2423e14d7
  48:     0x7f783736ea92 - rustc_data_structures::stack::ensure_sufficient_stack::h8fa95fc4535b48a2
  49:     0x7f78373344f1 - rustc_query_system::query::plumbing::force_query_with_job::h4ff389903336f7ec
  50:     0x7f783731d434 - rustc_query_system::query::plumbing::get_query_impl::haa013b5980622920
  51:     0x7f783739caed - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck::hc794e4a1ed8e251e
  52:     0x7f783717d4ea - rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners::h5be9c37d9f112b7e
  53:     0x7f7837d09f1f - rustc_typeck::check::typeck_item_bodies::h1183a7b554853710
  54:     0x7f7837f2ecfc - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::hb593b4d9fe3c3cf3
  55:     0x7f7837f03798 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h8c4088a789993ddb
  56:     0x7f7837e7ae82 - rustc_data_structures::stack::ensure_sufficient_stack::hdeeffaa9c4013f03
  57:     0x7f7837e1a341 - rustc_query_system::query::plumbing::force_query_with_job::h32e909b4a0a58749
  58:     0x7f7837dda50c - rustc_query_system::query::plumbing::get_query_impl::h4be8737019e13358
  59:     0x7f7837f1aa8f - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies::he285bfa3b3efa046
  60:     0x7f7837ca55c1 - rustc_session::utils::<impl rustc_session::session::Session>::time::hdcdbadabc7500af5
  61:     0x7f7837cc29af - rustc_typeck::check_crate::heb848e97b33b6184
  62:     0x7f7837a7277d - rustc_interface::passes::analysis::hdf0c41e7bd20242b
  63:     0x7f783663f27a - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h79da03c51d5eb779
  64:     0x7f7837f0ae08 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::he1753e46538bf70f
  65:     0x7f7837e76097 - rustc_data_structures::stack::ensure_sufficient_stack::h55b64aa8321942c2
  66:     0x7f7837e2b721 - rustc_query_system::query::plumbing::force_query_with_job::hec25eeb08c07b506
  67:     0x7f7837e003a3 - rustc_query_system::query::plumbing::get_query_impl::hd4f6191670b007e2
  68:     0x7f7837f18c8f - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis::ha4b253866e559d53
  69:     0x7f7837a510aa - rustc_interface::passes::QueryContext::enter::h1243d4d1902c3141
  70:     0x7f7837a35f65 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hedca2acec6ab04da
  71:     0x7f7837a34f04 - rustc_span::with_source_map::h67cb68e15a9ffc39
  72:     0x7f7837a36f31 - rustc_interface::interface::create_compiler_and_run::he6a465670788f848
  73:     0x7f7837a506b8 - scoped_tls::ScopedKey<T>::set::h8de4c07d6e313e7a
  74:     0x7f7837a50bd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h953d4096b984a1d5
  75:     0x7f7837a54505 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf2d8af4e3cccbbb1
  76:     0x7f78357a8513 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3aa31cb6360b59d9
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/alloc/src/boxed.rs:1546:9
  77:     0x7f78357a8513 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7719d3c7c5841461
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/alloc/src/boxed.rs:1546:9
  78:     0x7f78357a8513 - std::sys::unix::thread::Thread::new::thread_start::hfbe13ead469fd0bc
                               at /rustc/132b4e5d167b7e622fcc11fa2b67b931105b4de1/library/std/src/sys/unix/thread.rs:71:17
  79:     0x7f78356a9609 - start_thread
  80:     0x7f78355b2293 - clone
  81:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (132b4e5d1 2021-04-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `bevy_rapier3d::nalgebra::Translation<f32, bevy_rapier3d::nalgebra::U3>: std::marker::Send`
#1 [typeck] type-checking `main`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack

@GreenXenith GreenXenith added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 17, 2021
@illis
Copy link

illis commented Apr 17, 2021

Have a similar issue. Can reproduce with your example by:
1/ cargo run # this works fine
2/ modify your main.crash function > replace geometry::ColliderSet with dynamics::RigidBodySet
3/ cargo run # this causes ICE

If you then rm -r target/debug/incremental/ you can run compile/run again (until you modify the affected file again).

rustc --version --verbose:

rustc 1.53.0-nightly (b0c818c5e 2021-04-16)
binary: rustc
commit-hash: b0c818c5e0fa37251d9fda2f656bf1041a2e1e1d
commit-date: 2021-04-16
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

@wesleywiser
Copy link
Member

Thanks for filing the bug report! We just shipped a patch release to work around this issue and are currently triaging related issues related to ensure each underlying problem gets resolved. Since this appears to be a duplicate of #83381, I'm going to close in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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

3 participants