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

Crash on latest rustup update #103186

Closed
douglas-raillard-arm opened this issue Oct 18, 2022 · 0 comments · Fixed by #113575
Closed

Crash on latest rustup update #103186

douglas-raillard-arm opened this issue Oct 18, 2022 · 0 comments · Fixed by #113575
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@douglas-raillard-arm
Copy link

Seems similar to this bug: #100818, and the affected toolchain seems to be the same:

This crashes with the very latest version (cargo +nightly-2022-08-19 run), but not with the previous version (cargo +nightly-2022-08-18 run)

Code

https://github.com/douglas-raillard-arm/lisa/tree/_rust_bug0

git repo: https://github.com/douglas-raillard-arm/lisa.git
branch: _rust_bug0

This is a regular cargo project hosted at:

git clone https://github.com/douglas-raillard-arm/lisa.git -b _rust_bug0 
cd lisa/tools/analysis
cargo +nightly build

I unfortunately don't have the bandwidth to make a shorter reproducer, but I'll leave this branch untouched so that I don't accidentally remove the condition that triggers the bug.

Meta

rustc --version --verbose:

$ rustc +nightly --version --verbose
rustc 1.66.0-nightly (06f049a35 2022-10-17)
binary: rustc
commit-hash: 06f049a35535d26d5c8426d4f782f78277b41aa1
commit-date: 2022-10-17
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

thread 'rustc' panicked at 'assertion failed: self.scc_universes[scc] == ty::UniverseIndex::ROOT', compiler/rustc_borrowck/src/region_infer/mod.rs:721:9
Backtrace

