Repository: rust
Issue: double-ICE checking `rustc_codegen_cranelift` after `cargo update`
Labels: I-ICE,T-compiler,A-incr-comp,C-bug

### Code

The reproducer is rust-lang/rust itself -- I'm at commit 51ea9bb29b07d76c5a7167d054b54f4eb7f5b44e.

1. `./x.py setup compiler`
2. `./x.py check`
3. `cargo update`
4. `./x.py check`

### Meta

Stage 0 is currently:

`./build/x86_64-unknown-linux-gnu/stage0/bin/rustc --version --verbose`:
```
rustc 1.61.0-beta.1 (0f231250b 2022-04-05)
binary: rustc
commit-hash: 0f231250ba7fe3a3f98a18aee9abfd65b104fb92
commit-date: 2022-04-05
host: x86_64-unknown-linux-gnu
release: 1.61.0-beta.1
LLVM version: 14.0.0
```

### Error output

It starts one ICE report, then panics again while printing the query stack.

```
    Checking rustc_codegen_cranelift v0.1.0 (/home/jistone/rust/ice/compiler/rustc_codegen_cranelift)
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:547:9
...
query stack during panic:
thread 'rustc' panicked at 'Illegal read of: 77323', /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/compiler/rustc_query_system/src/dep_graph/graph.rs:436:25
```

<details><summary><strong>Details</strong></summary>
<p>

