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: Failed to normalize, maybe try to call try_normalize_erasing_regions instead #110682

Closed
12101111 opened this issue Apr 22, 2023 · 13 comments · Fixed by #110930
Closed

ICE: Failed to normalize, maybe try to call try_normalize_erasing_regions instead #110682

12101111 opened this issue Apr 22, 2023 · 13 comments · Fixed by #110930
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@12101111
Copy link
Contributor

Code

I found this ICE while compiling bitvec 0.19.6 in release mode.

https://github.com/ferrilab/bitvec/tree/v0/19/6

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (fec9adcdb 2023-04-21)
binary: rustc
commit-hash: fec9adcdbc21469ef105162cc8cabf81c72d06be
commit-date: 2023-04-21
host: aarch64-apple-darwin
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize alloc::raw_vec::RawVec<<T as store::BitStore>::Mem>, maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/fec9adcdbc21469ef105162cc8cabf81c72d06be/compiler/rustc_errors/src/lib.rs:1643:9

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (fec9adcdb 2023-04-21) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C target-cpu=apple-m1

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

query stack during panic:
#0 [mir_shims] generating MIR shim for `core::ptr::drop_in_place`
#1 [optimized_mir] optimizing MIR for `vec::ops::<impl at src/vec/ops.rs:141:1: 141:33>::drop::{closure#0}`
end of query stack
Backtrace

