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: "no entry found for key" while building stage0 tools #88488

Closed
yoshuawuyts opened this issue Aug 30, 2021 · 23 comments
Closed

ICE: "no entry found for key" while building stage0 tools #88488

yoshuawuyts opened this issue Aug 30, 2021 · 23 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) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@yoshuawuyts
Copy link
Member

Checked out the latest version of the compiler today to write a patch, but ran into an ICE when doing py check. I haven't changed anything recently, so not sure what's causing this.

Code

Compiling the compiler at commit 13edc17

Meta

rustc --version --verbose:

rustc 1.55.0-beta.1 (739f8f0a8 2021-07-28) running on x86_64-pc-windows-gnu

Error output

thread 'rustc' panicked at 'no entry found for key', compiler\rustc_query_impl\src\on_disk_cache.rs:175:20
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.55.0-beta.1 (739f8f0a8 2021-07-28) running on x86_64-pc-windows-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C llvm-args=-import-instr-limit=10 --crate-type dylib

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

query stack during panic:
#0 [predicates_of] computing predicates of `common::FunctionCx`       
#1 [check_item_well_formed] checking that `abi::comments::add_arg_comment` is well-formed
end of query stack
error: could not compile `rustc_codegen_cranelift`
Backtrace

PS C:\Users\yoshu\Code\rust> py .\x.py check
Updating only changed submodules
Submodules updated in 0.11 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 2.15s
Checking stage0 std artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
    Finished release [optimized] target(s) in 0.59s
Checking stage0 std test/bench/example targets (x86_64-pc-windows-gnu 
-> x86_64-pc-windows-gnu)
    Finished release [optimized] target(s) in 0.59s
Checking stage0 compiler artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle`

warning: `rustc_llvm` (lib) generated 1 warning
warning: `rustc_llvm` (lib test) generated 1 warning (1 duplicate)    
    Finished release [optimized] target(s) in 1.97s
Checking stage0 rustdoc artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
    Finished release [optimized] target(s) in 0.98s
Checking stage0 cranelift artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
    Checking rustc_codegen_cranelift v0.1.0 (C:\Users\yoshu\Code\rust\compiler\rustc_codegen_cranelift)
thread 'rustc' panicked at 'no entry found for key', compiler\rustc_query_impl\src\on_disk_cache.rs:175:20
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.55.0-beta.1 (739f8f0a8 2021-07-28) running on x86_64-pc-windows-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C llvm-args=-import-instr-limit=10 --crate-type dylib

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

query stack during panic:
#0 [predicates_of] computing predicates of `common::FunctionCx`       
#1 [check_item_well_formed] checking that `abi::comments::add_arg_comment` is well-formed
end of query stack
error: could not compile `rustc_codegen_cranelift`

Caused by:
  process didn't exit successfully: `C:\Users\yoshu\Code\rust\build\bootstrap/debug/rustc --crate-name rustc_codegen_cranelift --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type dylib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C metadata=46f7e1b0fd3f3e68 -C extra-filename=-46f7e1b0fd3f3e68 --out-dir C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps --target x86_64-pc-windows-gnu -C incremental=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\incremental -L dependency=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps -L dependency=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\release\deps --extern ar=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libar-008c953fc1022421.rmeta --extern cranelift_codegen=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libcranelift_codegen-e3f012bff9079dc3.rmeta --extern cranelift_frontend=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libcranelift_frontend-70b32e62a9b56945.rmeta --extern cranelift_module=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libcranelift_module-a02560616de272a2.rmeta --extern cranelift_native=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libcranelift_native-69d1bf02ade6427b.rmeta --extern cranelift_object=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libcranelift_object-8c36e952eceda322.rmeta --extern gimli=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libgimli-8c830305f513e434.rmeta --extern indexmap=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libindexmap-509c3c26a3c04416.rmeta --extern 