thread 'rustc' panicked at 'assertion failed: self.scc_universes[scc] == ty::UniverseIndex::ROOT', compiler/rustc_borrowck/src/region_infer/mod.rs:721:9
stack backtrace:
   0:     0x7f4c0d4566e0 - std::backtrace_rs::backtrace::libunwind::trace::hf5399c1603f092ca
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f4c0d4566e0 - std::backtrace_rs::backtrace::trace_unsynchronized::hc6fc34f5dc1c74f7
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4c0d4566e0 - std::sys_common::backtrace::_print_fmt::h7d798828e39235a8
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4c0d4566e0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h12c08aa7a7a9a2af
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4c0d4b25fe - core::fmt::write::h221fbc267beb0404
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f4c0d446955 - std::io::Write::write_fmt::hf386ea1c52540785
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/io/mod.rs:1682:15
   6:     0x7f4c0d4564a5 - std::sys_common::backtrace::_print::h10c29fc0c250a606
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f4c0d4564a5 - std::sys_common::backtrace::print::h37193727d9081e19
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f4c0d4592af - std::panicking::default_hook::{{closure}}::h2fbe4b072bd77d72
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/panicking.rs:267:22
   9:     0x7f4c0d458fea - std::panicking::default_hook::h47c73d4904e75e7d
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/panicking.rs:286:9
  10:     0x7f4c0fd8db24 - <rustc_driver[181439583fe95c08]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[6ac417be692c67ad]::ops::function::FnOnce<(&core[6ac417be692c67ad]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f4c0d459ad9 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h4421887e5c0b518b
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/alloc/src/boxed.rs:2001:9
  12:     0x7f4c0d459ad9 - std::panicking::rust_panic_with_hook::h1d0c42788e12b152
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/panicking.rs:692:13
  13:     0x7f4c0d459811 - std::panicking::begin_panic_handler::{{closure}}::h0792a0845aaba9b3
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/panicking.rs:577:13
  14:     0x7f4c0d456b8c - std::sys_common::backtrace::__rust_end_short_backtrace::haa99739b7e05bfed
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f4c0d459572 - rust_begin_unwind
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/panicking.rs:575:5
  16:     0x7f4c0d4aefe3 - core::panicking::panic_fmt::h85ad9577e85cebac
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/core/src/panicking.rs:65:14
  17:     0x7f4c0d4af0bd - core::panicking::panic::hb183d5e113ec83d0
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/core/src/panicking.rs:115:5
  18:     0x7f4c0ecd8261 - <rustc_borrowck[a1c5727b44b0e31b]::region_infer::RegionInferenceContext>::solve
  19:     0x7f4c0ec7974d - rustc_borrowck[a1c5727b44b0e31b]::nll::compute_regions
  20:     0x7f4c0ec4d218 - rustc_borrowck[a1c5727b44b0e31b]::do_mir_borrowck
  21:     0x7f4c0ec4bb40 - rustc_borrowck[a1c5727b44b0e31b]::mir_borrowck
  22:     0x7f4c0ec4b4d1 - <rustc_borrowck[a1c5727b44b0e31b]::provide::{closure#0} as core[6ac417be692c67ad]::ops::function::FnOnce<(rustc_middle[795a42170b3d99e3]::ty::context::TyCtxt, rustc_span[28f29e83648bb1dc]::def_id::LocalDefId)>>::call_once
  23:     0x7f4c0f215553 - <rustc_query_system[8ada4aed46307517]::dep_graph::graph::DepGraph<rustc_middle[795a42170b3d99e3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[795a42170b3d99e3]::ty::context::TyCtxt, rustc_span[28f29e83648bb1dc]::def_id::LocalDefId, &rustc_middle[795a42170b3d99e3]::mir::query::BorrowCheckResult>
  24:     0x7f4c0f214781 - rustc_query_system[8ada4aed46307517]::query::plumbing::try_execute_query::<rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt, rustc_query_system[8ada4aed46307517]::query::caches::DefaultCache<rustc_span[28f29e83648bb1dc]::def_id::LocalDefId, &rustc_middle[795a42170b3d99e3]::mir::query::BorrowCheckResult>>
  25:     0x7f4c0fc54a8e - <rustc_query_impl[420a61a611c5dd58]::Queries as rustc_middle[795a42170b3d99e3]::ty::query::QueryEngine>::mir_borrowck
  26:     0x7f4c0fff384d - <rustc_hir_analysis[4e2e3bda43d4c09a]::collect::type_of::find_opaque_ty_constraints_for_tait::ConstraintLocator>::check
  27:     0x7f4c0ffec691 - <rustc_hir_analysis[4e2e3bda43d4c09a]::collect::type_of::find_opaque_ty_constraints_for_tait::ConstraintLocator as rustc_hir[5ffb9d7504f637db]::intravisit::Visitor>::visit_nested_item
  28:     0x7f4c100348d9 - rustc_hir[5ffb9d7504f637db]::intravisit::walk_item::<rustc_hir_analysis[4e2e3bda43d4c09a]::collect::type_of::find_opaque_ty_constraints_for_tait::ConstraintLocator>
  29:     0x7f4c0fff3174 - rustc_hir_analysis[4e2e3bda43d4c09a]::collect::type_of::find_opaque_ty_constraints_for_tait
  30:     0x7f4c0fa1532f - rustc_hir_analysis[4e2e3bda43d4c09a]::collect::type_of::type_of
  31:     0x7f4c0f22a293 - <rustc_query_system[8ada4aed46307517]::dep_graph::graph::DepGraph<rustc_middle[795a42170b3d99e3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[795a42170b3d99e3]::ty::context::TyCtxt, rustc_span[28f29e83648bb1dc]::def_id::DefId, rustc_middle[795a42170b3d99e3]::ty::Ty>
  32:     0x7f4c0f228716 - rustc_query_system[8ada4aed46307517]::query::plumbing::get_query::<rustc_query_impl[420a61a611c5dd58]::queries::type_of, rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt>
  33:     0x7f4c0f400d1a - rustc_hir_analysis[4e2e3bda43d4c09a]::check::check::check_mod_item_types
  34:     0x7f4c0f3ed4e3 - <rustc_query_system[8ada4aed46307517]::dep_graph::graph::DepGraph<rustc_middle[795a42170b3d99e3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[795a42170b3d99e3]::ty::context::TyCtxt, rustc_span[28f29e83648bb1dc]::def_id::LocalDefId, ()>
  35:     0x7f4c0f3ec57b - rustc_query_system[8ada4aed46307517]::query::plumbing::try_execute_query::<rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt, rustc_query_system[8ada4aed46307517]::query::caches::DefaultCache<rustc_span[28f29e83648bb1dc]::def_id::LocalDefId, ()>>
  36:     0x7f4c0f7b3b59 - rustc_query_system[8ada4aed46307517]::query::plumbing::get_query::<rustc_query_impl[420a61a611c5dd58]::queries::check_mod_item_types, rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt>
  37:     0x7f4c0fa75ccc - <rustc_middle[795a42170b3d99e3]::hir::map::Map>::for_each_module::<rustc_hir_analysis[4e2e3bda43d4c09a]::check_crate::{closure#6}::{closure#0}>
  38:     0x7f4c0f7748f5 - rustc_hir_analysis[4e2e3bda43d4c09a]::check_crate
  39:     0x7f4c0f774427 - rustc_interface[41d053c15137b84f]::passes::analysis
  40:     0x7f4c0fb1d476 - <rustc_query_system[8ada4aed46307517]::dep_graph::graph::DepGraph<rustc_middle[795a42170b3d99e3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[795a42170b3d99e3]::ty::context::TyCtxt, (), core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>
  41:     0x7f4c0fb1c816 - rustc_query_system[8ada4aed46307517]::query::plumbing::try_execute_query::<rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt, rustc_query_system[8ada4aed46307517]::query::caches::DefaultCache<(), core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>>
  42:     0x7f4c0fb1c2f7 - rustc_query_system[8ada4aed46307517]::query::plumbing::get_query::<rustc_query_impl[420a61a611c5dd58]::queries::analysis, rustc_query_impl[420a61a611c5dd58]::plumbing::QueryCtxt>
  43:     0x7f4c0ead95d3 - <rustc_interface[41d053c15137b84f]::passes::QueryContext>::enter::<rustc_driver[181439583fe95c08]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>
  44:     0x7f4c0ead23f8 - rustc_interface[41d053c15137b84f]::interface::create_compiler_and_run::<core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>, rustc_driver[181439583fe95c08]::run_compiler::{closure#1}>
  45:     0x7f4c0ead1222 - <scoped_tls[b19fcb3c094ee1b2]::ScopedKey<rustc_span[28f29e83648bb1dc]::SessionGlobals>>::set::<rustc_interface[41d053c15137b84f]::interface::run_compiler<core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>, rustc_driver[181439583fe95c08]::run_compiler::{closure#1}>::{closure#0}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>
  46:     0x7f4c0ead06ff - std[1a5ff7869c816d02]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[41d053c15137b84f]::util::run_in_thread_pool_with_globals<rustc_interface[41d053c15137b84f]::interface::run_compiler<core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>, rustc_driver[181439583fe95c08]::run_compiler::{closure#1}>::{closure#0}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>::{closure#0}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>
  47:     0x7f4c0fba569f - <<std[1a5ff7869c816d02]::thread::Builder>::spawn_unchecked_<rustc_interface[41d053c15137b84f]::util::run_in_thread_pool_with_globals<rustc_interface[41d053c15137b84f]::interface::run_compiler<core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>, rustc_driver[181439583fe95c08]::run_compiler::{closure#1}>::{closure#0}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>::{closure#0}, core[6ac417be692c67ad]::result::Result<(), rustc_errors[c8e62c7c8f965cff]::ErrorGuaranteed>>::{closure#1} as core[6ac417be692c67ad]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  48:     0x7f4c0d4635f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2ca88d58e081c26e
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/alloc/src/boxed.rs:1987:9
  49:     0x7f4c0d4635f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfd67fbb55bd279bb
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/alloc/src/boxed.rs:1987:9
  50:     0x7f4c0d4635f3 - std::sys::unix::thread::Thread::new::thread_start::h57c955ceb7a2ded2
                               at /rustc/06f049a35535d26d5c8426d4f782f78277b41aa1/library/std/src/sys/unix/thread.rs:108:17
  51:     0x7f4c0d31b609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  52:     0x7f4c0d23e133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  53:                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.66.0-nightly (06f049a35 2022-10-17) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -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 `analysis::both`
#1 [type_of] computing type of `analysis::BothUpdateFn::{opaque#0}`
#2 [check_mod_item_types] checking item types in module `analysis`
#3 [analysis] running analysis passes on this crate
end of query stack

@douglas-raillard-arm douglas-raillard-arm 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 Oct 18, 2022
@JohnTitor JohnTitor added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Mar 3, 2023
@bors bors closed this as completed in 03181e0 Aug 4, 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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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.

2 participants