stack backtrace:
   0:        0x104a90738 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha9e6c436959f1b8e
   1:        0x104ae075c - core::fmt::write::h03620c265cda50c9
   2:        0x104a86658 - std::io::Write::write_fmt::h4582733544e760df
   3:        0x104a90598 - std::sys_common::backtrace::print::h52cbdd72190599ef
   4:        0x104a92f38 - std::panicking::default_hook::{{closure}}::hbd7990be14834316
   5:        0x104a92d3c - std::panicking::default_hook::hefa394ac64f6527f
   6:        0x10cfb5b58 - rustc_driver_impl[9431cfa2328e8da]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x104a9352c - std::panicking::rust_panic_with_hook::h7504e9066f7b4f07
   8:        0x110d6c2e8 - std[614eb408c5fa570d]::panicking::begin_panic::<rustc_errors[c2a69e08fcd2e8bf]::ExplicitBug>::{closure#0}
   9:        0x110d69db0 - std[614eb408c5fa570d]::sys_common::backtrace::__rust_end_short_backtrace::<std[614eb408c5fa570d]::panicking::begin_panic<rustc_errors[c2a69e08fcd2e8bf]::ExplicitBug>::{closure#0}, !>
  10:        0x1113a1b44 - std[614eb408c5fa570d]::panicking::begin_panic::<rustc_errors[c2a69e08fcd2e8bf]::ExplicitBug>
  11:        0x110e2b5ac - <rustc_errors[c2a69e08fcd2e8bf]::HandlerInner>::bug::<&alloc[8ca104b1f3df9592]::string::String>
  12:        0x110e2b270 - <rustc_errors[c2a69e08fcd2e8bf]::Handler>::bug::<&alloc[8ca104b1f3df9592]::string::String>
  13:        0x110dd1124 - rustc_middle[662f54c0a25f7c56]::util::bug::opt_span_bug_fmt::<rustc_span[7733720cb78d73dd]::span_encoding::Span>::{closure#0}
  14:        0x110dd0b34 - rustc_middle[662f54c0a25f7c56]::ty::context::tls::with_opt::<rustc_middle[662f54c0a25f7c56]::util::bug::opt_span_bug_fmt<rustc_span[7733720cb78d73dd]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:        0x110dd0b00 - rustc_middle[662f54c0a25f7c56]::ty::context::tls::with_context_opt::<rustc_middle[662f54c0a25f7c56]::ty::context::tls::with_opt<rustc_middle[662f54c0a25f7c56]::util::bug::opt_span_bug_fmt<rustc_span[7733720cb78d73dd]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:        0x1113a18ac - rustc_middle[662f54c0a25f7c56]::util::bug::bug_fmt
  17:        0x110dcdea8 - <rustc_middle[662f54c0a25f7c56]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>::normalize_generic_arg_after_erasing_regions
  18:        0x110dcdee4 - <rustc_middle[662f54c0a25f7c56]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[50bb8a969b2c53c]::fold::TypeFolder<rustc_middle[662f54c0a25f7c56]::ty::context::TyCtxt>>::fold_ty
  19:        0x10f6d33cc - <core[dc40836e4f3e0da7]::iter::adapters::map::Map<core[dc40836e4f3e0da7]::iter::adapters::enumerate::Enumerate<core[dc40836e4f3e0da7]::slice::iter::Iter<rustc_middle[662f54c0a25f7c56]::ty::FieldDef>>, <rustc_mir_dataflow[2ace872dcdcb608a]::elaborate_drops::DropCtxt<rustc_mir_transform[c661f0a31a836e75]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}> as core[dc40836e4f3e0da7]::iter::traits::iterator::Iterator>::fold::<(), core[dc40836e4f3e0da7]::iter::traits::iterator::Iterator::for_each::call<(rustc_middle[662f54c0a25f7c56]::mir::syntax::Place, core[dc40836e4f3e0da7]::option::Option<()>), <alloc[8ca104b1f3df9592]::vec::Vec<(rustc_middle[662f54c0a25f7c56]::mir::syntax::Place, core[dc40836e4f3e0da7]::option::Option<()>)>>::extend_trusted<core[dc40836e4f3e0da7]::iter::adapters::map::Map<core[dc40836e4f3e0da7]::iter::adapters::enumerate::Enumerate<core[dc40836e4f3e0da7]::slice::iter::Iter<rustc_middle[662f54c0a25f7c56]::ty::FieldDef>>, <rustc_mir_dataflow[2ace872dcdcb608a]::elaborate_drops::DropCtxt<rustc_mir_transform[c661f0a31a836e75]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>::{closure#0}>::{closure#0}>
  20:        0x10f7e0f04 - <alloc[8ca104b1f3df9592]::vec::Vec<(rustc_middle[662f54c0a25f7c56]::mir::syntax::Place, core[dc40836e4f3e0da7]::option::Option<()>)> as alloc[8ca104b1f3df9592]::vec::spec_from_iter::SpecFromIter<(rustc_middle[662f54c0a25f7c56]::mir::syntax::Place, core[dc40836e4f3e0da7]::option::Option<()>), core[dc40836e4f3e0da7]::iter::adapters::map::Map<core[dc40836e4f3e0da7]::iter::adapters::enumerate::Enumerate<core[dc40836e4f3e0da7]::slice::iter::Iter<rustc_middle[662f54c0a25f7c56]::ty::FieldDef>>, <rustc_mir_dataflow[2ace872dcdcb608a]::elaborate_drops::DropCtxt<rustc_mir_transform[c661f0a31a836e75]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>>::from_iter
  21:        0x10f6de998 - <rustc_mir_dataflow[2ace872dcdcb608a]::elaborate_drops::DropCtxt<rustc_mir_transform[c661f0a31a836e75]::shim::DropShimElaborator>>::open_drop_for_adt
  22:        0x10f6de2e8 - <rustc_mir_dataflow[2ace872dcdcb608a]::elaborate_drops::DropCtxt<rustc_mir_transform[c661f0a31a836e75]::shim::DropShimElaborator>>::elaborate_drop
  23:        0x10f800090 - rustc_mir_transform[c661f0a31a836e75]::shim::make_shim
  24:        0x11027591c - <std[614eb408c5fa570d]::thread::local::LocalKey<core[dc40836e4f3e0da7]::cell::Cell<*const ()>>>::with::<rustc_middle[662f54c0a25f7c56]::ty::context::tls::enter_context<rustc_query_system[2ed44d2bc999b7a]::query::plumbing::execute_job_non_incr<rustc_query_impl[eba986b151bf483e]::queries::mir_shims, rustc_query_impl[eba986b151bf483e]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[662f54c0a25f7c56]::query::erase::Erased<[u8; 8usize]>>::{closure#0}, rustc_middle[662f54c0a25f7c56]::query::erase::Erased<[u8; 8usize]>>
  25:        0x11014ccd0 - rustc_query_system[2ed44d2bc999b7a]::query::plumbing::try_execute_query::<rustc_query_impl[eba986b151bf483e]::queries::mir_shims, rustc_query_impl[eba986b151bf483e]::plumbing::QueryCtxt>
  26:        0x110347614 - <rustc_query_impl[eba986b151bf483e]::Queries as rustc_middle[662f54c0a25f7c56]::ty::query::QueryEngine>::mir_shims
  27:        0x110eba434 - <rustc_middle[662f54c0a25f7c56]::ty::context::TyCtxt>::instance_mir
  28:        0x10f7cb2c4 - <rustc_mir_transform[c661f0a31a836e75]::inline::Inliner>::try_inlining
  29:        0x10f7cac2c - <rustc_mir_transform[c661f0a31a836e75]::inline::Inliner>::process_blocks
  30:        0x10f7cad14 - <rustc_mir_transform[c661f0a31a836e75]::inline::Inliner>::process_blocks
  31:        0x10f7ca6f0 - <rustc_mir_transform[c661f0a31a836e75]::inline::Inline as rustc_middle[662f54c0a25f7c56]::mir::MirPass>::run_pass
  32:        0x10f7c3dd0 - rustc_mir_transform[c661f0a31a836e75]::pass_manager::run_passes_inner
  33:        0x10f6f15a8 - rustc_mir_transform[c661f0a31a836e75]::optimized_mir
  34:        0x1100dd060 - rustc_query_system[2ed44d2bc999b7a]::query::plumbing::try_execute_query::<rustc_query_impl[eba986b151bf483e]::queries::optimized_mir, rustc_query_impl[eba986b151bf483e]::plumbing::QueryCtxt>
  35:        0x11033e7b8 - <rustc_query_impl[eba986b151bf483e]::Queries as rustc_middle[662f54c0a25f7c56]::ty::query::QueryEngine>::optimized_mir
  36:        0x1106e1654 - <rustc_metadata[f2a84a8141f6c436]::rmeta::encoder::EncodeContext>::encode_crate_root
  37:        0x1106eeb08 - rustc_metadata[f2a84a8141f6c436]::rmeta::encoder::encode_metadata_impl
  38:        0x110695d88 - rustc_data_structures[240cd432e77d6b7b]::sync::join::<rustc_metadata[f2a84a8141f6c436]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[f2a84a8141f6c436]::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
  39:        0x1106ee348 - rustc_metadata[f2a84a8141f6c436]::rmeta::encoder::encode_metadata
  40:        0x11068928c - rustc_metadata[f2a84a8141f6c436]::fs::encode_and_write_metadata
  41:        0x10d066d9c - rustc_interface[5a3a908aa1aef180]::passes::start_codegen
  42:        0x10d052850 - <rustc_middle[662f54c0a25f7c56]::ty::context::GlobalCtxt>::enter::<<rustc_interface[5a3a908aa1aef180]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[dc40836e4f3e0da7]::result::Result<alloc[8ca104b1f3df9592]::boxed::Box<dyn core[dc40836e4f3e0da7]::any::Any>, rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>
  43:        0x10d01ea18 - <rustc_interface[5a3a908aa1aef180]::queries::Queries>::ongoing_codegen
  44:        0x10cf8ec74 - <rustc_interface[5a3a908aa1aef180]::interface::Compiler>::enter::<rustc_driver_impl[9431cfa2328e8da]::run_compiler::{closure#1}::{closure#2}, core[dc40836e4f3e0da7]::result::Result<core[dc40836e4f3e0da7]::option::Option<rustc_interface[5a3a908aa1aef180]::queries::Linker>, rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>
  45:        0x10cf52ca4 - rustc_span[7733720cb78d73dd]::set_source_map::<core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>, rustc_interface[5a3a908aa1aef180]::interface::run_compiler<core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>, rustc_driver_impl[9431cfa2328e8da]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  46:        0x10cf58250 - <scoped_tls[4e67b4d1df739e32]::ScopedKey<rustc_span[7733720cb78d73dd]::SessionGlobals>>::set::<rustc_interface[5a3a908aa1aef180]::interface::run_compiler<core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>, rustc_driver_impl[9431cfa2328e8da]::run_compiler::{closure#1}>::{closure#0}, core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>
  47:        0x10cf49a1c - std[614eb408c5fa570d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5a3a908aa1aef180]::util::run_in_thread_pool_with_globals<rustc_interface[5a3a908aa1aef180]::interface::run_compiler<core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>, rustc_driver_impl[9431cfa2328e8da]::run_compiler::{closure#1}>::{closure#0}, core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>
  48:        0x10cf5d42c - <<std[614eb408c5fa570d]::thread::Builder>::spawn_unchecked_<rustc_interface[5a3a908aa1aef180]::util::run_in_thread_pool_with_globals<rustc_interface[5a3a908aa1aef180]::interface::run_compiler<core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>, rustc_driver_impl[9431cfa2328e8da]::run_compiler::{closure#1}>::{closure#0}, core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[dc40836e4f3e0da7]::result::Result<(), rustc_span[7733720cb78d73dd]::ErrorGuaranteed>>::{closure#1} as core[dc40836e4f3e0da7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:        0x104a9bcd0 - std::sys::unix::thread::Thread::new::thread_start::h02c2263b1a3b4fc6
  50:        0x19840bfa8 - __pthread_joiner_wake

bisect command:

cargo bisect-rustc --start 2023-04-17 --end 2023-04-18 --without-cargo -- build --release

bisect result: #109247


Regression in 5546cb6


@12101111 12101111 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 Apr 22, 2023
@matthiaskrgr
Copy link
Member

uuh cc @saethlin

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Apr 22, 2023

For repro:
git clone https://github.com/ferrilab/bitvec/ ; cd bitvec ; git checkout 20e2d68 ; cargo build --release

@saethlin
Copy link
Member

You're right that this ICEs after my PR but not before, but this looks like an issue related to type system code or ElaborateDrops, not MIR inlining itself, so I don't think I can't help here.

@matthiaskrgr
Copy link
Member

Ah so it would have iced before if we had forced inlining before?

@saethlin
Copy link
Member

Yes, with enough application of #[inline(always)] this code should ICE before that PR. I couldn't tell you where to apply the attribute though, just squinting at the ICE message it looks like this closure#0 is significant, though I don't know enough to track down where that closure is.

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Apr 22, 2023

Is there some rustc flag I can use to force inlining of like ~ everything ~ for testing purposes? 👀

edit: -Zinline-mir-threshold=0 or something like that? :D

@saethlin
Copy link
Member

-Zinline-mir-threshold=10000 -Zinline-mir-hint-threshold=10000 You need to set both thresholds, and I don't think we have a magic value for "always", just use a big number. The defaults are 50 and 100 I think.

Also just FYI there's also an inlining depth limit that's not configurable, but it shouldn't be relevant for this PR. But if you see unexpected missed inlinings even with passing those flags, that threshold might be why.

@saethlin
Copy link
Member

Oh, those flags won't help you before the PR in question, because functions without #[inline] are simply not considered for inlining at all, no matter their size. Fixing this odd ignoring of size was the whole point of that PR.

You can pass -Zmir-opt-level=3 to lift that "must have #[inline]" requirement, but of course that turns on other passes, but the check you're trying to dodge is an explicit check for the MIR opt level inside the Inline pass so... yeah just you might also hit other bugs. You could try turning off the passes that are enabled at mir-opt-level=3 but that would be messy.

@matthiaskrgr
Copy link
Member

The mir opt level is cranked up already anyway https://github.com/matthiaskrgr/icemaker/blob/master/src/flags.rs#L137
Maybe I can find some snippet that somehow reassembles what we are seeing here :)

I'll be able to report back in an hour or so I guess ^^

@matthiaskrgr
Copy link
Member

Meh besides a couple more "hangs" (process timeouts) nothing new in the standard rustc test set :/

@JakobDegen
Copy link
Contributor

This is a dupe of #106444 I believe

@inducer
Copy link

inducer commented Apr 30, 2023

Another reproducer (possibly large): Run maturin develop in inducer/starlark-pyo3@ec0f2e0, with
rustc 1.71.0-nightly (87b1f89 2023-04-29) running on x86_64-unknown-linux-gnu.

Failing CI log: https://github.com/inducer/starlark-pyo3/actions/runs/4842247863/jobs/8629074779

@snyball
Copy link

snyball commented May 16, 2023

I've been getting this too since about a month ago:

   Compiling anstream v0.3.2
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize alloc::raw_vec::RawVec<<T as store::BitStore>::Mem>, maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' panicked at 'Box<dyn Any>', /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0:     0x7f82137696e1 - std::backtrace_rs::backtrace::libunwind::trace::h4354896f1663baaf
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f82137696e1 - std::backtrace_rs::backtrace::trace_unsynchronized::h8ac49f89c23585dd
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f82137696e1 - std::sys_common::backtrace::_print_fmt::h9f5f16b3ef080000
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f82137696e1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hcfed927151d1ad83
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f82137c9bdf - core::fmt::rt::Argument::fmt::h12fb43eea2fe23a8
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/core/src/fmt/rt.rs:138:9
   5:     0x7f82137c9bdf - core::fmt::write::hcf94a34baaaea06f
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f821375c941 - std::io::Write::write_fmt::h60003491edc2e074
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/io/mod.rs:1712:15
   7:     0x7f82137694f5 - std::sys_common::backtrace::_print::h9a8311322b9d8667
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f82137694f5 - std::sys_common::backtrace::print::h8503eaeeae92ea08
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f821376c177 - std::panicking::default_hook::{{closure}}::h36a123b73b99c0f3
  10:     0x7f821376bf64 - std::panicking::default_hook::ha2efb9fc5f628e61
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/panicking.rs:288:9
  11:     0x7f82168c87db - rustc_driver_impl[64b7dd1911194932]::install_ice_hook::{closure#0}
  12:     0x7f821376c897 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h250e911c4e8d011a
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/alloc/src/boxed.rs:1999:9
  13:     0x7f821376c897 - std::panicking::rust_panic_with_hook::h5d9e02f555bc48d2
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/panicking.rs:695:13
  14:     0x7f8216dc5901 - std[d9d2839bce1dd559]::panicking::begin_panic::<rustc_errors[fcec483c501eb906]::ExplicitBug>::{closure#0}
  15:     0x7f8216dbead6 - std[d9d2839bce1dd559]::sys_common::backtrace::__rust_end_short_backtrace::<std[d9d2839bce1dd559]::panicking::begin_panic<rustc_errors[fcec483c501eb906]::ExplicitBug>::{closure#0}, !>
  16:     0x7f8216dbe406 - std[d9d2839bce1dd559]::panicking::begin_panic::<rustc_errors[fcec483c501eb906]::ExplicitBug>
  17:     0x7f8216d99334 - <rustc_errors[fcec483c501eb906]::HandlerInner>::bug::<alloc[d2b0d467f91dc298]::string::String>
  18:     0x7f8216d98f86 - <rustc_errors[fcec483c501eb906]::Handler>::bug::<alloc[d2b0d467f91dc298]::string::String>
  19:     0x7f8216e41bdc - rustc_middle[f607de435e9a4418]::util::bug::opt_span_bug_fmt::<rustc_span[f3562a9d228bc34b]::span_encoding::Span>::{closure#0}
  20:     0x7f8216e3e25a - rustc_middle[f607de435e9a4418]::ty::context::tls::with_opt::<rustc_middle[f607de435e9a4418]::util::bug::opt_span_bug_fmt<rustc_span[f3562a9d228bc34b]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f8216e3e22a - rustc_middle[f607de435e9a4418]::ty::context::tls::with_context_opt::<rustc_middle[f607de435e9a4418]::ty::context::tls::with_opt<rustc_middle[f607de435e9a4418]::util::bug::opt_span_bug_fmt<rustc_span[f3562a9d228bc34b]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f8214c1cb8d - rustc_middle[f607de435e9a4418]::util::bug::bug_fmt
  23:     0x7f8214e1a174 - <rustc_middle[f607de435e9a4418]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[8300f6efcd370450]::fold::TypeFolder<rustc_middle[f607de435e9a4418]::ty::context::TyCtxt>>::fold_ty
  24:     0x7f8215b93f51 - <core[b4a8d54be4c63c12]::iter::adapters::map::Map<core[b4a8d54be4c63c12]::iter::adapters::enumerate::Enumerate<core[b4a8d54be4c63c12]::slice::iter::Iter<rustc_middle[f607de435e9a4418]::ty::FieldDef>>, <rustc_mir_dataflow[52dce49772f251c0]::elaborate_drops::DropCtxt<rustc_mir_transform[27868256649f483d]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}> as core[b4a8d54be4c63c12]::iter::traits::iterator::Iterator>::fold::<(), core[b4a8d54be4c63c12]::iter::traits::iterator::Iterator::for_each::call<(rustc_middle[f607de435e9a4418]::mir::syntax::Place, core[b4a8d54be4c63c12]::option::Option<()>), <alloc[d2b0d467f91dc298]::vec::Vec<(rustc_middle[f607de435e9a4418]::mir::syntax::Place, core[b4a8d54be4c63c12]::option::Option<()>)>>::extend_trusted<core[b4a8d54be4c63c12]::iter::adapters::map::Map<core[b4a8d54be4c63c12]::iter::adapters::enumerate::Enumerate<core[b4a8d54be4c63c12]::slice::iter::Iter<rustc_middle[f607de435e9a4418]::ty::FieldDef>>, <rustc_mir_dataflow[52dce49772f251c0]::elaborate_drops::DropCtxt<rustc_mir_transform[27868256649f483d]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>::{closure#0}>::{closure#0}>
  25:     0x7f8215b93dba - <alloc[d2b0d467f91dc298]::vec::Vec<(rustc_middle[f607de435e9a4418]::mir::syntax::Place, core[b4a8d54be4c63c12]::option::Option<()>)> as alloc[d2b0d467f91dc298]::vec::spec_from_iter::SpecFromIter<(rustc_middle[f607de435e9a4418]::mir::syntax::Place, core[b4a8d54be4c63c12]::option::Option<()>), core[b4a8d54be4c63c12]::iter::adapters::map::Map<core[b4a8d54be4c63c12]::iter::adapters::enumerate::Enumerate<core[b4a8d54be4c63c12]::slice::iter::Iter<rustc_middle[f607de435e9a4418]::ty::FieldDef>>, <rustc_mir_dataflow[52dce49772f251c0]::elaborate_drops::DropCtxt<rustc_mir_transform[27868256649f483d]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>>::from_iter
  26:     0x7f8215b926b2 - <rustc_mir_dataflow[52dce49772f251c0]::elaborate_drops::DropCtxt<rustc_mir_transform[27868256649f483d]::shim::DropShimElaborator>>::elaborate_drop
  27:     0x7f8215b8da39 - rustc_mir_transform[27868256649f483d]::shim::make_shim
  28:     0x7f8215b4ed1c - rustc_query_system[7835b3e98a87b812]::query::plumbing::try_execute_query::<rustc_query_impl[29ff09dda6aeedc5]::DynamicConfig<rustc_query_system[7835b3e98a87b812]::query::caches::DefaultCache<rustc_middle[f607de435e9a4418]::ty::instance::InstanceDef, rustc_middle[f607de435e9a4418]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[29ff09dda6aeedc5]::plumbing::QueryCtxt>
  29:     0x7f821628a0a2 - rustc_query_impl[29ff09dda6aeedc5]::get_query::mir_shims
  30:     0x7f82152741d1 - <rustc_middle[f607de435e9a4418]::ty::context::TyCtxt>::instance_mir
  31:     0x7f82155d0db9 - <rustc_mir_transform[27868256649f483d]::inline::Inliner>::try_inlining
  32:     0x7f82155cd330 - <rustc_mir_transform[27868256649f483d]::inline::Inliner>::process_blocks
  33:     0x7f82155cd3ea - <rustc_mir_transform[27868256649f483d]::inline::Inliner>::process_blocks
  34:     0x7f82155ccb11 - <rustc_mir_transform[27868256649f483d]::inline::Inline as rustc_middle[f607de435e9a4418]::mir::MirPass>::run_pass
  35:     0x7f8215c3968d - rustc_mir_transform[27868256649f483d]::optimized_mir
  36:     0x7f8215c390d5 - <rustc_query_impl[29ff09dda6aeedc5]::dynamic_query::optimized_mir::{closure#2} as core[b4a8d54be4c63c12]::ops::function::FnOnce<(rustc_middle[f607de435e9a4418]::ty::context::TyCtxt, rustc_span[f3562a9d228bc34b]::def_id::DefId)>>::call_once
  37:     0x7f8214b24ae4 - rustc_query_system[7835b3e98a87b812]::query::plumbing::try_execute_query::<rustc_query_impl[29ff09dda6aeedc5]::DynamicConfig<rustc_query_system[7835b3e98a87b812]::query::caches::DefaultCache<rustc_span[f3562a9d228bc34b]::def_id::DefId, rustc_middle[f607de435e9a4418]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[29ff09dda6aeedc5]::plumbing::QueryCtxt>
  38:     0x7f82162836f6 - rustc_query_impl[29ff09dda6aeedc5]::get_query::optimized_mir
  39:     0x7f8215679ac2 - <rustc_metadata[a0efc5a83e2521c5]::rmeta::encoder::EncodeContext>::encode_crate_root
  40:     0x7f821567533d - rustc_metadata[a0efc5a83e2521c5]::rmeta::encoder::encode_metadata_impl
  41:     0x7f8215e78ab6 - rustc_metadata[a0efc5a83e2521c5]::rmeta::encoder::encode_metadata
  42:     0x7f8215e7744e - rustc_metadata[a0efc5a83e2521c5]::fs::encode_and_write_metadata
  43:     0x7f8215e67c60 - rustc_interface[d75252421fea963]::passes::start_codegen
  44:     0x7f8215e62557 - <rustc_middle[f607de435e9a4418]::ty::context::GlobalCtxt>::enter::<<rustc_interface[d75252421fea963]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[b4a8d54be4c63c12]::result::Result<alloc[d2b0d467f91dc298]::boxed::Box<dyn core[b4a8d54be4c63c12]::any::Any>, rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>
  45:     0x7f8215e609bd - <rustc_interface[d75252421fea963]::queries::Queries>::ongoing_codegen
  46:     0x7f8215e60009 - <rustc_interface[d75252421fea963]::interface::Compiler>::enter::<rustc_driver_impl[64b7dd1911194932]::run_compiler::{closure#1}::{closure#2}, core[b4a8d54be4c63c12]::result::Result<core[b4a8d54be4c63c12]::option::Option<rustc_interface[d75252421fea963]::queries::Linker>, rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>
  47:     0x7f8215e5dcfd - <scoped_tls[36ad800287692b7a]::ScopedKey<rustc_span[f3562a9d228bc34b]::SessionGlobals>>::set::<rustc_interface[d75252421fea963]::interface::run_compiler<core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>, rustc_driver_impl[64b7dd1911194932]::run_compiler::{closure#1}>::{closure#0}, core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>
  48:     0x7f8215e5d156 - std[d9d2839bce1dd559]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d75252421fea963]::util::run_in_thread_pool_with_globals<rustc_interface[d75252421fea963]::interface::run_compiler<core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>, rustc_driver_impl[64b7dd1911194932]::run_compiler::{closure#1}>::{closure#0}, core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>
  49:     0x7f8215e5cf05 - <<std[d9d2839bce1dd559]::thread::Builder>::spawn_unchecked_<rustc_interface[d75252421fea963]::util::run_in_thread_pool_with_globals<rustc_interface[d75252421fea963]::interface::run_compiler<core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>, rustc_driver_impl[64b7dd1911194932]::run_compiler::{closure#1}>::{closure#0}, core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4a8d54be4c63c12]::result::Result<(), rustc_span[f3562a9d228bc34b]::ErrorGuaranteed>>::{closure#1} as core[b4a8d54be4c63c12]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  50:     0x7f8213776d45 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0ee7a0a44efbcb8b
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/alloc/src/boxed.rs:1985:9
  51:     0x7f8213776d45 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8f984f8b1c075279
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/alloc/src/boxed.rs:1985:9
  52:     0x7f8213776d45 - std::sys::unix::thread::Thread::new::thread_start::h054937194df87b6d
                               at /rustc/18bfe5d8a9ca0e226171e98f8f4ef071790f3352/library/std/src/sys/unix/thread.rs:108:17
  53:     0x7f82134d144b - <unknown>
  54:     0x7f8213554e40 - <unknown>
  55:                0x0 - <unknown>

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (18bfe5d8a 2023-05-14) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type rlib -C opt-level=3 -C linker-plugin-lto -Z unstable-options

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

query stack during panic:
#0 [mir_shims] generating MIR shim for `core::ptr::drop_in_place`
#1 [optimized_mir] optimizing MIR for `vec::ops::<impl at /home/sanoj/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-0.19.6/src/vec/ops.rs:141:1: 141:33>::drop::{closure#0}`
end of query stack
error: could not compile `bitvec` (lib)
warning: build failed, waiting for other jobs to finish...

I can do a bisect.

@bors bors closed this as completed in 828caa8 May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants