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 Alias in normalize_erasing_regions.rs:168:90 when compiling serde v1.0.217 #135282

Closed
gendx 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

@gendx
Copy link

gendx commented Jan 9, 2025

Code

This commit (bug triggered in this CI job), but the error points to the compilation of serde v1.0.217.

This code was compiled with cargo llvm-cov (GitHub workflow file).

Meta

rustc --version --verbose:

rustc 1.86.0-nightly (a580b5c37 2025-01-08)
binary: rustc
commit-hash: a580b5c379b4fca50dfe5afc0fc0ce00921e4e00
commit-date: 2025-01-08
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.6

Error output

error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize Alias(Projection, AliasTy { args: [A/#1, '{erased}], def_id: DefId(0:1611 ~ serde[919f]::de::SeqAccess::Error), .. }), maybe try to call `try_normalize_erasing_regions` instead
Backtrace

thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90:
Box<dyn Any>
stack backtrace:
   0:     0x7f24478e3a7a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc48a3003e72a1fb5
   1:     0x7f2448013126 - core::fmt::write::h244b471aa97315bd
   2:     0x7f2448f22211 - std::io::Write::write_fmt::h63cacec38f2c7922
   3:     0x7f24478e38d2 - std::sys::backtrace::BacktraceLock::print::h8e88b30882062ce8
   4:     0x7f24478e5e77 - std::panicking::default_hook::{{closure}}::he2b2f35b61e5b6b4
   5:     0x7f24478e5c60 - std::panicking::default_hook::h2b9fc43053d2ca15
   6:     0x7f2446a568a8 - std[c08ade969ea4a026]::panicking::update_hook::<alloc[ecf666bc700c7d64]::boxed::Box<rustc_driver_impl[7ccddf7307cff907]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f24478e66c3 - std::panicking::rust_panic_with_hook::h1126dbe971a7f919
   8:     0x7f2446a8ecc1 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}
   9:     0x7f2446a83ea6 - std[c08ade969ea4a026]::sys::backtrace::__rust_end_short_backtrace::<std[c08ade969ea4a026]::panicking::begin_panic<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}, !>
  10:     0x7f2446a83c63 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>
  11:     0x7f2446a98c21 - <rustc_errors[1eaa06d4a73dafc5]::diagnostic::BugAbort as rustc_errors[1eaa06d4a73dafc5]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7f244706db03 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt::<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}
  13:     0x7f2447052b1a - 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:     0x7f24470529ab - 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:     0x7f24451d3d20 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::bug_fmt
  16:     0x7f244860f12f - <rustc_middle[bc4ae9fc2bf4235a]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[72683c14ceefff53]::fold::TypeFolder<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>::fold_ty
  17:     0x7f244928b513 - <&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:     0x7f24475afe45 - <rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir[72683c14ceefff53]::predicate::TraitRef<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>
  19:     0x7f24475bcb75 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_impl_path
  20:     0x7f24475bc0b9 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  21:     0x7f24475bc7a5 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  22:     0x7f24475bbbd0 - rustc_symbol_mangling[403ef980f7f2d81]::v0::mangle
  23:     0x7f2448b226ae - rustc_symbol_mangling[403ef980f7f2d81]::symbol_name_provider
  24:     0x7f2448b2112a - 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:     0x7f2448b200b7 - 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:     0x7f2448b1fd22 - rustc_query_impl[9bbd9b92042adb73]::query_impl::symbol_name::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f2448ba968c - 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:     0x7f24468dd915 - rustc_codegen_llvm[cf0745383bf2fa70]::coverageinfo::mapgen::finalize
  29:     0x7f2448b3e458 - rustc_codegen_llvm[cf0745383bf2fa70]::base::compile_codegen_unit::module_codegen
  30:     0x7f2448fe9dc8 - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  31:     0x7f2448fe612c - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::CodegenBackend>::codegen_crate
  32:     0x7f2448fee124 - <rustc_interface[9ea0a400d5371a28]::queries::Linker>::codegen_and_build_linker 
  33:     0x7f2448f58892 - 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:     0x7f2448fcba64 - rustc_interface[9ea0a400d5371a28]::interface::run_compiler::<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7f2448e2d651 - 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:     0x7f2448e2db08 - <<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:     0x7f2448e2f0af - std::sys::pal::unix::thread::Thread::new::thread_start::h2f2b51e924b57f78
  38:     0x7f244309ca94 - <unknown>
  39:     0x7f2443129c3c - <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/serde-1.0.217/rustc-ice-2025-01-09T09_20_55-2450.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C strip=debuginfo -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 `de::value::<impl at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.217/src/de/value.rs:1212:1: 1214:27>::into_deserializer`
end of query stack
error: could not compile `serde` (lib)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name serde --edition=2018 /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.217/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="serde_derive"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "default", "derive", "rc", "serde_derive", "std", "unstable"))' -C metadata=d1aeed70bd753f95 -C extra-filename=-3c8ea9ebab198cd4 --out-dir /home/runner/work/paralight/paralight/target/llvm-cov-target/release/deps -C strip=debuginfo -L dependency=/home/runner/work/paralight/paralight/target/llvm-cov-target/release/deps --extern serde_derive=/home/runner/work/paralight/paralight/target/llvm-cov-target/release/deps/libserde_derive-2c5fe0e27c7ebe06.so --cap-lints allow -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target --check-cfg 'cfg(no_core_cstr)' --check-cfg 'cfg(no_core_error)' --check-cfg 'cfg(no_core_net)' --check-cfg 'cfg(no_core_num_saturating)' --check-cfg 'cfg(no_core_try_from)' --check-cfg 'cfg(no_diagnostic_namespace)' --check-cfg 'cfg(no_float_copysign)' --check-cfg 'cfg(no_num_nonzero_signed)' --check-cfg 'cfg(no_relaxed_trait_bounds)' --check-cfg 'cfg(no_serde_derive)' --check-cfg 'cfg(no_std_atomic)' --check-cfg 'cfg(no_std_atomic64)' --check-cfg 'cfg(no_systemtime_checked_add)' --check-cfg 'cfg(no_target_has_atomic)'` (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 --tests --release --manifest-path /home/runner/work/paralight/paralight/Cargo.toml --target-dir /home/runner/work/paralight/paralight/target/llvm-cov-target --no-default-features --features log,log_parallelism,nightly_tests --workspace` (exit status: 101)
Error: Process completed with exit code 1.

@gendx gendx 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
@jieyouxu
Copy link
Member

jieyouxu commented Jan 9, 2025

Thanks for the report, I believe this is a duplicate of #135235.

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

3 participants