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

nightly from 2023-10-31 can't compile icu4x - crashes with an ICE #117492

Closed
durin42 opened this issue Nov 1, 2023 · 3 comments
Closed

nightly from 2023-10-31 can't compile icu4x - crashes with an ICE #117492

durin42 opened this issue Nov 1, 2023 · 3 comments
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

@durin42
Copy link
Contributor

durin42 commented Nov 1, 2023

Code

I caught this doing an upgrade of rustc nightly in our monorepo. I can reproduce the failure using https://github.com/unicode-org/icu4x and cargo test in the repo root - I'll see about follow-up work to try and reduce it etc, but wanted to file the bug ASAP.

Meta

rustc --version --verbose:

rustc 1.75.0-nightly (9d83ac217 2023-10-31)
binary: rustc
commit-hash: 9d83ac217957eece2189eccf4a7232caec7232ee
commit-date: 2023-10-31
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.3

Error output

error: could not compile `icu_provider_blob` (lib)
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at compiler/rustc_infer/src/infer/outlives/test_type_match.rs:46:5:
assertion failed: !verify_if_eq_b.has_escaping_bound_vars()
stack backtrace:
   0:     0x7f9b86f69cfc - std::backtrace_rs::backtrace::libunwind::trace::h1c0d6c1feff90834
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f9b86f69cfc - std::backtrace_rs::backtrace::trace_unsynchronized::he4dc4a997c5ae9a3
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9b86f69cfc - std::sys_common::backtrace::_print_fmt::h5a4f8cab839a8801
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f9b86f69cfc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h633d15e63f261bac
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f9b86fcbf50 - core::fmt::rt::Argument::fmt::h7bd3372d26ac29ee
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/fmt/rt.rs:142:9
   5:     0x7f9b86fcbf50 - core::fmt::write::h81c224801dea0c8c
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/fmt/mod.rs:1117:17
   6:     0x7f9b86f5dc1f - std::io::Write::write_fmt::h5d5fd4c0f9d7aaa2
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/io/mod.rs:1763:15
   7:     0x7f9b86f69ae4 - std::sys_common::backtrace::_print::hae2beb76b35b9dac
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f9b86f69ae4 - std::sys_common::backtrace::print::hbc2e16b509b271b5
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f9b86f6c777 - std::panicking::default_hook::{{closure}}::hdd572dcbcaa64ada
  10:     0x7f9b86f6c4df - std::panicking::default_hook::h3f7cc4d3b39ae3db
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/panicking.rs:292:9
  11:     0x7f9b89ae24f0 - std[75c6166aa02c8cf6]::panicking::update_hook::<alloc[89c5f4ce44f84c28]::boxed::Box<rustc_driver_impl[8683beda356c97ae]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f9b86f6ceb8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h9679028235a1e1c1
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/alloc/src/boxed.rs:2021:9
  13:     0x7f9b86f6ceb8 - std::panicking::rust_panic_with_hook::hd2051524a5282492
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/panicking.rs:783:13
  14:     0x7f9b86f6cbd9 - std::panicking::begin_panic_handler::{{closure}}::h699c051ec6e2b537
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/panicking.rs:649:13
  15:     0x7f9b86f6a1c6 - std::sys_common::backtrace::__rust_end_short_backtrace::h5d4269c5675c7d12
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7f9b86f6c972 - rust_begin_unwind
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/panicking.rs:645:5
  17:     0x7f9b86fc8675 - core::panicking::panic_fmt::hd8a918fb3507036f
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/panicking.rs:72:14
  18:     0x7f9b86fc8713 - core::panicking::panic::h3d02fed75a814cd3
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/panicking.rs:127:5
  19:     0x7f9b8bbe76c5 - rustc_infer[5a3154a4da0b7220]::infer::outlives::test_type_match::extract_verify_if_eq
  20:     0x7f9b8bdf422e - <core[b9f207e078deabe9]::iter::adapters::filter_map::FilterMap<core[b9f207e078deabe9]::iter::adapters::chain::Chain<rustc_middle[8603c91d0eb8a1dd]::ty::generic_args::IterInstantiated<&rustc_middle[8603c91d0eb8a1dd]::ty::list::List<rustc_middle[8603c91d0eb8a1dd]::ty::Clause>>, core[b9f207e078deabe9]::iter::adapters::copied::Copied<core[b9f207e078deabe9]::slice::iter::Iter<rustc_middle[8603c91d0eb8a1dd]::ty::Clause>>>, <rustc_infer[5a3154a4da0b7220]::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck[6c6400a0a3b5eec2]::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle[8603c91d0eb8a1dd]::ty::generic_args::GenericArg>::{closure#0}> as rustc_type_ir[ef25096afbba3fa8]::visit::TypeVisitor<rustc_middle[8603c91d0eb8a1dd]::ty::context::TyCtxt>>::visit_ty::{closure#0}> as core[b9f207e078deabe9]::iter::traits::iterator::Iterator>::next.cold.0
  21:     0x7f9b8af639b5 - <rustc_infer[5a3154a4da0b7220]::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck[6c6400a0a3b5eec2]::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle[8603c91d0eb8a1dd]::ty::Ty>::{closure#0}> as rustc_type_ir[ef25096afbba3fa8]::visit::TypeVisitor<rustc_middle[8603c91d0eb8a1dd]::ty::context::TyCtxt>>::visit_ty
  22:     0x7f9b8af62c40 - <rustc_infer[5a3154a4da0b7220]::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck[6c6400a0a3b5eec2]::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle[8603c91d0eb8a1dd]::ty::Ty>::{closure#0}> as rustc_type_ir[ef25096afbba3fa8]::visit::TypeVisitor<rustc_middle[8603c91d0eb8a1dd]::ty::context::TyCtxt>>::visit_ty
  23:     0x7f9b8af63378 - <rustc_infer[5a3154a4da0b7220]::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck[6c6400a0a3b5eec2]::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle[8603c91d0eb8a1dd]::ty::Ty>::{closure#0}> as rustc_type_ir[ef25096afbba3fa8]::visit::TypeVisitor<rustc_middle[8603c91d0eb8a1dd]::ty::context::TyCtxt>>::visit_ty
  24:     0x7f9b8b902384 - rustc_borrowck[6c6400a0a3b5eec2]::type_check::liveness::trace::trace
  25:     0x7f9b8b5376ff - rustc_borrowck[6c6400a0a3b5eec2]::type_check::type_check
  26:     0x7f9b88415da3 - rustc_borrowck[6c6400a0a3b5eec2]::nll::compute_regions
  27:     0x7f9b8b9d0e8d - rustc_borrowck[6c6400a0a3b5eec2]::do_mir_borrowck
  28:     0x7f9b8b9c0fd7 - rustc_borrowck[6c6400a0a3b5eec2]::mir_borrowck
  29:     0x7f9b8b9c0b97 - rustc_query_impl[5e0ea37d46400eed]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5e0ea37d46400eed]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8603c91d0eb8a1dd]::query::erase::Erased<[u8; 8usize]>>
  30:     0x7f9b8b450e5d - rustc_query_system[ef1bfe6a15550406]::query::plumbing::try_execute_query::<rustc_query_impl[5e0ea37d46400eed]::DynamicConfig<rustc_query_system[ef1bfe6a15550406]::query::caches::VecCache<rustc_span[83a6b6e41b66ef87]::def_id::LocalDefId, rustc_middle[8603c91d0eb8a1dd]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[5e0ea37d46400eed]::plumbing::QueryCtxt, true>
  31:     0x7f9b8b448173 - rustc_query_impl[5e0ea37d46400eed]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
  32:     0x7f9b8b4488c8 - rustc_interface[3a72e031d92d94c4]::passes::analysis
  33:     0x7f9b8b4481b5 - rustc_query_impl[5e0ea37d46400eed]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5e0ea37d46400eed]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8603c91d0eb8a1dd]::query::erase::Erased<[u8; 1usize]>>
  34:     0x7f9b8b723e84 - rustc_query_system[ef1bfe6a15550406]::query::plumbing::try_execute_query::<rustc_query_impl[5e0ea37d46400eed]::DynamicConfig<rustc_query_system[ef1bfe6a15550406]::query::caches::SingleCache<rustc_middle[8603c91d0eb8a1dd]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[5e0ea37d46400eed]::plumbing::QueryCtxt, true>
  35:     0x7f9b8b723b60 - rustc_query_impl[5e0ea37d46400eed]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  36:     0x7f9b8b953ac3 - std[75c6166aa02c8cf6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3a72e031d92d94c4]::util::run_in_thread_with_globals<rustc_interface[3a72e031d92d94c4]::interface::run_compiler<core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>, rustc_driver_impl[8683beda356c97ae]::run_compiler::{closure#1}>::{closure#0}, core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>>
  37:     0x7f9b8b952d89 - <<std[75c6166aa02c8cf6]::thread::Builder>::spawn_unchecked_<rustc_interface[3a72e031d92d94c4]::util::run_in_thread_with_globals<rustc_interface[3a72e031d92d94c4]::interface::run_compiler<core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>, rustc_driver_impl[8683beda356c97ae]::run_compiler::{closure#1}>::{closure#0}, core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b9f207e078deabe9]::result::Result<(), rustc_span[83a6b6e41b66ef87]::ErrorGuaranteed>>::{closure#1} as core[b9f207e078deabe9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:     0x7f9b86f77c85 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbb07097450ba441f
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/alloc/src/boxed.rs:2007:9
  39:     0x7f9b86f77c85 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1e066a6f7b5acdb1
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/alloc/src/boxed.rs:2007:9
  40:     0x7f9b86f77c85 - std::sys::unix::thread::Thread::new::thread_start::h35349caae5713e8a
                               at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/sys/unix/thread.rs:108:17
  41:     0x7f9b86d3d3ec - start_thread
                               at ./nptl/pthread_create.c:444:8
  42:     0x7f9b86dbda4c - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  43:                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: please attach the file at `/usr/local/google/home/augie/icu4x/rustc-ice-2023-11-01T17_37_16-3009334.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [mir_borrowck] borrow-checking `expander::<impl at components/locid_transform/src/expander.rs:184:1: 184:20>::try_new_compat`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `icu_locid_transform` (lib)
Backtrace

stack backtrace:
   0: rust_begin_unwind
             at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/9d83ac217957eece2189eccf4a7232caec7232ee/library/core/src/panicking.rs:127:5
   3: rustc_infer::infer::outlives::test_type_match::extract_verify_if_eq
   4: <core::iter::adapters::filter_map::FilterMap<core::iter::adapters::chain::Chain<rustc_middle::ty::generic_args::IterInstantiated<&rustc_middle::ty::list::List<rustc_middle::ty::Clause>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Clause>>>, <rustc_infer::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle::ty::generic_args::GenericArg>::{closure#0}> as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty::{closure#0}> as core::iter::traits::iterator::Iterator>::next.cold.0
   5: <rustc_infer::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle::ty::Ty>::{closure#0}> as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
   6: <rustc_infer::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle::ty::Ty>::{closure#0}> as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
   7: <rustc_infer::infer::outlives::for_liveness::FreeRegionsVisitor<<rustc_borrowck::type_check::liveness::trace::LivenessContext>::make_all_regions_live<rustc_middle::ty::Ty>::{closure#0}> as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
   8: rustc_borrowck::type_check::liveness::trace::trace
   9: rustc_borrowck::type_check::type_check
  10: rustc_borrowck::nll::compute_regions
  11: rustc_borrowck::do_mir_borrowck
  12: rustc_borrowck::mir_borrowck
      [... omitted 1 frame ...]
  13: rustc_interface::passes::analysis
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@durin42 durin42 added 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. C-bug Category: This is a bug. labels Nov 1, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 1, 2023
@durin42
Copy link
Contributor Author

durin42 commented Nov 1, 2023

@durin42
Copy link
Contributor Author

durin42 commented Nov 1, 2023

cargo bisect-nightly --start=2023-10-23 --end=2023-10-31 --regress=ice says that it's ec2b311 first present in the 2023-10-30 nightly.

@durin42
Copy link
Contributor Author

durin42 commented Nov 1, 2023

Whoops, this is a dupe of #117455. I guess I should have known Manish would beat me to this.

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

No branches or pull requests

3 participants