object=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libobject-b937931e2b43b5fb.rmeta --extern smallvec=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libsmallvec-bf0557f61df3ef35.rmeta --extern target_lexicon=C:\Users\yoshu\Code\rust\build\x86_64-pc-windows-gnu\stage0-codegen\x86_64-pc-windows-gnu\release\deps\libtarget_lexicon-d1e221e5b1c4e96c.rmeta --cfg=bootstrap -Zmacro-backtrace -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo` (exit code: 0x80000003)
Build completed unsuccessfully in 0:00:20

@yoshuawuyts yoshuawuyts 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 Aug 30, 2021
@jyn514 jyn514 changed the title Internal Compiler Error: "no entry found for key" in rustc_codegen_cranelift Internal Compiler Error: "no entry found for key" while bootstrapping rustc_codegen_cranelift Aug 30, 2021
@Aaron1011
Copy link
Member

Aaron1011 commented Aug 30, 2021

It looks like old incremental compilation data is getting reused. I believe that this should be fixed by #86641.

In the meantime, running ./x.py clean should fix this.

@camelid camelid added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-incr-comp Area: Incremental compilation labels Aug 31, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 30, 2022

Duplicate of #76720.

@jyn514
Copy link
Member

jyn514 commented Mar 18, 2023

This is not actually a duplicate. This happens in stage0, not stage1, so it's not related to sharing the version string between different dev builds. It might be the case that we're not clearing the cache when we update the beta compiler, but that will have a different fix and should be tracked separately.

(It happened to me this morning)

Building tool rustdoc (stage0 -> stage1)
   Compiling rustdoc v0.0.0 (/home/jyn/src/rust2/src/librustdoc)
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:639:9
backtrace
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:639:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_display
             at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:147:5
   3: core::panicking::panic_str
             at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:131:5
   4: core::option::expect_failed
             at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/option.rs:2045:5
   5: <rustc_metadata::creader::CStore as rustc_session::cstore::CrateStore>::stable_crate_id_to_crate_num
   6: <rustc_span::span_encoding::Span as rustc_serialize::serialize::Decodable<rustc_query_impl::on_disk_cache::CacheDecoder>>::decode
   7: <[(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)] as rustc_middle::ty::codec::RefDecodable<rustc_query_impl::on_disk_cache::CacheDecoder>>::decode
   8: rustc_query_impl::plumbing::try_load_from_disk::<rustc_middle::ty::generics::GenericPredicates>
   9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::predicates_of, rustc_query_impl::plumbing::QueryCtxt>
  10: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
  11: <rustc_trait_selection::traits::wf::WfPredicates>::compute
  12: rustc_trait_selection::traits::wf::obligations
  13: rustc_traits::implied_outlives_bounds::compute_implied_outlives_bounds
  14: <rustc_infer::infer::InferCtxtBuilder as rustc_trait_selection::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, alloc::vec::Vec<rustc_middle::traits::query::OutlivesBound>, rustc_traits::implied_outlives_bounds::implied_outlives_bounds::{closure#0}>
  15: rustc_traits::implied_outlives_bounds::implied_outlives_bounds
  16: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::implied_outlives_bounds, rustc_query_impl::plumbing::QueryCtxt>
  17: <rustc_middle::ty::ParamEnvAnd<rustc_trait_selection::traits::query::type_op::implied_outlives_bounds::ImpliedOutlivesBounds> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform
  18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_outlives_bounds
  19: <rustc_infer::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core::iter::adapters::flatten::Flatten<core::iter::adapters::map::Map<indexmap::set::IntoIter<rustc_middle::ty::Ty>, <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>>
  20: rustc_trait_selection::traits::misc::type_allowed_to_implement_copy
  21: rustc_hir_analysis::coherence::builtin::check_trait
  22: rustc_hir_analysis::coherence::coherent_trait
  23: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::coherent_trait, rustc_query_impl::plumbing::QueryCtxt>
  24: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::coherent_trait
  25: <rustc_session::session::Session>::track_errors::<rustc_hir_analysis::check_crate::{closure#3}, ()>
  26: rustc_hir_analysis::check_crate
  27: rustc_interface::passes::analysis
  28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  30: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  31: rustc_span::with_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}>
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.69.0-beta.1 (b955c8271 2023-03-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
thread 'rustc' panicked at 'Illegal read of: 48076', /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/compiler/rustc_query_system/src/dep_graph/graph.rs:450:25
stack backtrace:
   0:     0x7feb20b6731a - std::backtrace_rs::backtrace::libunwind::trace::h6afeafcf92b09bcd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7feb20b6731a - std::backtrace_rs::backtrace::trace_unsynchronized::h6f2afab8efd008d2
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7feb20b6731a - std::sys_common::backtrace::_print_fmt::hf6f0f010fea6e3fd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7feb20b6731a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8c4abbc84b2347e3
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7feb20bcab6e - core::fmt::write::h7604b6ac1e51564a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/fmt/mod.rs:1232:17
   5:     0x7feb20b5a1c5 - std::io::Write::write_fmt::h06952c4611dbdea8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/io/mod.rs:1684:15
   6:     0x7feb20b670e5 - std::sys_common::backtrace::_print::h5a8a2578f0a5a262
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7feb20b670e5 - std::sys_common::backtrace::print::h9cd3257ab29a9457
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7feb20b69e5f - std::panicking::default_hook::{{closure}}::h2efc46d4738c4264
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:271:22
   9:     0x7feb20b69b9b - std::panicking::default_hook::hcbff7ff0fc72f592
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:290:9
  10:     0x7feb23dc56b5 - rustc_driver_impl[b2d0c9d39cec3f08]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7feb20b6a69d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc722c46abd4bee52
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:2001:9
  12:     0x7feb20b6a69d - std::panicking::rust_panic_with_hook::h2a4f4becb061dab8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:696:13
  13:     0x7feb20b6a419 - std::panicking::begin_panic_handler::{{closure}}::hfbfd1835b102f703
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:583:13
  14:     0x7feb20b67786 - std::sys_common::backtrace::__rust_end_short_backtrace::hff723b81c54b7ea4
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7feb20b6a122 - rust_begin_unwind
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
  16:     0x7feb20bc6ec3 - core::panicking::panic_fmt::hf07572e75eddd3b0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
  17:     0x7feb21e1f4d7 - <rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind as rustc_query_system[2a4cc30c318fa14d]::dep_graph::DepKind>::read_deps::<<rustc_query_system[2a4cc30c318fa14d]::dep_graph::graph::DepGraph<rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind>>::read_index::{closure#0}>
  18:     0x7feb21f438e3 - <rustc_middle[5904c30a6dccf498]::ty::print::pretty::FmtPrinter>::new
  19:     0x7feb22bd9594 - <rustc_middle[5904c30a6dccf498]::ty::context::TyCtxt>::def_path_str_with_substs
  20:     0x7feb24342ae7 - rustc_middle[5904c30a6dccf498]::query::descs::predicates_defined_on
  21:     0x7feb247716c4 - rustc_query_impl[f5702d406d4b30ad]::plumbing::create_query_frame::<rustc_span[5cba7a76607c212]::def_id::DefId>
  22:     0x7feb247dc316 - <rustc_query_impl[f5702d406d4b30ad]::query_structs::predicates_of::{closure#0}::{closure#0} as core[b162ae3dcbce6770]::ops::function::FnOnce<(rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt, rustc_span[5cba7a76607c212]::def_id::DefId)>>::call_once
  23:     0x7feb24670620 - <rustc_query_system[2a4cc30c318fa14d]::query::plumbing::QueryState<rustc_span[5cba7a76607c212]::def_id::DefId, rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind>>::try_collect_active_jobs::<rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  24:     0x7feb23583252 - <rustc_query_impl[f5702d406d4b30ad]::Queries>::try_collect_active_jobs
  25:     0x7feb247848c8 - rustc_query_system[2a4cc30c318fa14d]::query::job::print_query_stack::<rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  26:     0x7feb24181db2 - rustc_interface[4988ae148fb02a7]::interface::try_print_query_stack
  27:     0x7feb23dc7a8e - rustc_driver_impl[b2d0c9d39cec3f08]::report_ice
  28:     0x7feb23dc56fc - rustc_driver_impl[b2d0c9d39cec3f08]::DEFAULT_HOOK::{closure#0}::{closure#0}
  29:     0x7feb20b6a69d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc722c46abd4bee52
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:2001:9
  30:     0x7feb20b6a69d - std::panicking::rust_panic_with_hook::h2a4f4becb061dab8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:696:13
  31:     0x7feb20b6a419 - std::panicking::begin_panic_handler::{{closure}}::hfbfd1835b102f703
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:583:13
  32:     0x7feb20b67786 - std::sys_common::backtrace::__rust_end_short_backtrace::hff723b81c54b7ea4
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:150:18
  33:     0x7feb20b6a122 - rust_begin_unwind
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
  34:     0x7feb20bc6ec3 - core::panicking::panic_fmt::hf07572e75eddd3b0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
  35:     0x7feb20bc7031 - core::panicking::panic_display::h8e1404409969f9d1
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:147:5
  36:     0x7feb20bc6fdb - core::panicking::panic_str::hf8d20f13eebdbd01
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:131:5
  37:     0x7feb20bc6c46 - core::option::expect_failed::h41323982955abec7
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/option.rs:2045:5
  38:     0x7feb2362a3bc - <rustc_metadata[d8e59722a835656e]::creader::CStore as rustc_session[7ad75fa329ac590f]::cstore::CrateStore>::stable_crate_id_to_crate_num
  39:     0x7feb222a8f02 - <rustc_span[5cba7a76607c212]::span_encoding::Span as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  40:     0x7feb223b3180 - <[(rustc_middle[5904c30a6dccf498]::ty::Predicate, rustc_span[5cba7a76607c212]::span_encoding::Span)] as rustc_middle[5904c30a6dccf498]::ty::codec::RefDecodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  41:     0x7feb22096d7a - rustc_query_impl[f5702d406d4b30ad]::plumbing::try_load_from_disk::<rustc_middle[5904c30a6dccf498]::ty::generics::GenericPredicates>
  42:     0x7feb22aaa432 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::predicates_of, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  43:     0x7feb22aa8583 - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::predicates_of
  44:     0x7feb224ae65a - <rustc_trait_selection[50b3ba705be25864]::traits::wf::WfPredicates>::compute
  45:     0x7feb224a4981 - rustc_trait_selection[50b3ba705be25864]::traits::wf::obligations
  46:     0x7feb22531109 - rustc_traits[85830f365481b2ff]::implied_outlives_bounds::compute_implied_outlives_bounds
  47:     0x7feb22530610 - <rustc_infer[9e89ecae57d94074]::infer::InferCtxtBuilder as rustc_trait_selection[50b3ba705be25864]::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::<rustc_middle[5904c30a6dccf498]::ty::ParamEnvAnd<rustc_middle[5904c30a6dccf498]::ty::Ty>, alloc[19bf5bcf77274cd1]::vec::Vec<rustc_middle[5904c30a6dccf498]::traits::query::OutlivesBound>, rustc_traits[85830f365481b2ff]::implied_outlives_bounds::implied_outlives_bounds::{closure#0}>
  48:     0x7feb2252ffd1 - rustc_traits[85830f365481b2ff]::implied_outlives_bounds::implied_outlives_bounds
  49:     0x7feb22f9c48c - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::implied_outlives_bounds, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  50:     0x7feb225a09d7 - <rustc_middle[5904c30a6dccf498]::ty::ParamEnvAnd<rustc_trait_selection[50b3ba705be25864]::traits::query::type_op::implied_outlives_bounds::ImpliedOutlivesBounds> as rustc_trait_selection[50b3ba705be25864]::traits::query::type_op::TypeOp>::fully_perform
  51:     0x7feb225a0287 - <rustc_infer[9e89ecae57d94074]::infer::InferCtxt as rustc_trait_selection[50b3ba705be25864]::traits::outlives_bounds::InferCtxtExt>::implied_outlives_bounds
  52:     0x7feb22da4854 - <rustc_infer[9e89ecae57d94074]::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core[b162ae3dcbce6770]::iter::adapters::flatten::Flatten<core[b162ae3dcbce6770]::iter::adapters::map::Map<indexmap[a0edb2780134eb61]::set::IntoIter<rustc_middle[5904c30a6dccf498]::ty::Ty>, <rustc_infer[9e89ecae57d94074]::infer::InferCtxt as rustc_trait_selection[50b3ba705be25864]::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>>
  53:     0x7feb22da3887 - rustc_trait_selection[50b3ba705be25864]::traits::misc::type_allowed_to_implement_copy
  54:     0x7feb232387bd - rustc_hir_analysis[d0511122a2951bb0]::coherence::builtin::check_trait
  55:     0x7feb23237004 - rustc_hir_analysis[d0511122a2951bb0]::coherence::coherent_trait
  56:     0x7feb233e4a47 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::coherent_trait, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  57:     0x7feb233e4364 - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::coherent_trait
  58:     0x7feb22184d25 - <rustc_session[7ad75fa329ac590f]::session::Session>::track_errors::<rustc_hir_analysis[d0511122a2951bb0]::check_crate::{closure#3}, ()>
  59:     0x7feb2218122f - rustc_hir_analysis[d0511122a2951bb0]::check_crate
  60:     0x7feb22177212 - rustc_interface[4988ae148fb02a7]::passes::analysis
  61:     0x7feb23628fb8 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::analysis, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  62:     0x7feb23628a8f - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::analysis
  63:     0x7feb2344d736 - <rustc_middle[5904c30a6dccf498]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  64:     0x7feb23028958 - rustc_span[5cba7a76607c212]::with_source_map::<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  65:     0x7feb2301ffcc - std[7f3793225a10bff4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  66:     0x7feb2301f9fa - <<std[7f3793225a10bff4]::thread::Builder>::spawn_unchecked_<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#1} as core[b162ae3dcbce6770]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  67:     0x7feb20b74593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h168eb1356e410ac7
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  68:     0x7feb20b74593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc48e839c56707dd0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  69:     0x7feb20b74593 - std::sys::unix::thread::Thread::new::thread_start::hdf98ced2fabec86a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys/unix/thread.rs:108:17
  70:     0x7feb20894b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  71:     0x7feb20926a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  72:                0x0 - <unknown>

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.69.0-beta.1 (b955c8271 2023-03-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
thread panicked while processing panic. aborting.
rustc exited with signal: 6 (SIGABRT) (core dumped)
error: could not compile `rustdoc`

Caused by:
  process didn't exit successfully: `/home/jyn/src/rust2/build/bootstrap/debug/rustc --crate-name rustdoc --edition=2021 src/librustdoc/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=120 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Zunstable-options --check-cfg 'values(feature, "jemalloc")' --check-cfg 'names()' --check-cfg 'values()' -C metadata=3cb46ca83be16bef -C extra-filename=-3cb46ca83be16bef --out-dir /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps --extern arrayvec=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libarrayvec-5e9627a3109f0d7e.rmeta --extern askama=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libaskama-8b002f7060c34d88.rmeta --extern itertools=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-5bf35759fe845bc7.rmeta --extern minifier=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libminifier-750c0ec807f93480.rmeta --extern once_cell=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libonce_cell-f442e0474c4f356c.rmeta --extern regex=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libregex-b482e273c41bd4d4.rmeta --extern rustdoc_json_types=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librustdoc_json_types-d0cbc30edfc92ac3.rmeta --extern serde=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libserde-95319950f910f65b.rmeta --extern serde_json=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libserde_json-72a654be3d4c271d.rmeta --extern smallvec=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libsmallvec-8c6a2634519a9954.rmeta --extern tempfile=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtempfile-2009f02edece3d02.rmeta --extern threadpool=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libthreadpool-4baa3a0e7ee4df2e.rmeta --extern tracing=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtracing-444062ff7940d597.rmeta --extern tracing_subscriber=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtracing_subscriber-6104546c150854a4.rmeta --extern tracing_tree=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtracing_tree-a5e5396dd9308678.rmeta --cfg=bootstrap -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' '--check-cfg=values(emulate_second_only_system)' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo` (exit status: 254)

