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

ICE running cargo test #112461

Closed
rib opened this issue Jun 9, 2023 · 5 comments
Closed

ICE running cargo test #112461

rib opened this issue Jun 9, 2023 · 5 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

@rib
Copy link

rib commented Jun 9, 2023

Unfortunately I don't have any code I can share to reproduce this currently, and haven't reproduced this since following the suggestion to run cargo clean -p ark_module_store, but perhaps the backtrace will be helpful in diagnosing the cause of the compiler panic.

I was running cargo like:

CARGO_TARGET_DIR=target-windows cargo test -p  ark-module-host-world

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-pc-windows-msvc
release: 1.70.0
LLVM version: 16.0.2

Error output

error: internal compiler error: encountered incremental compilation error with mir_built(db1b2b5279d2dae9-f4b551014f855c7)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p ark_module_store` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at 'Found unstable fingerprints for mir_built(db1b2b5279d2dae9-f4b551014f855c7): Steal { value: RwLock(RefCell { value: Some(Body { basic_blocks: BasicBlocks { basic_blocks: [BasicBlockData { statements: [StorageLive(_3), StorageLive(_4), StorageLive(_5), _5 = (*(_1.1: &i64)), _4 = ark::module_store::module_tag::Tag::Id(move _5), StorageDead(_5), _3 = std::option::Option::<ark::module_store::module_tag::Tag>::Some(move _4)], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:45: 190:46 (#919), scope: scope[0] }, kind: drop(_4) -> [return: bb1, unwind: bb5] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_4)], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#3727), scope: scope[0] }, kind: drop((*(_1.0: &mut std::option::Option<proto_types::ark::module_store::module_tag::Tag>))) -> [return: bb2, unwind: bb3] }), is_cleanup: false }, BasicBlockData { statements: [(*(_1.0: &mut std::option::Option<proto_types::ark::module_store::module_tag::Tag>)) = move _3, _0 = const ()], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:45: 190:46 (#919), scope: scope[0] }, kind: drop(_3) -> [return: bb4, unwind: bb6] }), is_cleanup: false }, BasicBlockData { statements: [(*(_1.0: &mut std::option::Option<proto_types::ark::module_store::module_tag::Tag>)) = move _3], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#3727), scope: scope[0] }, kind: goto -> bb5 }), is_cleanup: true }, BasicBlockData { statements: [StorageDead(_3)], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:46: 190:46 (#919), scope: scope[0] }, kind: return }), is_cleanup: false }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:45: 190:46 (#919), scope: scope[0] }, kind: drop(_3) -> [return: bb6, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] }, kind: resume }), is_cleanup: true }], cache: Cache { predecessors: OnceCell(Uninit), switch_sources: OnceCell(Uninit), is_cyclic: OnceCell(Uninit), postorder: OnceCell(Uninit) } }, phase: Built, pass_count: 0, source: MirSource { instance: Item(WithOptConstParam { did: DefId(0:1534 ~ ark_module_store[ec9e]::proto_types::ark::module_store::module_tag::{impl#3}::merge::{closure#1}), const_param_did: None }), promoted: None }, source_scopes: [SourceScopeData { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), parent_scope: None, inlined: None, inlined_parent_scope: None, local_data: Set(SourceScopeLocalData { lint_root: HirId(DefId(0:1531 ~ ark_module_store[ec9e]::proto_types::ark::module_store::module_tag::{impl#3}::merge).179), safety: Safe }) }], generator: None, local_decls: [LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: (), user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:32 (#919), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: [closure@components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46], user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: (), user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: std::option::Option<proto_types::ark::module_store::module_tag::Tag>, user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(AggregateTemp), internal: false, ty: proto_types::ark::module_store::module_tag::Tag, user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(AggregateTemp), internal: false, ty: i64, user_ty: None, source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), scope: scope[0] } }], user_type_annotations: [], arg_count: 2, spread_arg: None, var_debug_info: [VarDebugInfo { name: "field", source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#3098), scope: scope[0] }, value: (*(_1.0: &mut std::option::Option<proto_types::ark::module_store::module_tag::Tag>)), argument_index: None }, VarDebugInfo { name: "owned_value", source_info: SourceInfo { span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#3098), scope: scope[0] }, value: (*(_1.1: &i64)), argument_index: None }], span: components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46 (#919), required_consts: [], is_polymorphic: true, injection_phase: None, tainted_by_errors: None }) }) }', 
Backtrace

/rustc/90c541806f23a127002de5b4038be731ba1458ca\compiler\rustc_query_system\src\query\plumbing.rs:715:9
stack backtrace:
   0:     0x7ffcda406c02 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he4dbe7f5385cd1e2
   1:     0x7ffcda444f5b - core::fmt::write::h72b30843329f2c20
   2:     0x7ffcda3fbe6a - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h44d7f217ec8c08a4
   3:     0x7ffcda40694b - std::sys::common::alloc::realloc_fallback::h25dd000eefb1a25f
   4:     0x7ffcda40a2da - std::panicking::default_hook::h8d2d551f7739f430
   5:     0x7ffcda409f40 - std::panicking::default_hook::h8d2d551f7739f430
   6:     0x7ffc1945f02e - rustc_driver_impl[39e757d53880b308]::describe_lints
   7:     0x7ffcda40abef - std::panicking::rust_panic_with_hook::h2561aa68cd5abc10
   8:     0x7ffcda40a94e - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::hcac4dd4b6ea7d20c
   9:     0x7ffcda4078a9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he4dbe7f5385cd1e2
  10:     0x7ffcda40a660 - rust_begin_unwind
  11:     0x7ffcda479165 - core::panicking::panic_fmt::he37b281957295da9
  12:     0x7ffc1b326e0e - <&[rustc_ast[9d9e172e794f524b]::ast::Attribute] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  13:     0x7ffc177cfaa4 - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  14:     0x7ffc18ee15cf - <&[rustc_type_ir[e4a94c75124a4b3a]::Variance] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  15:     0x7ffc18db5957 - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::as_any
  16:     0x7ffc188358b0 - <rustc_mir_transform[d4e2a26eaceac4de]::dataflow_const_prop::DataflowConstProp as rustc_middle[298b6ec0f969779]::mir::MirPass>::is_enabled
  17:     0x7ffc1b2b2c11 - <&[rustc_ast[9d9e172e794f524b]::ast::Attribute] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  18:     0x7ffc1b25a110 - <rustc_span[ad67946381e6ba24]::hygiene::ExpnId as rustc_serialize[a924d7a59c3ae2b4]::serialize::Encodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheEncoder>>::encode
  19:     0x7ffc177d0335 - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  20:     0x7ffc18ee2b8f - <&[rustc_type_ir[e4a94c75124a4b3a]::Variance] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  21:     0x7ffc18db5b37 - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::as_any
  22:     0x7ffc18836831 - <rustc_mir_transform[d4e2a26eaceac4de]::dataflow_const_prop::DataflowConstProp as rustc_middle[298b6ec0f969779]::mir::MirPass>::is_enabled
  23:     0x7ffc1b2ad5e2 - <&[rustc_ast[9d9e172e794f524b]::ast::Attribute] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  24:     0x7ffc1b25598a - <rustc_span[ad67946381e6ba24]::hygiene::ExpnId as rustc_serialize[a924d7a59c3ae2b4]::serialize::Encodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheEncoder>>::encode
  25:     0x7ffc1774e20d - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  26:     0x7ffc18e817b1 - <&[rustc_type_ir[e4a94c75124a4b3a]::Variance] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  27:     0x7ffc18db62ad - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::as_any
  28:     0x7ffc18b155a2 - <rustc_middle[298b6ec0f969779]::ty::adjustment::AutoBorrowMutability as rustc_mir_build[692303aa0e857e66]::thir::cx::expr::ToBorrowKind>::to_borrow_kind
  29:     0x7ffc1772b603 - <&rustc_data_structures[41be42171f3b2d17]::unord::UnordSet<rustc_span[ad67946381e6ba24]::def_id::LocalDefId> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  30:     0x7ffc1774ba5c - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  31:     0x7ffc18e7f4c7 - <&[rustc_type_ir[e4a94c75124a4b3a]::Variance] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  32:     0x7ffc18db9d20 - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::as_any
  33:     0x7ffc17645cbc - <rustc_borrowck[1cd546338639e988]::type_check::TypeVerifier as rustc_middle[298b6ec0f969779]::mir::visit::Visitor>::visit_span
  34:     0x7ffc18be3314 - <rustc_borrowck[1cd546338639e988]::type_check::TypeVerifier as rustc_middle[298b6ec0f969779]::mir::visit::Visitor>::visit_body
  35:     0x7ffc18bb5a29 - <polonius_engine[e76070452d0682db]::facts::AllFacts<rustc_borrowck[1cd546338639e988]::facts::RustcFacts> as rustc_borrowck[1cd546338639e988]::facts::AllFactsExt>::enabled
  36:     0x7ffc18b21276 - <rustc_borrowck[1cd546338639e988]::MirBorrowckCtxt as rustc_mir_dataflow[8d163a54c6877a60]::framework::visitor::ResultsVisitor>::visit_terminator_before_primary_effect
  37:     0x7ffc18b156b4 - <rustc_middle[298b6ec0f969779]::ty::adjustment::AutoBorrowMutability as rustc_mir_build[692303aa0e857e66]::thir::cx::expr::ToBorrowKind>::to_borrow_kind
  38:     0x7ffc1772b603 - <&rustc_data_structures[41be42171f3b2d17]::unord::UnordSet<rustc_span[ad67946381e6ba24]::def_id::LocalDefId> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  39:     0x7ffc1774ba5c - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  40:     0x7ffc18e7f4c7 - <&[rustc_type_ir[e4a94c75124a4b3a]::Variance] as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  41:     0x7ffc18db9d20 - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::as_any
  42:     0x7ffc17be6e7a - once_cell[b880d516fb8c3c0e]::imp::initialize_or_wait
  43:     0x7ffc16cee52d - rustc_interface[2aa0624475714241]::callbacks::setup_callbacks
  44:     0x7ffc16cdacf5 - rustc_interface[2aa0624475714241]::passes::analysis
  45:     0x7ffc177e03c1 - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  46:     0x7ffc1772c13c - <&rustc_data_structures[41be42171f3b2d17]::unord::UnordSet<rustc_span[ad67946381e6ba24]::def_id::LocalDefId> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  47:     0x7ffc177cafc5 - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  48:     0x7ffc17873de8 - <&rustc_index[16c4f1290dbf3aed]::vec::IndexVec<rustc_middle[298b6ec0f969779]::mir::Promoted, rustc_middle[298b6ec0f969779]::mir::Body> as rustc_serialize[a924d7a59c3ae2b4]::serialize::Decodable<rustc_query_impl[31ecb434a2a03a44]::on_disk_cache::CacheDecoder>>::decode
  49:     0x7ffc176d7225 - <rustc_query_impl[31ecb434a2a03a44]::Queries as rustc_middle[298b6ec0f969779]::ty::query::QueryEngine>::try_mark_green
  50:     0x7ffc16c87f31 - rustc_driver_impl[39e757d53880b308]::main
  51:     0x7ffc16c95873 - <rustc_middle[298b6ec0f969779]::ty::SymbolName as core[bcfc2130cb4e43e7]::fmt::Display>::fmt
  52:     0x7ffc16c9372d - rustc_driver_impl[39e757d53880b308]::args::arg_expand_all
  53:     0x7ffc16c889d0 - rustc_driver_impl[39e757d53880b308]::main
  54:     0x7ffc16c94d43 - rustc_driver_impl[39e757d53880b308]::args::arg_expand_all
  55:     0x7ffcda41caac - std::sys::windows::thread::Thread::new::h911abb68de5d2aa0
  56:     0x7ffd13527614 - BaseThreadInitThunk
  57:     0x7ffd13f226a1 - RtlUserThreadStart

error: 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.70.0 (90c541806 2023-05-31) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=lld-link -C incremental=[REDACTED] -C target-feature=+crt-static -C link-args=-fuse-ld=lld-link

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

query stack during panic:
#0 [mir_built] building MIR for `proto_types::ark::module_store::module_tag::<impl at components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46>::merge::{closure#1}`
#1 [mir_const] preparing `proto_types::ark::module_store::module_tag::<impl at components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46>::merge::{closure#1}` for borrow checking
#2 [mir_promoted] processing MIR for `proto_types::ark::module_store::module_tag::<impl at components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46>::merge::{closure#1}`
#3 [mir_borrowck] borrow-checking `proto_types::ark::module_store::module_tag::<impl at components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46>::merge::{closure#1}`
#4 [mir_borrowck] borrow-checking `proto_types::ark::module_store::module_tag::<impl at components\module-store\src\proto_types\ark\module_store.rs:190:32: 190:46>::merge`
#5 [analysis] running analysis passes on this crate
end of query stack

@rib rib 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 Jun 9, 2023
@rib
Copy link
Author

rib commented Jun 9, 2023

Possibly a duplicate of #112408 ?

@Noratrieb
Copy link
Member

This was probably fixed in #111952. Are you able to reproduce this on beta, which contains the fix?

@rib
Copy link
Author

rib commented Jun 12, 2023

Thanks, I haven't reproduced this since I first hit this but a colleague was hitting something similar repeatedly so I'll ask them to give that a try.

@repi
Copy link

repi commented Sep 7, 2023

@rib don't think we've run into this on later Rust versions, so can probably assumed it gotten fixed and close it?

@rib
Copy link
Author

rib commented Sep 7, 2023

Haven't hit these for a while now, so yeah, sounds reasonable to close.

@rib rib closed this as completed Sep 7, 2023
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