Skip to content

ICE: Failed to normalize while compiling smallvec #135305

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

Closed
djc opened this issue Jan 9, 2025 · 1 comment
Closed

ICE: Failed to normalize while compiling smallvec #135305

djc opened this issue Jan 9, 2025 · 1 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.

Comments

@djc
Copy link
Contributor

djc commented Jan 9, 2025

Encountered in Hickory-DNS CI, in the coverage run:

cargo +nightly llvm-cov test --workspace --no-report --all-targets --all-features
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize [Alias(Projection, AliasTy { args: [A/#0], def_id: DefId(0:329 ~ smallvec[15dc]::Array::Item), .. })], maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90:
Box<dyn Any>
stack backtrace:
   0:     0x7f5e434e3a7a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc48a3003e72a1fb5
   1:     0x7f5e43c13126 - core::fmt::write::h244b471aa97315bd
   2:     0x7f5e44b22211 - std::io::Write::write_fmt::h63cacec38f2c7922
   3:     0x7f5e434e38d2 - std::sys::backtrace::BacktraceLock::print::h8e88b30882062ce8
   4:     0x7f5e434e5e77 - std::panicking::default_hook::{{closure}}::he2b2f35b61e5b6b4
   5:     0x7f5e434e5c60 - std::panicking::default_hook::h2b9fc43053d2ca15
   6:     0x7f5e426568a8 - std[c08ade969ea4a026]::panicking::update_hook::<alloc[ecf666bc700c7d64]::boxed::Box<rustc_driver_impl[7ccddf7307cff907]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f5e434e66c3 - std::panicking::rust_panic_with_hook::h1126dbe971a7f919
   8:     0x7f5e4268ecc1 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}
   9:     0x7f5e42683ea6 - std[c08ade969ea4a026]::sys::backtrace::__rust_end_short_backtrace::<std[c08ade969ea4a026]::panicking::begin_panic<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}, !>
  10:     0x7f5e42683c63 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>
  11:     0x7f5e42698c21 - <rustc_errors[1eaa06d4a73dafc5]::diagnostic::BugAbort as rustc_errors[1eaa06d4a73dafc5]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7f5e42c6db03 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt::<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}
  13:     0x7f5e42c52b1a - rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_opt::<rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7f5e42c529ab - rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_context_opt::<rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_opt<rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7f5e40dd3d20 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::bug_fmt
  16:     0x7f5e4420f12f - <rustc_middle[bc4ae9fc2bf4235a]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[72683c14ceefff53]::fold::TypeFolder<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>::fold_ty
  17:     0x7f5e44e8b3f6 - <&rustc_middle[bc4ae9fc2bf4235a]::ty::list::RawList<(), rustc_middle[bc4ae9fc2bf4235a]::ty::generic_args::GenericArg> as rustc_type_ir[72683c14ceefff53]::fold::TypeFoldable<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[bc4ae9fc2bf4235a]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
  18:     0x7f5e431afe45 - <rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir[72683c14ceefff53]::predicate::TraitRef<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>
  19:     0x7f5e431bcb75 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_impl_path
  20:     0x7f5e431bc0b9 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  21:     0x7f5e431bc7a5 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  22:     0x7f5e431bbbd0 - rustc_symbol_mangling[403ef980f7f2d81]::v0::mangle
  23:     0x7f5e447226ae - rustc_symbol_mangling[403ef980f7f2d81]::symbol_name_provider
  24:     0x7f5e4472112a - rustc_query_impl[9bbd9b92042adb73]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9bbd9b92042adb73]::query_impl::symbol_name::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>
  25:     0x7f5e447200b7 - rustc_query_system[7c1448542a492b7f]::query::plumbing::try_execute_query::<rustc_query_impl[9bbd9b92042adb73]::DynamicConfig<rustc_query_system[7c1448542a492b7f]::query::caches::DefaultCache<rustc_middle[bc4ae9fc2bf4235a]::ty::instance::Instance, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[9bbd9b92042adb73]::plumbing::QueryCtxt, false>
  26:     0x7f5e4471fd22 - rustc_query_impl[9bbd9b92042adb73]::query_impl::symbol_name::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f5e447a968c - rustc_middle[bc4ae9fc2bf4235a]::query::plumbing::query_get_at::<rustc_query_system[7c1448542a492b7f]::query::caches::DefaultCache<rustc_middle[bc4ae9fc2bf4235a]::ty::instance::Instance, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>>
  28:     0x7f5e424dd915 - rustc_codegen_llvm[cf0745383bf2fa70]::coverageinfo::mapgen::finalize
  29:     0x7f5e4473e458 - rustc_codegen_llvm[cf0745383bf2fa70]::base::compile_codegen_unit::module_codegen
  30:     0x7f5e44be9dc8 - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  31:     0x7f5e44be612c - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::CodegenBackend>::codegen_crate
  32:     0x7f5e44bee124 - <rustc_interface[9ea0a400d5371a28]::queries::Linker>::codegen_and_build_linker
  33:     0x7f5e44b58892 - rustc_interface[9ea0a400d5371a28]::passes::create_and_enter_global_ctxt::<core[6b5cbebef9c0da3b]::option::Option<rustc_interface[9ea0a400d5371a28]::queries::Linker>, rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  34:     0x7f5e44bcba64 - rustc_interface[9ea0a400d5371a28]::interface::run_compiler::<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7f5e44a2d651 - std[c08ade969ea4a026]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_with_globals<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_pool_with_globals<rustc_interface[9ea0a400d5371a28]::interface::run_compiler<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:     0x7f5e44a2db08 - <<std[c08ade969ea4a026]::thread::Builder>::spawn_unchecked_<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_with_globals<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_pool_with_globals<rustc_interface[9ea0a400d5371a28]::interface::run_compiler<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[6b5cbebef9c0da3b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7f5e44a2f0af - std::sys::pal::unix::thread::Thread::new::thread_start::h2f2b51e924b57f78
  38:     0x7f5e3ec94ac3 - <unknown>
  39:     0x7f5e3ed26850 - <unknown>
  40:                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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smallvec-1.13.2/rustc-ice-2025-01-09T20_44_02-2178.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C instrument-coverage -C llvm-args=--instrprof-atomic-counter-update-all -C instrument-coverage

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

query stack during panic:
#0 [symbol_name] computing the symbol for `<impl at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smallvec-1.13.2/src/lib.rs:1864:1: 1864:48>::as_ref`
end of query stack
error: could not compile `smallvec` (lib)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name smallvec --edition=2018 /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smallvec-1.13.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="const_generics"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("arbitrary", "const_generics", "const_new", "debugger_visualizer", "drain_filter", "drain_keep_rest", "may_dangle", "serde", "specialization", "union", "write"))' -C metadata=0293611f57917555 -C extra-filename=-1420f6d37103f44c --out-dir /home/runner/work/hickory-dns/hickory-dns/target/llvm-cov-target/debug/deps -L dependency=/home/runner/work/hickory-dns/hickory-dns/target/llvm-cov-target/debug/deps --cap-lints allow -C instrument-coverage -C llvm-args=--instrprof-atomic-counter-update-all --cfg=coverage --cfg=trybuild_no_target -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
error: process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo test --manifest-path /home/runner/work/hickory-dns/hickory-dns/Cargo.toml --target-dir /home/runner/work/hickory-dns/hickory-dns/target/llvm-cov-target --workspace --all-targets --all-features` (exit status: 101)
@djc djc 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 Jan 9, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 9, 2025
@lqd
Copy link
Member

lqd commented Jan 9, 2025

Looks like a duplicate of #135235 which should be fixed in tomorrows nightly thanks to #135261

@djc djc closed this as completed Jan 9, 2025
@lolbinarycat lolbinarycat removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 10, 2025
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

No branches or pull requests

4 participants