@jyn514 jyn514 reopened this Mar 18, 2023
@jyn514 jyn514 changed the title Internal Compiler Error: "no entry found for key" while bootstrapping rustc_codegen_cranelift ICE: "no entry found for key" while bootstrapping tools Mar 18, 2023
@jyn514 jyn514 changed the title ICE: "no entry found for key" while bootstrapping tools ICE: "no entry found for key" while building stage0 tools Mar 18, 2023
@jyn514
Copy link
Member

jyn514 commented Mar 18, 2023

The strange thing to me is that we shouldn't need to clear the stage0 cache - beta should just be ignoring incremental artifacts that don't match the version hash. @cjgillot @michaelwoerister do you know what could be going on here?

@jyn514
Copy link
Member

jyn514 commented Mar 18, 2023

I do think this is a purely incremental bug because rm -r build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/incremental/ fixed the issue, I didn't need to clear any .rmeta files.

@michaelwoerister
Copy link
Member

@jyn514, it looks you are able to reproduce this with a current toolchain. Can you provide some instructions on how to trigger the ICE?

@jyn514
Copy link
Member

jyn514 commented Mar 21, 2023

@michaelwoerister unfortunately I deleted the directory and didn't record the steps to reproduce the error :( but @BoxyUwU managed to reproduce a similar error by checking out the first commit after the 1.70 version bump, running x build rustdoc, then checking out the latest commit and rebuilding - maybe that will work here?

