rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.85k stars 12.66k forks source link

Internal Compilation Error due to unstable fingerprints #114110

Open Lucretiel opened 1 year ago

Lucretiel commented 1 year ago

Meta

rustc --version --verbose:

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: aarch64-apple-darwin
release: 1.70.0
LLVM version: 16.0.2

Error output

error: internal compiler error: encountered incremental compilation error with mir_built(18ba645e23b04125-ce3b7b117bc72d49)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p op_b5_client` 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(18ba645e23b04125-ce3b7b117bc72d49): Steal { value: RwLock(RefCell { value: Some(Body { basic_blocks: BasicBlocks { basic_blocks: [BasicBlockData { statements: [StorageLive(_3), StorageLive(_4), StorageLive(_5), _5 = &((*_1).0: std::sync::Mutex<b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>)], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] }, kind: _4 = std::sync::Mutex::<__is_offline::Matcher>::lock(move _5) -> [return: bb1, unwind: bb18] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_5)], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] }, kind: _3 = Result::<std::sync::MutexGuard<'_, __is_offline::Matcher>, PoisonError<std::sync::MutexGuard<'_, __is_offline::Matcher>>>::unwrap(move _4) -> [return: bb2, unwind: bb17] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_4), FakeRead(ForLet(None), _3), StorageLive(_6), StorageLive(_7), StorageLive(_8), StorageLive(_9), _9 = move _2], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[1] }, kind: _8 = Box::<MockallF>::new(move _9) -> [return: bb3, unwind: bb15] }), is_cleanup: false }, BasicBlockData { statements: [_7 = move _8 as std::boxed::Box<dyn std::ops::Fn() -> bool + std::marker::Send> (Pointer(Unsize))], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_8) -> [return: bb4, unwind: bb13] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_9), StorageDead(_8), _6 = __is_offline::Matcher::Func(move _7)], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_7) -> [return: bb5, unwind: bb12] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_7), StorageLive(_10), StorageLive(_11), _11 = &mut _3], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[1] }, kind: _10 = <std::sync::MutexGuard<'_, __is_offline::Matcher> as DerefMut>::deref_mut(move _11) -> [return: bb6, unwind: bb12] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_11)], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#12846), scope: scope[1] }, kind: drop((*_10)) -> [return: bb7, unwind: bb8] }), is_cleanup: false }, BasicBlockData { statements: [(*_10) = move _6], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_6) -> [return: bb9, unwind: bb16] }), is_cleanup: false }, BasicBlockData { statements: [(*_10) = move _6], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#12846), scope: scope[1] }, kind: goto -> bb12 }), is_cleanup: true }, BasicBlockData { statements: [StorageDead(_6), StorageDead(_10), _0 = const ()], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[0] }, kind: drop(_3) -> [return: bb10, unwind: bb18] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_3)], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[0] }, kind: drop(_2) -> [return: bb11, unwind: bb19] }), is_cleanup: false }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:42: 11:42 (#1768), scope: scope[0] }, kind: return }), is_cleanup: false }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_6) -> [return: bb16, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_9) -> [return: bb14, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_7) -> [return: bb16, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[1] }, kind: drop(_9) -> [return: bb16, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[0] }, kind: drop(_3) -> [return: bb18, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[0] }, kind: drop(_4) -> [return: bb18, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:41: 11:42 (#1768), scope: scope[0] }, kind: drop(_2) -> [return: bb19, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), 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:6209 ~ op_b5_client[87a5]::b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::{impl#6}::withf), const_param_did: None }), promoted: None }, source_scopes: [SourceScopeData { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), parent_scope: None, inlined: None, inlined_parent_scope: None, local_data: Set(SourceScopeLocalData { lint_root: HirId(DefId(0:6209 ~ op_b5_client[87a5]::b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::{impl#6}::withf).0), safety: Safe }) }, SourceScopeData { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), parent_scope: Some(scope[0]), inlined: None, inlined_parent_scope: None, local_data: Set(SourceScopeLocalData { lint_root: HirId(DefId(0:6209 ~ op_b5_client[87a5]::b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::{impl#6}::withf).0), safety: Safe }) }], generator: None, local_decls: [LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: (), user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:34 (#1768), scope: scope[0] } }, LocalDecl { mutability: Not, local_info: Set(User(ImplicitSelf(MutRef))), internal: false, ty: &mut b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Common, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Not, local_info: Set(User(Var(VarBindingForm { binding_mode: BindByValue(Not), opt_ty_info: None, opt_match_place: Some((None, op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768))), pat_span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768) }))), internal: false, ty: MockallF, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(User(Var(VarBindingForm { binding_mode: BindByValue(Mut), opt_ty_info: None, opt_match_place: Some((None, op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768))), pat_span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768) }))), internal: false, ty: std::sync::MutexGuard<'_, b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: std::result::Result<std::sync::MutexGuard<'_, b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>, std::sync::PoisonError<std::sync::MutexGuard<'_, b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>>>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: &std::sync::Mutex<b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(AggregateTemp), internal: false, ty: std::boxed::Box<dyn std::ops::Fn() -> bool + std::marker::Send>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: std::boxed::Box<MockallF>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: MockallF, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: &mut b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: &mut std::sync::MutexGuard<'_, b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::Matcher>, user_ty: None, source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] } }], user_type_annotations: [CanonicalUserTypeAnnotation { user_ty: Canonical { value: TypeOf(DefId(5:285 ~ alloc[c023]::boxed::{impl#0}::new), UserSubsts { substs: [^0], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(5:283 ~ alloc[c023]::boxed::{impl#0}), self_ty: std::boxed::Box<^1, ^2> }) }), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), inferred_ty: fn(MockallF) -> std::boxed::Box<MockallF> {std::boxed::Box::<MockallF>::new} }], arg_count: 2, spread_arg: None, var_debug_info: [VarDebugInfo { name: "self", source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] }, value: _1, argument_index: Some(1) }, VarDebugInfo { name: "__mockall_f", source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[0] }, value: _2, argument_index: Some(2) }, VarDebugInfo { name: "__mockall_guard", source_info: SourceInfo { span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), scope: scope[1] }, value: _3, argument_index: None }], span: op-b5-client/src/b5_client/entity_api/mod.rs:11:34: 11:42 (#1768), required_consts: [], is_polymorphic: true, injection_phase: None, tainted_by_errors: None }) }) }', /rustc/90c541806f23a127002de5b4038be731ba1458ca/compiler/rustc_query_system/src/query/plumbing.rs:715:9
Backtrace

``` 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: rustc_query_system::query::plumbing::incremental_verify_ich_failed:: 3: >>::with::::{closure#1}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>>::{closure#0}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>> 4: rustc_query_system::query::plumbing::try_execute_query:: 5: ::mir_built 6: rustc_mir_transform::mir_const 7: >>::with::::{closure#1}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>>::{closure#0}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>> 8: rustc_query_system::query::plumbing::try_execute_query:: 9: ::mir_const 10: rustc_mir_transform::mir_promoted 11: >>::with::::{closure#1}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>>::{closure#0}, core::option::Option<(rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>> 12: rustc_query_system::query::plumbing::try_execute_query:: 13: ::mir_promoted 14: rustc_borrowck::mir_borrowck 15: >::call_once 16: >>::with::::{closure#2}, (rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex)> 17: rustc_query_system::query::plumbing::try_execute_query:: 18: ::mir_borrowck 19: ::par_body_owners::{closure#0}>::{closure#0}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once 20: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], ::par_body_owners::{closure#0}> 21: ::time::<(), rustc_interface::passes::analysis::{closure#2}> 22: rustc_interface::passes::analysis 23: >>::with::::{closure#2}, (rustc_middle::query::erase::Erased<[u8; 1]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle::query::erase::Erased<[u8; 1]>, rustc_query_system::dep_graph::graph::DepNodeIndex)> 24: rustc_query_system::query::plumbing::try_execute_query:: 25: ::analysis 26: >>::with::::enter>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> 27: >::enter::, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}> 28: ::enter::, rustc_span::ErrorGuaranteed>> 29: rustc_span::set_source_map::, rustc_interface::interface::run_compiler, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. 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 aarch64-apple-darwin note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED] note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [mir_built] building MIR for `b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::::withf` #1 [mir_const] preparing `b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::::withf` for borrow checking #2 [mir_promoted] processing MIR for `b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::::withf` #3 [mir_borrowck] borrow-checking `b5_client::entity_api::__mock_MockEntityApiRepository_EntityApiRepository::__is_offline::::withf` #4 [analysis] running analysis passes on this crate end of query stack error: internal compiler error: re-entrant incremental verify failure, suppressing message ```

lqd commented 1 year ago

Does this reproduce on 1.71.0? There have been a few reports of this incr comp issue during the previous cycle, and they were fixed on 1.71.0 nightlies and beta.