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

Unstable fingerprints for mir_built #112137

Closed
xxchan opened this issue May 31, 2023 · 7 comments
Closed

Unstable fingerprints for mir_built #112137

xxchan opened this issue May 31, 2023 · 7 comments
Labels
A-incr-comp Area: Incremental compilation 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

@xxchan
Copy link
Contributor

xxchan commented May 31, 2023

Duplicate with #106814, #107079, #107665, but I have a reproduction (although not minimized)

Originally posted #84970 (comment) (not sure whether it's better to create a separate issue)

git clone https://github.com/risingwavelabs/risingwave

git checkout 487c4c60c584e1e8d603b0a6d2af4632aa869a47 # this commit updated protobuf
cargo build -p risingwave_pb 

git checkout HEAD~
cargo build -p risingwave_pb  # boom

link to the commit risingwavelabs/risingwave@487c4c6

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (c373194cb 2023-05-24)
binary: rustc
commit-hash: c373194cb6d882dc455a588bcc29c92a96b50252
commit-date: 2023-05-24
host: aarch64-apple-darwin
release: 1.71.0-nightly
LLVM version: 16.0.4

Error output

error: internal compiler error: encountered incremental compilation error with mir_built(risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge::{closure#8}))
Backtrace

error: internal compiler error: encountered incremental compilation error with mir_built(risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge::{closure#8})
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p risingwave_pb` 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(risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge::{closure#8}): Steal { value: RwLock(RefCell { value: Some(Body { basic_blocks: BasicBlocks { basic_blocks: [BasicBlockData { statements: [StorageLive(_3), StorageLive(_4), StorageLive(_5), _5 = move (_1.1: meta::MetaSnapshot), _4 = meta::subscribe_response::Info::Snapshot(move _5)], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_5) -> [return: bb1, unwind: bb8] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_5), _3 = std::option::Option::<meta::subscribe_response::Info>::Some(move _4)], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_4) -> [return: bb2, unwind: bb7] }), is_cleanup: false }, BasicBlockData { statements: [StorageDead(_4)], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#28903), scope: scope[0] }, kind: drop((*(_1.0: &mut std::option::Option<meta::subscribe_response::Info>))) -> [return: bb3, unwind: bb4] }), is_cleanup: false }, BasicBlockData { statements: [(*(_1.0: &mut std::option::Option<meta::subscribe_response::Info>)) = move _3, _0 = const ()], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_3) -> [return: bb5, unwind: bb9] }), is_cleanup: false }, BasicBlockData { statements: [(*(_1.0: &mut std::option::Option<meta::subscribe_response::Info>)) = move _3], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#28903), scope: scope[0] }, kind: goto -> bb7 }), is_cleanup: true }, BasicBlockData { statements: [StorageDead(_3)], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_1) -> [return: bb6, unwind: bb10] }), is_cleanup: false }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:46: 613:46 (#3105), scope: scope[0] }, kind: return }), is_cleanup: false }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_3) -> [return: bb9, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_4) -> [return: bb9, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:45: 613:46 (#3105), scope: scope[0] }, kind: drop(_1) -> [return: bb10, unwind terminate] }), is_cleanup: true }, BasicBlockData { statements: [], terminator: Some(Terminator { source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] }, kind: resume }), is_cleanup: true }], cache: Cache { predecessors: OnceCell(Uninit), switch_sources: OnceCell(Uninit), is_cyclic: OnceCell(Uninit), postorder: OnceCell(Uninit), dominators: OnceCell(Uninit) } }, phase: Built, pass_count: 0, source: MirSource { instance: Item(DefId(0:8602 ~ risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge::{closure#8})), promoted: None }, source_scopes: [SourceScopeData { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), parent_scope: None, inlined: None, inlined_parent_scope: None, local_data: Set(SourceScopeLocalData { lint_root: HirId(DefId(0:8592 ~ risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge).837), safety: Safe }) }], generator: None, local_decls: [LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: (), user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:32 (#3105), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: [closure@src/prost/src/meta.rs:613:32: 613:46], user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: (), user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(Boring), internal: false, ty: std::option::Option<meta::subscribe_response::Info>, user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(AggregateTemp), internal: false, ty: meta::subscribe_response::Info, user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] } }, LocalDecl { mutability: Mut, local_info: Set(AggregateTemp), internal: false, ty: meta::MetaSnapshot, user_ty: None, source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#3105), scope: scope[0] } }], user_type_annotations: [], arg_count: 2, spread_arg: None, var_debug_info: [VarDebugInfo { name: "field", source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#26548), scope: scope[0] }, value: (*(_1.0: &mut std::option::Option<meta::subscribe_response::Info>)), argument_index: None, references: 0 }, VarDebugInfo { name: "owned_value", source_info: SourceInfo { span: src/prost/src/meta.rs:613:32: 613:46 (#26548), scope: scope[0] }, value: (_1.1: meta::MetaSnapshot), argument_index: None, references: 0 }], span: src/prost/src/meta.rs:613:32: 613:46 (#3105), required_consts: [], is_polymorphic: true, injection_phase: None, tainted_by_errors: None }) }) }', /rustc/c373194cb6d882dc455a588bcc29c92a96b50252/compiler/rustc_query_system/src/query/plumbing.rs:735:9
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rustc_query_system::query::plumbing::incremental_verify_ich_failed::<rustc_middle::ty::context::TyCtxt>
   3: rustc_query_system::query::plumbing::incremental_verify_ich::<rustc_middle::ty::context::TyCtxt, rustc_middle::query::erase::Erased<[u8; 8]>>
   4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
   5: rustc_mir_transform::mir_const
   6: rustc_mir_transform::mir_promoted
   7: rustc_borrowck::mir_borrowck
   8: <core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::par_for_each_in<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_interface::passes::analysis::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
   9: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_interface::passes::analysis::{closure#1}::{closure#0}>::{closure#0}>
  10: rustc_interface::passes::analysis
  11: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
  12: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  13: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  14: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
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.71.0-nightly (c373194cb 2023-05-24) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C lto=off -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED] -C link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld

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

query stack during panic:
#0 [mir_built] building MIR for `meta::subscribe_response::<impl at src/prost/src/meta.rs:613:32: 613:46>::merge::{closure#8}`
#1 [mir_const] preparing `meta::subscribe_response::<impl at src/prost/src/meta.rs:613:32: 613:46>::merge::{closure#8}` for borrow checking
#2 [mir_promoted] promoting constants in MIR for `meta::subscribe_response::<impl at src/prost/src/meta.rs:613:32: 613:46>::merge::{closure#8}`
#3 [mir_borrowck] borrow-checking `meta::subscribe_response::<impl at src/prost/src/meta.rs:613:32: 613:46>::merge::{closure#8}`
#4 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 mir_borrowck(risingwave_pb[4467]::meta::subscribe_response::{impl#17}::merge)
end of try_mark_green dep node stack
error: internal compiler error: reentrant incremental verify failure, suppressing message

error: could not compile `risingwave_pb` (lib) due to 2 previous errors

@xxchan xxchan 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 May 31, 2023
@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

@rustbot label +A-incr-comp

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label May 31, 2023
@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

risingwavelabs/risingwave@5013b5e can also reproduce it, but risingwavelabs/risingwave@bad1b0f can't. Although they both updated /proto

@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

regression in 14c54b6

bisect comment here #84970 (comment)

@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

cc @zeegomo @cjgillot do you have any ideas about the issue?

@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

BTW, it seems #106814, #107079, #107665 are not caused by the same issue, because they are earlier than the regression I found.

@Noratrieb
Copy link
Member

does this reproduce on the latest nightly? there was a recent fix for incremental that may be related

@xxchan
Copy link
Contributor Author

xxchan commented May 31, 2023

does this reproduce on the latest nightly? there was a recent fix for incremental that may be related

Thanks. can't reproduce in 2023-05-31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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