@michaelwoerister
Copy link
Member

Thanks, @jyn514, I'll give that a try.

@jyn514
Copy link
Member

jyn514 commented Mar 25, 2023

@michaelwoerister I ran into this again today. Here are the replication steps:

rm -rf build
echo 'profile = "compiler"
changelog-seen = 2

[rust]
codegen-backends = ["cranelift"]' > config.toml
git checkout 9a24e2fee95 # might need to fetch from my remote: https://github.com/jyn514/rust/commit/9a24e2fee959fa9a7c3493489dba0223bfbc8928
x build --stage 0 rustc_codegen_cranelift
git checkout 2d429f3064cb67710fe64dee293329089871d92b
x build --stage 0 rustc_codegen_cranelift

@jyn514
Copy link
Member

jyn514 commented Mar 25, 2023

... apparently that replicated the error the very first time I did it and then never again 🤦

maybe the second commit was jyn514@a67cb7e?

@jyn514 jyn514 closed this as completed Mar 25, 2023
@jyn514 jyn514 reopened this Mar 25, 2023
@jyn514
Copy link
Member

jyn514 commented Mar 25, 2023

ok, this actually replicates it:

rm -rf build/host/stage0-std
echo 'profile = "library"' > config.toml
git checkout 13afbdaa0655dda23d7129e59ac48f1ec88b2084
x b --stage 0 core
git checkout 2d429f3064c
x b --stage 0 core
backtrace
Building {core} stage0 library artifacts (x86_64-unknown-linux-gnu) 
   Compiling core v0.0.0 (/home/jyn/src/rust3/library/core)