```
Checking stage0 cranelift artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Checking cfg-if v1.0.0
    Checking hashbrown v0.11.2
    Checking smallvec v1.8.0
    Checking rustc-hash v1.1.0
    Checking cranelift-entity v0.82.1
    Checking cranelift-codegen-shared v0.82.1
    Checking ar v0.8.0 (https://github.com/bjorn3/rust-ar.git?branch=do_not_remove_cg_clif_ranlib#de9ab0e5)
    Checking once_cell v1.10.0
    Checking target-lexicon v0.12.3
    Checking anyhow v1.0.56
    Checking memchr v2.4.1
    Checking log v0.4.14
    Checking crc32fast v1.3.2
    Checking cranelift-bforest v0.82.1
    Checking regalloc v0.0.34
    Checking indexmap v1.8.0
    Checking gimli v0.26.1
    Checking object v0.27.1
    Checking cranelift-codegen v0.82.1
    Checking cranelift-module v0.82.1
    Checking cranelift-native v0.82.1
    Checking cranelift-frontend v0.82.1
    Checking cranelift-object v0.82.1
    Checking rustc_codegen_cranelift v0.1.0 (/home/jistone/rust/ice/compiler/rustc_codegen_cranelift)
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:547:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:143:14
   2: core::panicking::panic_display
             at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:72:5
   3: core::panicking::panic_str
             at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:56:5
   4: core::option::expect_failed
             at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/option.rs:1874: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: <alloc::vec::Vec<(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)> as alloc::vec::spec_from_iter::SpecFromIter<(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span), core::iter::adapters::map::Map<core::ops::range::Range<usize>, <[(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)] as rustc_middle::ty::codec::RefDecodable<rustc_query_impl::on_disk_cache::CacheDecoder>>::decode::{closure#0}>>>::from_iter
   8: <[(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)] as rustc_middle::ty::codec::RefDecodable<rustc_query_impl::on_disk_cache::CacheDecoder>>::decode
   9: <rustc_query_impl::on_disk_cache::OnDiskCache>::try_load_query_result::<rustc_middle::ty::generics::GenericPredicates>
  10: <<rustc_query_impl::queries::predicates_of as rustc_query_system::query::config::QueryDescription<rustc_query_impl::plumbing::QueryCtxt>>::TRY_LOAD_FROM_DISK::{closure#0} as core::ops::function::FnOnce<(rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  11: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory<rustc_query_impl::plumbing::QueryCtxt, rustc_span::def_id::DefId, rustc_middle::ty::generics::GenericPredicates>::{closure#0}, core::option::Option<rustc_middle::ty::generics::GenericPredicates>>
  12: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::predicates_of, rustc_query_impl::plumbing::QueryCtxt>
  13: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
  14: <rustc_trait_selection::traits::wf::WfPredicates>::nominal_obligations
  15: <rustc_trait_selection::traits::wf::WfPredicates>::compute
  16: <rustc_trait_selection::traits::fulfill::FulfillProcessor>::process_changed_obligations
  17: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor, rustc_data_structures::obligation_forest::Outcome<rustc_trait_selection::traits::fulfill::PendingPredicateObligation, rustc_infer::traits::FulfillmentErrorCode>>
  18: <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_all_or_error
  19: <rustc_typeck::check::fn_ctxt::FnCtxt>::select_all_obligations_or_error
  20: <rustc_infer::infer::InferCtxtBuilder>::enter::<(), <rustc_typeck::check::inherited::InheritedBuilder>::enter<<rustc_typeck::check::wfcheck::CheckWfFcxBuilder>::with_fcx<rustc_typeck::check::wfcheck::check_item_fn::{closure#0}>::{closure#0}, ()>::{closure#0}>
  21: rustc_typeck::check::wfcheck::check_item_fn
  22: rustc_typeck::check::wfcheck::check_item_well_formed
  23: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, ()>
  24: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, ()>>
  25: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_item_well_formed
  26: rustc_data_structures::sync::par_for_each_in::<&alloc::vec::Vec<rustc_hir::hir::MaybeOwner<&rustc_hir::hir::OwnerInfo>>, <rustc_middle::hir::map::Map>::par_visit_all_item_likes<rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor>::{closure#0}>
  27: <rustc_session::session::Session>::track_errors::<rustc_typeck::check_crate::{closure#5}, ()>
  28: rustc_typeck::check_crate
  29: rustc_interface::passes::analysis
  30: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  31: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  32: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  33: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  34: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  35: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  36: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  37: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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.61.0-beta.1 (0f231250b 2022-04-05) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type dylib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C symbol-mangling-version=v0 -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C llvm-args=-import-instr-limit=10 -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: 77323', /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/compiler/rustc_query_system/src/dep_graph/graph.rs:436:25
stack backtrace:
   0:     0x7f39c9a9e1bd - std::backtrace_rs::backtrace::libunwind::trace::h470e55287b882072
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f39c9a9e1bd - std::backtrace_rs::backtrace::trace_unsynchronized::h585533dd9332d6ca
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f39c9a9e1bd - std::sys_common::backtrace::_print_fmt::h68d627de986fd8f3
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f39c9a9e1bd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7fc764eadd4267d2
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f39c9af800c - core::fmt::write::h3c904a08dbe1bdb8
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/fmt/mod.rs:1194:17
   5:     0x7f39c9a8f7b1 - std::io::Write::write_fmt::hfbf96c47b9f25fe4
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/io/mod.rs:1655:15
   6:     0x7f39c9aa12a5 - std::sys_common::backtrace::_print::h352f43bdf1e6cbc7
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f39c9aa12a5 - std::sys_common::backtrace::print::hc4c2f15a38165690
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f39c9aa12a5 - std::panicking::default_hook::{{closure}}::h45ebbef7cd5073c4
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:295:22
   9:     0x7f39c9aa0f59 - std::panicking::default_hook::h68a8e9623ddbf3dd
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:314:9
  10:     0x7f39ca2adb21 - rustc_driver[bd1edd97124f670b]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f39c9aa19f0 - std::panicking::rust_panic_with_hook::h427f017ab8173bd9
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:702:17
  12:     0x7f39c9aa1827 - std::panicking::begin_panic_handler::{{closure}}::h8914d702b07503a8
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:588:13
  13:     0x7f39c9a9e674 - std::sys_common::backtrace::__rust_end_short_backtrace::hef1bcaf60d258acf
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f39c9aa1559 - rust_begin_unwind
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:584:5
  15:     0x7f39c9a656a3 - core::panicking::panic_fmt::h37e68eb9a66e9072
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:143:14
  16:     0x7f39cbc623e1 - <rustc_middle[501903a7ef1bceab]::dep_graph::dep_node::DepKind as rustc_query_system[5c84a80d11ca95b8]::dep_graph::DepKind>::read_deps::<<rustc_query_system[5c84a80d11ca95b8]::dep_graph::graph::DepGraph<rustc_middle[501903a7ef1bceab]::dep_graph::dep_node::DepKind>>::read_index::{closure#0}>
  17:     0x7f39cbc23766 - rustc_query_system[5c84a80d11ca95b8]::query::plumbing::get_query::<rustc_query_impl[b25ab6dc71bd10b3]::queries::def_span, rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>
  18:     0x7f39cbcc3cce - <rustc_query_impl[b25ab6dc71bd10b3]::Queries as rustc_middle[501903a7ef1bceab]::ty::query::QueryEngine>::def_span
  19:     0x7f39cac4e578 - <rustc_span[98c8ef5ecc4a48eb]::def_id::DefId as rustc_query_impl[b25ab6dc71bd10b3]::keys::Key>::default_span
  20:     0x7f39cacbb749 - rustc_query_impl[b25ab6dc71bd10b3]::make_query::predicates_of
  21:     0x7f39caaf08b9 - <rustc_query_system[5c84a80d11ca95b8]::query::plumbing::QueryState<rustc_span[98c8ef5ecc4a48eb]::def_id::DefId>>::try_collect_active_jobs::<rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>
  22:     0x7f39cad00714 - <rustc_query_impl[b25ab6dc71bd10b3]::Queries>::try_collect_active_jobs
  23:     0x7f39cac6be1c - <rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>::try_print_query_stack
  24:     0x7f39ca38f212 - rustc_interface[a40fd7989c51668c]::interface::try_print_query_stack
  25:     0x7f39ca2ae778 - rustc_driver[bd1edd97124f670b]::report_ice
  26:     0x7f39c9aa19f0 - std::panicking::rust_panic_with_hook::h427f017ab8173bd9
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:702:17
  27:     0x7f39c9aa1827 - std::panicking::begin_panic_handler::{{closure}}::h8914d702b07503a8
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:588:13
  28:     0x7f39c9a9e674 - std::sys_common::backtrace::__rust_end_short_backtrace::hef1bcaf60d258acf
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys_common/backtrace.rs:138:18
  29:     0x7f39c9aa1559 - rust_begin_unwind
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/panicking.rs:584:5
  30:     0x7f39c9a656a3 - core::panicking::panic_fmt::h37e68eb9a66e9072
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:143:14
  31:     0x7f39c9af4e21 - core::panicking::panic_display::h40c2bc66282ca48d
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:72:5
  32:     0x7f39c9af4dcb - core::panicking::panic_str::hb7d527b553f48f17
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/panicking.rs:56:5
  33:     0x7f39c9a65516 - core::option::expect_failed::h9b9eb8c14b056411
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/core/src/option.rs:1874:5
  34:     0x7f39cbd3349a - <rustc_metadata[ad67542d1d48b197]::creader::CStore as rustc_session[1f5a8cd03538dea5]::cstore::CrateStore>::stable_crate_id_to_crate_num
  35:     0x7f39cbcb4a95 - <rustc_span[98c8ef5ecc4a48eb]::span_encoding::Span as rustc_serialize[970864b38fba0141]::serialize::Decodable<rustc_query_impl[b25ab6dc71bd10b3]::on_disk_cache::CacheDecoder>>::decode
  36:     0x7f39cc7064ef - <alloc[b5fa684d7c801d72]::vec::Vec<(rustc_middle[501903a7ef1bceab]::ty::Predicate, rustc_span[98c8ef5ecc4a48eb]::span_encoding::Span)> as alloc[b5fa684d7c801d72]::vec::spec_from_iter::SpecFromIter<(rustc_middle[501903a7ef1bceab]::ty::Predicate, rustc_span[98c8ef5ecc4a48eb]::span_encoding::Span), core[bbdc132631682ac2]::iter::adapters::map::Map<core[bbdc132631682ac2]::ops::range::Range<usize>, <[(rustc_middle[501903a7ef1bceab]::ty::Predicate, rustc_span[98c8ef5ecc4a48eb]::span_encoding::Span)] as rustc_middle[501903a7ef1bceab]::ty::codec::RefDecodable<rustc_query_impl[b25ab6dc71bd10b3]::on_disk_cache::CacheDecoder>>::decode::{closure#0}>>>::from_iter
  37:     0x7f39cc6dac7f - <[(rustc_middle[501903a7ef1bceab]::ty::Predicate, rustc_span[98c8ef5ecc4a48eb]::span_encoding::Span)] as rustc_middle[501903a7ef1bceab]::ty::codec::RefDecodable<rustc_query_impl[b25ab6dc71bd10b3]::on_disk_cache::CacheDecoder>>::decode
  38:     0x7f39cbc58d95 - <rustc_query_impl[b25ab6dc71bd10b3]::on_disk_cache::OnDiskCache>::try_load_query_result::<rustc_middle[501903a7ef1bceab]::ty::generics::GenericPredicates>
  39:     0x7f39cc6c7c40 - <<rustc_query_impl[b25ab6dc71bd10b3]::queries::predicates_of as rustc_query_system[5c84a80d11ca95b8]::query::config::QueryDescription<rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>>::TRY_LOAD_FROM_DISK::{closure#0} as core[bbdc132631682ac2]::ops::function::FnOnce<(rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt, rustc_query_system[5c84a80d11ca95b8]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  40:     0x7f39cc6faae3 - <rustc_middle[501903a7ef1bceab]::dep_graph::dep_node::DepKind as rustc_query_system[5c84a80d11ca95b8]::dep_graph::DepKind>::with_deps::<rustc_query_system[5c84a80d11ca95b8]::query::plumbing::try_load_from_disk_and_cache_in_memory<rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt, rustc_span[98c8ef5ecc4a48eb]::def_id::DefId, rustc_middle[501903a7ef1bceab]::ty::generics::GenericPredicates>::{closure#0}, core[bbdc132631682ac2]::option::Option<rustc_middle[501903a7ef1bceab]::ty::generics::GenericPredicates>>
  41:     0x7f39cbc08c3e - rustc_query_system[5c84a80d11ca95b8]::query::plumbing::get_query::<rustc_query_impl[b25ab6dc71bd10b3]::queries::predicates_of, rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>
  42:     0x7f39cbcc176e - <rustc_query_impl[b25ab6dc71bd10b3]::Queries as rustc_middle[501903a7ef1bceab]::ty::query::QueryEngine>::predicates_of
  43:     0x7f39cbf7c697 - <rustc_trait_selection[5b2bd839769733ee]::traits::wf::WfPredicates>::nominal_obligations
  44:     0x7f39cbf7a2d8 - <rustc_trait_selection[5b2bd839769733ee]::traits::wf::WfPredicates>::compute
  45:     0x7f39cbf32ed0 - <rustc_trait_selection[5b2bd839769733ee]::traits::fulfill::FulfillProcessor>::process_changed_obligations
  46:     0x7f39cbf46f23 - <rustc_data_structures[8be5bd2c4f3986f6]::obligation_forest::ObligationForest<rustc_trait_selection[5b2bd839769733ee]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[5b2bd839769733ee]::traits::fulfill::FulfillProcessor, rustc_data_structures[8be5bd2c4f3986f6]::obligation_forest::Outcome<rustc_trait_selection[5b2bd839769733ee]::traits::fulfill::PendingPredicateObligation, rustc_infer[e73a70204b9b9ca7]::traits::FulfillmentErrorCode>>
  47:     0x7f39cbf3191a - <rustc_trait_selection[5b2bd839769733ee]::traits::fulfill::FulfillmentContext as rustc_infer[e73a70204b9b9ca7]::traits::engine::TraitEngine>::select_all_or_error
  48:     0x7f39cb6c8dcc - <rustc_typeck[3c6af09b6fee58a6]::check::fn_ctxt::FnCtxt>::select_all_obligations_or_error
  49:     0x7f39cc458dcf - <rustc_infer[e73a70204b9b9ca7]::infer::InferCtxtBuilder>::enter::<(), <rustc_typeck[3c6af09b6fee58a6]::check::inherited::InheritedBuilder>::enter<<rustc_typeck[3c6af09b6fee58a6]::check::wfcheck::CheckWfFcxBuilder>::with_fcx<rustc_typeck[3c6af09b6fee58a6]::check::wfcheck::check_item_fn::{closure#0}>::{closure#0}, ()>::{closure#0}>
  50:     0x7f39cc479ca3 - rustc_typeck[3c6af09b6fee58a6]::check::wfcheck::check_item_fn
  51:     0x7f39cb78c4e6 - rustc_typeck[3c6af09b6fee58a6]::check::wfcheck::check_item_well_formed
  52:     0x7f39cc728eff - <rustc_query_system[5c84a80d11ca95b8]::dep_graph::graph::DepGraph<rustc_middle[501903a7ef1bceab]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[501903a7ef1bceab]::ty::context::TyCtxt, rustc_span[98c8ef5ecc4a48eb]::def_id::LocalDefId, ()>
  53:     0x7f39cbbe2b12 - rustc_query_system[5c84a80d11ca95b8]::query::plumbing::try_execute_query::<rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt, rustc_query_system[5c84a80d11ca95b8]::query::caches::DefaultCache<rustc_span[98c8ef5ecc4a48eb]::def_id::LocalDefId, ()>>
  54:     0x7f39cbcc5131 - <rustc_query_impl[b25ab6dc71bd10b3]::Queries as rustc_middle[501903a7ef1bceab]::ty::query::QueryEngine>::check_item_well_formed
  55:     0x7f39cb76be61 - rustc_data_structures[8be5bd2c4f3986f6]::sync::par_for_each_in::<&alloc[b5fa684d7c801d72]::vec::Vec<rustc_hir[33e6fef3ac53f85c]::hir::MaybeOwner<&rustc_hir[33e6fef3ac53f85c]::hir::OwnerInfo>>, <rustc_middle[501903a7ef1bceab]::hir::map::Map>::par_visit_all_item_likes<rustc_typeck[3c6af09b6fee58a6]::check::wfcheck::CheckTypeWellFormedVisitor>::{closure#0}>
  56:     0x7f39cc450d22 - <rustc_session[1f5a8cd03538dea5]::session::Session>::track_errors::<rustc_typeck[3c6af09b6fee58a6]::check_crate::{closure#5}, ()>
  57:     0x7f39cc44238d - rustc_typeck[3c6af09b6fee58a6]::check_crate
  58:     0x7f39cc1bdaf7 - rustc_interface[a40fd7989c51668c]::passes::analysis
  59:     0x7f39cc742625 - <rustc_query_system[5c84a80d11ca95b8]::dep_graph::graph::DepGraph<rustc_middle[501903a7ef1bceab]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[501903a7ef1bceab]::ty::context::TyCtxt, (), core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>
  60:     0x7f39cc683f92 - rustc_query_system[5c84a80d11ca95b8]::query::plumbing::try_execute_query::<rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt, rustc_query_system[5c84a80d11ca95b8]::query::caches::DefaultCache<(), core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>>
  61:     0x7f39cc6c6ece - rustc_query_system[5c84a80d11ca95b8]::query::plumbing::get_query::<rustc_query_impl[b25ab6dc71bd10b3]::queries::analysis, rustc_query_impl[b25ab6dc71bd10b3]::plumbing::QueryCtxt>
  62:     0x7f39cc183871 - <rustc_interface[a40fd7989c51668c]::passes::QueryContext>::enter::<rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>
  63:     0x7f39cc19da48 - <rustc_interface[a40fd7989c51668c]::interface::Compiler>::enter::<rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}::{closure#2}, core[bbdc132631682ac2]::result::Result<core[bbdc132631682ac2]::option::Option<rustc_interface[a40fd7989c51668c]::queries::Linker>, rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>
  64:     0x7f39cc18302f - rustc_span[98c8ef5ecc4a48eb]::with_source_map::<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_interface[a40fd7989c51668c]::interface::create_compiler_and_run<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}>::{closure#1}>
  65:     0x7f39cc19e684 - rustc_interface[a40fd7989c51668c]::interface::create_compiler_and_run::<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}>
  66:     0x7f39cc1817c2 - <scoped_tls[41b0ab949f7428e0]::ScopedKey<rustc_span[98c8ef5ecc4a48eb]::SessionGlobals>>::set::<rustc_interface[a40fd7989c51668c]::interface::run_compiler<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}>::{closure#0}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>
  67:     0x7f39cc19737f - std[33858be22a9b7cb6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a40fd7989c51668c]::util::run_in_thread_pool_with_globals<rustc_interface[a40fd7989c51668c]::interface::run_compiler<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}>::{closure#0}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>::{closure#0}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>
  68:     0x7f39cc182ae9 - <<std[33858be22a9b7cb6]::thread::Builder>::spawn_unchecked_<rustc_interface[a40fd7989c51668c]::util::run_in_thread_pool_with_globals<rustc_interface[a40fd7989c51668c]::interface::run_compiler<core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>, rustc_driver[bd1edd97124f670b]::run_compiler::{closure#1}>::{closure#0}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>::{closure#0}, core[bbdc132631682ac2]::result::Result<(), rustc_errors[4eb9b1cc555842c]::ErrorGuaranteed>>::{closure#1} as core[bbdc132631682ac2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  69:     0x7f39c9aabbe3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h03c771d707ec301c
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/alloc/src/boxed.rs:1861:9
  70:     0x7f39c9aabbe3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h69d26a7c4143e218
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/alloc/src/boxed.rs:1861:9
  71:     0x7f39c9aabbe3 - std::sys::unix::thread::Thread::new::thread_start::hb7638ae1c14a3e83
                               at /rustc/0f231250ba7fe3a3f98a18aee9abfd65b104fb92/library/std/src/sys/unix/thread.rs:108:17
  72:     0x7f39c988f017 - start_thread
  73:     0x7f39c99146d0 - clone3
  74:                0x0 - <unknown>

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.61.0-beta.1 (0f231250b 2022-04-05) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type dylib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C symbol-mangling-version=v0 -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
rustc exited with signal: 6 (core dumped)
error: could not compile `rustc_codegen_cranelift`

Caused by:
  process didn't exit successfully: `/home/jistone/rust/ice/build/bootstrap/debug/rustc --crate-name rustc_codegen_cranelift --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type dylib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C metadata=0ebcb3695bc29f2c -C extra-filename=-0ebcb3695bc29f2c --out-dir /home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/release/deps --extern ar=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libar-4ae07157b9a86496.rmeta --extern cranelift_codegen=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libcranelift_codegen-69887545ffc1fea8.rmeta --extern cranelift_frontend=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libcranelift_frontend-356fa40763a54faf.rmeta --extern cranelift_module=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libcranelift_module-dbd119f55277d43a.rmeta --extern cranelift_native=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libcranelift_native-396364c2818c6f4f.rmeta --extern cranelift_object=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libcranelift_object-0dedfba33383ef66.rmeta --extern gimli=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libgimli-f1ddf1c65395a82f.rmeta --extern indexmap=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libindexmap-ea38c2e07f7518e8.rmeta --extern object=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libobject-55def9f6ca7966f1.rmeta --extern once_cell=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libonce_cell-448595e8ae1aef3e.rmeta --extern smallvec=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libsmallvec-4a90802da05c84cf.rmeta --extern target_lexicon=/home/jistone/rust/ice/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/deps/libtarget_lexicon-02c54ccd77f373df.rmeta --cfg=bootstrap -Csymbol-mangling-version=v0 -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo` (exit status: 254)
```

</p>
</details>

Note that `rustc_codegen_cranelift` has its own `Cargo.lock` which I did not update, but changes to `std` would hit everywhere.

After `./x.py clean`, then `./x.py check` with the updated root `Cargo.lock` is fine.