Skip to content

ICE while bootstrapping stage0 rustc with incremental #91401

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
jyn514 opened this issue Nov 30, 2021 · 0 comments
Open

ICE while bootstrapping stage0 rustc with incremental #91401

jyn514 opened this issue Nov 30, 2021 · 0 comments
Assignees
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

@jyn514
Copy link
Member

jyn514 commented Nov 30, 2021

thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:492:9

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.57.0-beta.2 (7e4c9eebd 2021-10-22) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z symbol-mangling-version=v0 -Z macro-backtrace -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 -C debug-assertions=on -C incremental -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 --crate-type lib

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:492:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/panicking.rs:100:14
   2: core::panicking::panic_display
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/panicking.rs:64:5
   3: core::option::expect_failed
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/option.rs:1638:5
   4: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_session::cstore::CrateStore for rustc_metadata::creader::CStore>::stable_crate_id_to_crate_num
   5: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
   6: rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::CrateNum>::recover
   7: rustc_query_impl::query_callbacks::crate_hash::force_from_dep_node
   8: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   9: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  10: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  11: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  12: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  14: rustc_query_system::query::plumbing::ensure_must_run
  15: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_borrowck
  16: rustc_data_structures::sync::par_for_each_in
  17: rustc_session::utils::<impl rustc_session::session::Session>::time
  18: rustc_interface::passes::analysis
  19: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  20: rustc_data_structures::stack::ensure_sufficient_stack
  21: rustc_query_system::query::plumbing::try_execute_query
  22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  23: rustc_interface::passes::QueryContext::enter
  24: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  25: rustc_span::with_source_map
  26: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.57.0-beta.2 (7e4c9eebd 2021-10-22) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z symbol-mangling-version=v0 -Z macro-backtrace -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 -C debug-assertions=on -C incremental -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: build failed

Meta

rustc --version --verbose:

note: rustc 1.57.0-beta.2 (7e4c9eebd 2021-10-22) running on x86_64-unknown-linux-gnu

Error output

<output>
Backtrace

stack backtrace:
   0: rust_begin_unwind
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/panicking.rs:100:14
   2: core::panicking::panic_display
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/panicking.rs:64:5
   3: core::option::expect_failed
             at /rustc/7e4c9eebd82e9fa71f74626e5ba4e3494b8aba25/library/core/src/option.rs:1638:5
   4: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_session::cstore::CrateStore for rustc_metadata::creader::CStore>::stable_crate_id_to_crate_num
   5: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
   6: rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::CrateNum>::recover
   7: rustc_query_impl::query_callbacks::crate_hash::force_from_dep_node
   8: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   9: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  10: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  11: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  12: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  14: rustc_query_system::query::plumbing::ensure_must_run
  15: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_borrowck
  16: rustc_data_structures::sync::par_for_each_in
  17: rustc_session::utils::<impl rustc_session::session::Session>::time
  18: rustc_interface::passes::analysis
  19: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  20: rustc_data_structures::stack::ensure_sufficient_stack
  21: rustc_query_system::query::plumbing::try_execute_query
  22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  23: rustc_interface::passes::QueryContext::enter
  24: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  25: rustc_span::with_source_map
  26: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@jyn514 jyn514 added 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. A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. labels Nov 30, 2021
@jyn514 jyn514 changed the title panic while bootstrapping stage0 rustc with incremental ICE while bootstrapping stage0 rustc with incremental Nov 30, 2021
@cjgillot cjgillot self-assigned this Dec 2, 2021
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 24, 2023
Print a backtrace when query forcing fails.

The aim of this PR is to help debugging incremental compilation bugs where query forcing panics.
For instance: rust-lang#90682 rust-lang#90697 rust-lang#90715 rust-lang#90739 rust-lang#91401

These bugs happen when the dep-graph attempts to force a dep-node whose fingerprint does not correspond to an actual DefPathHash. PR rust-lang#91741 attempts to hide this bug.

I still don't know how to reproduce these bugs, so I sadly could not test this debugging device.
RalfJung pushed a commit to RalfJung/miri that referenced this issue Feb 26, 2023
Print a backtrace when query forcing fails.

The aim of this PR is to help debugging incremental compilation bugs where query forcing panics.
For instance: rust-lang/rust#90682 rust-lang/rust#90697 rust-lang/rust#90715 rust-lang/rust#90739 rust-lang/rust#91401

These bugs happen when the dep-graph attempts to force a dep-node whose fingerprint does not correspond to an actual DefPathHash. PR rust-lang/rust#91741 attempts to hide this bug.

I still don't know how to reproduce these bugs, so I sadly could not test this debugging device.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
Print a backtrace when query forcing fails.

The aim of this PR is to help debugging incremental compilation bugs where query forcing panics.
For instance: rust-lang/rust#90682 rust-lang/rust#90697 rust-lang/rust#90715 rust-lang/rust#90739 rust-lang/rust#91401

These bugs happen when the dep-graph attempts to force a dep-node whose fingerprint does not correspond to an actual DefPathHash. PR rust-lang/rust#91741 attempts to hide this bug.

I still don't know how to reproduce these bugs, so I sadly could not test this debugging device.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Print a backtrace when query forcing fails.

The aim of this PR is to help debugging incremental compilation bugs where query forcing panics.
For instance: rust-lang/rust#90682 rust-lang/rust#90697 rust-lang/rust#90715 rust-lang/rust#90739 rust-lang/rust#91401

These bugs happen when the dep-graph attempts to force a dep-node whose fingerprint does not correspond to an actual DefPathHash. PR rust-lang/rust#91741 attempts to hide this bug.

I still don't know how to reproduce these bugs, so I sadly could not test this debugging device.
# for free to join this conversation on GitHub. Already have an account? # 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

Successfully merging a pull request may close this issue.

2 participants