thread 'rustc' panicked at 'index out of bounds: the len is 78 but the index is 144', compiler/rustc_query_impl/src/on_disk_cache.rs:717:40
stack backtrace:
   0:     0x7f9ba582231a - std::backtrace_rs::backtrace::libunwind::trace::h6afeafcf92b09bcd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f9ba582231a - std::backtrace_rs::backtrace::trace_unsynchronized::h6f2afab8efd008d2
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9ba582231a - std::sys_common::backtrace::_print_fmt::hf6f0f010fea6e3fd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f9ba582231a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8c4abbc84b2347e3
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f9ba5885b6e - core::fmt::write::h7604b6ac1e51564a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f9ba58151c5 - std::io::Write::write_fmt::h06952c4611dbdea8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/io/mod.rs:1684:15
   6:     0x7f9ba58220e5 - std::sys_common::backtrace::_print::h5a8a2578f0a5a262
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f9ba58220e5 - std::sys_common::backtrace::print::h9cd3257ab29a9457
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f9ba5824e5f - std::panicking::default_hook::{{closure}}::h2efc46d4738c4264
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:271:22
   9:     0x7f9ba5824b9b - std::panicking::default_hook::hcbff7ff0fc72f592
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:290:9
  10:     0x7f9ba45c56b5 - rustc_driver_impl[b2d0c9d39cec3f08]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f9ba582569d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc722c46abd4bee52
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:2001:9
  12:     0x7f9ba582569d - std::panicking::rust_panic_with_hook::h2a4f4becb061dab8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:696:13
  13:     0x7f9ba5825419 - std::panicking::begin_panic_handler::{{closure}}::hfbfd1835b102f703
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:583:13
  14:     0x7f9ba5822786 - std::sys_common::backtrace::__rust_end_short_backtrace::hff723b81c54b7ea4
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7f9ba5825122 - rust_begin_unwind
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
  16:     0x7f9ba5881ec3 - core::panicking::panic_fmt::hf07572e75eddd3b0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
  17:     0x7f9ba58820b2 - core::panicking::panic_bounds_check::heb764f164d16c0f3
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:159:5
  18:     0x7f9ba2aa968a - <rustc_span[5cba7a76607c212]::span_encoding::Span as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  19:     0x7f9ba4fd738d - <rustc_span[5cba7a76607c212]::hygiene::ExpnData as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  20:     0x7f9ba4f546da - <rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder as rustc_type_ir[99160ce57ac15fd9]::codec::TyDecoder>::with_position::<<rustc_span[5cba7a76607c212]::hygiene::ExpnId as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode::{closure#1}, rustc_span[5cba7a76607c212]::hygiene::ExpnData>
  21:     0x7f9ba2aac00d - <rustc_span[5cba7a76607c212]::hygiene::SyntaxContextData as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  22:     0x7f9ba2aa85dc - <rustc_span[5cba7a76607c212]::span_encoding::Span as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  23:     0x7f9ba31812b0 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::def_span, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  24:     0x7f9ba2c2f977 - rustc_ty_utils[2fe753b497c67f71]::ty::param_env
  25:     0x7f9ba2c2d8c6 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::param_env, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  26:     0x7f9ba2c2cb60 - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::param_env
  27:     0x7f9ba2c45cce - rustc_mir_build[f38372ded6a67f80]::thir::pattern::check_match::check_match
  28:     0x7f9ba2c44cfc - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::check_match, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  29:     0x7f9ba3cf15d6 - rustc_data_structures[f96f114103bf97c3]::sync::par_for_each_in::<&[rustc_span[5cba7a76607c212]::def_id::LocalDefId], <rustc_middle[5904c30a6dccf498]::hir::map::Map>::par_body_owners<rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}::{closure#0}::{closure#0}::{closure#0}>::{closure#0}>
  30:     0x7f9ba3cf119e - <rustc_session[7ad75fa329ac590f]::session::Session>::time::<(), rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}::{closure#0}::{closure#0}>
  31:     0x7f9ba29776ee - <rustc_session[7ad75fa329ac590f]::session::Session>::time::<(), rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}>
  32:     0x7f9ba2977239 - rustc_interface[4988ae148fb02a7]::passes::analysis
  33:     0x7f9ba3e28fb8 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::analysis, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  34:     0x7f9ba3e28a8f - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::analysis
  35:     0x7f9ba3c4d736 - <rustc_middle[5904c30a6dccf498]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  36:     0x7f9ba3828958 - rustc_span[5cba7a76607c212]::with_source_map::<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  37:     0x7f9ba381ffcc - std[7f3793225a10bff4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  38:     0x7f9ba381f9fa - <<std[7f3793225a10bff4]::thread::Builder>::spawn_unchecked_<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#1} as core[b162ae3dcbce6770]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7f9ba582f593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h168eb1356e410ac7
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  40:     0x7f9ba582f593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc48e839c56707dd0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  41:     0x7f9ba582f593 - std::sys::unix::thread::Thread::new::thread_start::hdf98ced2fabec86a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7f9ba1094b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  43:     0x7f9ba1126a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  44:                0x0 - <unknown>

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.69.0-beta.1 (b955c8271 2023-03-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C lto=off -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked

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

query stack during panic:
thread 'rustc' panicked at 'Illegal read of: 346469', /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/compiler/rustc_query_system/src/dep_graph/graph.rs:450:25
stack backtrace:
   0:     0x7f9ba582231a - std::backtrace_rs::backtrace::libunwind::trace::h6afeafcf92b09bcd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f9ba582231a - std::backtrace_rs::backtrace::trace_unsynchronized::h6f2afab8efd008d2
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9ba582231a - std::sys_common::backtrace::_print_fmt::hf6f0f010fea6e3fd
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f9ba582231a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8c4abbc84b2347e3
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f9ba5885b6e - core::fmt::write::h7604b6ac1e51564a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f9ba58151c5 - std::io::Write::write_fmt::h06952c4611dbdea8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/io/mod.rs:1684:15
   6:     0x7f9ba58220e5 - std::sys_common::backtrace::_print::h5a8a2578f0a5a262
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f9ba58220e5 - std::sys_common::backtrace::print::h9cd3257ab29a9457
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f9ba5824e5f - std::panicking::default_hook::{{closure}}::h2efc46d4738c4264
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:271:22
   9:     0x7f9ba5824b9b - std::panicking::default_hook::hcbff7ff0fc72f592
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:290:9
  10:     0x7f9ba45c56b5 - rustc_driver_impl[b2d0c9d39cec3f08]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f9ba582569d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc722c46abd4bee52
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:2001:9
  12:     0x7f9ba582569d - std::panicking::rust_panic_with_hook::h2a4f4becb061dab8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:696:13
  13:     0x7f9ba5825419 - std::panicking::begin_panic_handler::{{closure}}::hfbfd1835b102f703
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:583:13
  14:     0x7f9ba5822786 - std::sys_common::backtrace::__rust_end_short_backtrace::hff723b81c54b7ea4
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7f9ba5825122 - rust_begin_unwind
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
  16:     0x7f9ba5881ec3 - core::panicking::panic_fmt::hf07572e75eddd3b0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
  17:     0x7f9ba261f4d7 - <rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind as rustc_query_system[2a4cc30c318fa14d]::dep_graph::DepKind>::read_deps::<<rustc_query_system[2a4cc30c318fa14d]::dep_graph::graph::DepGraph<rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind>>::read_index::{closure#0}>
  18:     0x7f9ba27438e3 - <rustc_middle[5904c30a6dccf498]::ty::print::pretty::FmtPrinter>::new
  19:     0x7f9ba33d9594 - <rustc_middle[5904c30a6dccf498]::ty::context::TyCtxt>::def_path_str_with_substs
  20:     0x7f9ba4b47ca7 - rustc_middle[5904c30a6dccf498]::query::descs::check_match
  21:     0x7f9ba4f716c4 - rustc_query_impl[f5702d406d4b30ad]::plumbing::create_query_frame::<rustc_span[5cba7a76607c212]::def_id::DefId>
  22:     0x7f9ba4fdbbe9 - <rustc_query_impl[f5702d406d4b30ad]::query_structs::check_match::{closure#0}::{closure#0} as core[b162ae3dcbce6770]::ops::function::FnOnce<(rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt, rustc_span[5cba7a76607c212]::def_id::DefId)>>::call_once
  23:     0x7f9ba4e70620 - <rustc_query_system[2a4cc30c318fa14d]::query::plumbing::QueryState<rustc_span[5cba7a76607c212]::def_id::DefId, rustc_middle[5904c30a6dccf498]::dep_graph::dep_node::DepKind>>::try_collect_active_jobs::<rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  24:     0x7f9ba3d83252 - <rustc_query_impl[f5702d406d4b30ad]::Queries>::try_collect_active_jobs
  25:     0x7f9ba4f848c8 - rustc_query_system[2a4cc30c318fa14d]::query::job::print_query_stack::<rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  26:     0x7f9ba4981db2 - rustc_interface[4988ae148fb02a7]::interface::try_print_query_stack
  27:     0x7f9ba45c7a8e - rustc_driver_impl[b2d0c9d39cec3f08]::report_ice
  28:     0x7f9ba45c56fc - rustc_driver_impl[b2d0c9d39cec3f08]::DEFAULT_HOOK::{closure#0}::{closure#0}
  29:     0x7f9ba582569d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc722c46abd4bee52
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:2001:9
  30:     0x7f9ba582569d - std::panicking::rust_panic_with_hook::h2a4f4becb061dab8
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:696:13
  31:     0x7f9ba5825419 - std::panicking::begin_panic_handler::{{closure}}::hfbfd1835b102f703
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:583:13
  32:     0x7f9ba5822786 - std::sys_common::backtrace::__rust_end_short_backtrace::hff723b81c54b7ea4
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys_common/backtrace.rs:150:18
  33:     0x7f9ba5825122 - rust_begin_unwind
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/panicking.rs:579:5
  34:     0x7f9ba5881ec3 - core::panicking::panic_fmt::hf07572e75eddd3b0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:64:14
  35:     0x7f9ba58820b2 - core::panicking::panic_bounds_check::heb764f164d16c0f3
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/core/src/panicking.rs:159:5
  36:     0x7f9ba2aa968a - <rustc_span[5cba7a76607c212]::span_encoding::Span as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  37:     0x7f9ba4fd738d - <rustc_span[5cba7a76607c212]::hygiene::ExpnData as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  38:     0x7f9ba4f546da - <rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder as rustc_type_ir[99160ce57ac15fd9]::codec::TyDecoder>::with_position::<<rustc_span[5cba7a76607c212]::hygiene::ExpnId as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode::{closure#1}, rustc_span[5cba7a76607c212]::hygiene::ExpnData>
  39:     0x7f9ba2aac00d - <rustc_span[5cba7a76607c212]::hygiene::SyntaxContextData as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  40:     0x7f9ba2aa85dc - <rustc_span[5cba7a76607c212]::span_encoding::Span as rustc_serialize[3fbcda3f3a7af78b]::serialize::Decodable<rustc_query_impl[f5702d406d4b30ad]::on_disk_cache::CacheDecoder>>::decode
  41:     0x7f9ba31812b0 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::def_span, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  42:     0x7f9ba2c2f977 - rustc_ty_utils[2fe753b497c67f71]::ty::param_env
  43:     0x7f9ba2c2d8c6 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::param_env, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  44:     0x7f9ba2c2cb60 - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::param_env
  45:     0x7f9ba2c45cce - rustc_mir_build[f38372ded6a67f80]::thir::pattern::check_match::check_match
  46:     0x7f9ba2c44cfc - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::check_match, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  47:     0x7f9ba3cf15d6 - rustc_data_structures[f96f114103bf97c3]::sync::par_for_each_in::<&[rustc_span[5cba7a76607c212]::def_id::LocalDefId], <rustc_middle[5904c30a6dccf498]::hir::map::Map>::par_body_owners<rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}::{closure#0}::{closure#0}::{closure#0}>::{closure#0}>
  48:     0x7f9ba3cf119e - <rustc_session[7ad75fa329ac590f]::session::Session>::time::<(), rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}::{closure#0}::{closure#0}>
  49:     0x7f9ba29776ee - <rustc_session[7ad75fa329ac590f]::session::Session>::time::<(), rustc_interface[4988ae148fb02a7]::passes::analysis::{closure#1}>
  50:     0x7f9ba2977239 - rustc_interface[4988ae148fb02a7]::passes::analysis
  51:     0x7f9ba3e28fb8 - rustc_query_system[2a4cc30c318fa14d]::query::plumbing::try_execute_query::<rustc_query_impl[f5702d406d4b30ad]::queries::analysis, rustc_query_impl[f5702d406d4b30ad]::plumbing::QueryCtxt>
  52:     0x7f9ba3e28a8f - <rustc_query_impl[f5702d406d4b30ad]::Queries as rustc_middle[5904c30a6dccf498]::ty::query::QueryEngine>::analysis
  53:     0x7f9ba3c4d736 - <rustc_middle[5904c30a6dccf498]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  54:     0x7f9ba3828958 - rustc_span[5cba7a76607c212]::with_source_map::<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  55:     0x7f9ba381ffcc - std[7f3793225a10bff4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>
  56:     0x7f9ba381f9fa - <<std[7f3793225a10bff4]::thread::Builder>::spawn_unchecked_<rustc_interface[4988ae148fb02a7]::util::run_in_thread_pool_with_globals<rustc_interface[4988ae148fb02a7]::interface::run_compiler<core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>, rustc_driver_impl[b2d0c9d39cec3f08]::run_compiler::{closure#1}>::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b162ae3dcbce6770]::result::Result<(), rustc_span[5cba7a76607c212]::ErrorGuaranteed>>::{closure#1} as core[b162ae3dcbce6770]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  57:     0x7f9ba582f593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h168eb1356e410ac7
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  58:     0x7f9ba582f593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc48e839c56707dd0
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/alloc/src/boxed.rs:1987:9
  59:     0x7f9ba582f593 - std::sys::unix::thread::Thread::new::thread_start::hdf98ced2fabec86a
                               at /rustc/b955c8271da80a1af8a1d54c4e1bbdaf51b032e9/library/std/src/sys/unix/thread.rs:108:17
  60:     0x7f9ba1094b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  61:     0x7f9ba1126a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  62:                0x0 - <unknown>

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.69.0-beta.1 (b955c8271 2023-03-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C lto=off -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked

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

query stack during panic:
thread panicked while processing panic. aborting.
rustc exited with signal: 6 (SIGABRT) (core dumped)
error: could not compile `core`

Caused by:
  process didn't exit successfully: `/home/jyn/src/rust3/build/bootstrap/debug/rustc --crate-name core --edition=2021 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=129 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=999232a2b2133b8a -C extra-filename=-999232a2b2133b8a --out-dir /home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/stage0-std/release/deps --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Clto=off '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo` (exit status: 254)
Build completed unsuccessfully in 0:00:08

@jyn514
Copy link
Member

jyn514 commented Mar 26, 2023

#108481 looks related.

@michaelwoerister
Copy link
Member

ok, this actually replicates it:

Nice! I reserved some time to take a look at this later this week.

@michaelwoerister
Copy link
Member

Update: #108481 might indeed be the same issue and I spent most of yesterday finding out more about that. The issue seems to be caused by (sometimes) not recording dependency edges for query results that are directly fed.

However, that means that #108481 is not the same as the original issue reported by Yosh because query feeding was only implemented a few months ago. It's unclear if the original issue still exists.

@jyn514
Copy link
Member

jyn514 commented Mar 29, 2023

The issue seems to be caused by (sometimes) not recording dependency edges for query results that are directly fed.

cc @oli-obk

bors added a commit to rust-lang-ci/rust that referenced this issue Apr 12, 2023
…ways, r=cjgillot

incr.comp.: Make sure dependencies are recorded when feeding queries during eval-always queries.

This PR makes sure we don't drop dependency edges when feeding queries during an eval-always query.

Background: During eval-always queries, no dependencies are recorded because the system knows to unconditionally re-evaluate them regardless of any actual dependencies. This works fine for these queries themselves but leads to a problem when feeding other queries: When queries are fed, we set up their dependency edges by copying the current set of dependencies of the feeding query. But because this set is empty for eval-always queries, we record no edges at all -- which has the effect that the fed query instances always look "green" to the system, although they should always be "red".

The fix is to explicitly add a dependency on the artificial "always red" dep-node when feeding during eval-always queries.

Fixes rust-lang#108481
Maybe also fixes issue rust-lang#88488.

cc `@jyn514`

r? `@cjgillot` or `@oli-obk`
RalfJung pushed a commit to RalfJung/miri that referenced this issue Apr 14, 2023
…jgillot

incr.comp.: Make sure dependencies are recorded when feeding queries during eval-always queries.

This PR makes sure we don't drop dependency edges when feeding queries during an eval-always query.

Background: During eval-always queries, no dependencies are recorded because the system knows to unconditionally re-evaluate them regardless of any actual dependencies. This works fine for these queries themselves but leads to a problem when feeding other queries: When queries are fed, we set up their dependency edges by copying the current set of dependencies of the feeding query. But because this set is empty for eval-always queries, we record no edges at all -- which has the effect that the fed query instances always look "green" to the system, although they should always be "red".

The fix is to explicitly add a dependency on the artificial "always red" dep-node when feeding during eval-always queries.

Fixes rust-lang/rust#108481
Maybe also fixes issue rust-lang/rust#88488.

cc `@jyn514`

r? `@cjgillot` or `@oli-obk`
@oli-obk oli-obk removed their assignment Apr 20, 2023
@jyn514
Copy link
Member

jyn514 commented Jun 5, 2023

someone on discord ran into a similar bug today:

error: internal compiler error: compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:595:32: uninterned StableCrateId: StableCrateId(11571398144161577719)

   7: <rustc_metadata::creader::CStore as rustc_session::cstore::CrateStore>::stable_crate_id_to_crate_num
   8: <rustc_span::span_encoding::Span as rustc_serialize::serialize::Decodable<rustc_middle::query::on_disk_cache::CacheDecoder>>::decode
   9: <rustc_middle::ty::generics::GenericPredicates as rustc_serialize::serialize::Decodable<rustc_middle::query::on_disk_cache::CacheDecoder>>::decode
  10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 24]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  11: <rustc_trait_selection::traits::wf::WfPredicates>::compute
  12: rustc_trait_selection::traits::wf::obligations
  13: rustc_trait_selection::traits::query::type_op::implied_outlives_bounds::compute_implied_outlives_bounds_inner
  14: <rustc_infer::infer::InferCtxtBuilder as rustc_trait_selection::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, alloc::vec::Vec<rustc_middle::traits::query::OutlivesBound>, rustc_traits::implied_outlives_bounds::implied_outlives_bounds::{closure#0}>
  15: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_outlives_bounds
  16: <rustc_infer::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core::iter::adapters::flatten::FlatMap<indexmap::set::IntoIter<rustc_middle::ty::Ty>, alloc::vec::Vec<rustc_middle::traits::query::OutlivesBound>, <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>
  17: rustc_trait_selection::traits::misc::all_fields_implement_trait
  18: rustc_hir_analysis::coherence::coherent_trait
  19: <rustc_session::session::Session>::track_errors::<rustc_hir_analysis::check_crate::{closure#3}, ()>
  20: rustc_hir_analysis::check_crate

note: rustc 1.71.0-beta.1 (eff24c06d 2023-05-29) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z unstable-options -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
thread panicked while processing panic. aborting.
rustc exited with signal: 6 (SIGABRT) (core dumped)
error: could not compile `rustdoc` (lib)

@jyn514
Copy link
Member

jyn514 commented Jul 2, 2023

ran into the same thing myself

Checking stage0 rustdoc artifacts (x86_64-unknown-linux-gnu)
    Checking rustdoc v0.0.0 (/home/jyn/src/rust/src/librustdoc)
error: internal compiler error: compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:595:32: uninterned StableCrateId: StableCrateId(10044191383301396090)

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/compiler/rustc_errors/src/lib.rs:1651:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::HandlerInner>::bug::<alloc::string::String>
   2: <rustc_errors::Handler>::bug::<alloc::string::String>
   3: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   5: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   6: rustc_middle::util::bug::bug_fmt
   7: <rustc_metadata::creader::CStore as rustc_session::cstore::CrateStore>::stable_crate_id_to_crate_num
   8: <rustc_span::span_encoding::Span as rustc_serialize::serialize::Decodable<rustc_middle::query::on_disk_cache::CacheDecoder>>::decode
   9: <rustc_middle::ty::generics::GenericPredicates as rustc_serialize::serialize::Decodable<rustc_middle::query::on_disk_cache::CacheDecoder>>::decode
  10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 24]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  11: <rustc_trait_selection::traits::wf::WfPredicates>::compute
  12: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
  13: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
  14: <rustc_trait_selection::traits::engine::ObligationCtxt>::select_all_or_error
  15: rustc_hir_analysis::check::wfcheck::check_item_fn
  16: rustc_hir_analysis::check::wfcheck::check_well_formed
  17: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  18: <rustc_session::session::Session>::track_errors::<rustc_hir_analysis::check_crate::{closure#5}, ()>
  19: rustc_hir_analysis::check_crate
  20: rustc_interface::passes::analysis
  21: <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}>
  22: <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>>
  23: 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}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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-beta.1 (eff24c06d 2023-05-29) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z unstable-options -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
thread panicked while processing panic. aborting.
rustc exited with signal: 6 (SIGABRT) (core dumped)

@jyn514
Copy link
Member

jyn514 commented Jul 2, 2023

cc @Mark-Simulacrum this is likely a real regression that's going to end up in 1.71 - unclear which PR caused it so probably not much to do at this point but thought you'd want to know since the release is going out soon

@Mark-Simulacrum Mark-Simulacrum added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Jul 2, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 2, 2023
@Mark-Simulacrum Mark-Simulacrum added this to the 1.71.0 milestone Jul 2, 2023
@Mark-Simulacrum
Copy link
Member

Tagging for prioritization. It's not clear to me how impactful this is; I know I've seen and heard about other(?) incremental problems in 1.70 as well -- I think there's been some issues filed. Unfortunately I don't think we've found solutions that eliminate the problem at the root so just need to hope we don't introduce new ones :/

@hameerabbasi
Copy link
Contributor

michaelwoerister unfortunately I deleted the directory and didn't record the steps to reproduce the error :( but BoxyUwU managed to reproduce a similar error by checking out the first commit after the 1.70 version bump, running x build rustdoc, then checking out the latest commit and rebuilding - maybe that will work here?

I wrote a script based on this statement; intending to run a git bisect --no-checkout, but it didn't reproduce for me on macOS x86_64.

#!/usr/bin/env bash

set -e

./x.py clean
git checkout $(git rev-list 1.70.0..master -n 1)
./x.py build --stage 1 rustdoc
git checkout $BISECT_HEAD
./x.py build --stage 1 rustdoc

@jyn514
Copy link
Member

jyn514 commented Jul 2, 2023

yes, sorry - there are several issues mixed into the history here and not all of them are the same. the one that's going to land in 1.71 is #112700, which no one has been able to reliably reproduce. the one boxy ran into was likely fixed by #109935 and no longer reproduces on master.

make sure that you do not rebase over any version bump. if the stage0 compiler changes, your testing is invalid (because they just won't read the same metadata files).

@hameerabbasi
Copy link
Contributor

If all issues mixed in here are tracked elsewhere cleanly, perhaps it makes sense to close this one?

@michaelwoerister
Copy link
Member

Closing this as a duplicate of #108481 (which has been fixed by #109935).

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 4, 2023
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) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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