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

the compiler unexpectedly panicked #101927

Closed
SKumarMetro opened this issue Sep 17, 2022 · 3 comments
Closed

the compiler unexpectedly panicked #101927

SKumarMetro opened this issue Sep 17, 2022 · 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

@SKumarMetro
Copy link

SKumarMetro commented Sep 17, 2022

   Compiling jsonrpsee-types v0.9.0
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DefId(0:345 ~ tower[a767]::balance::pool::{impl#3}::build) (CanonicalUserTypeAnnotation { user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }], value: TypeOf(DefId(0:232 ~ tower[a767]::balance::p2c::service::{impl#1}::new), UserSubsts { substs: [^0, ^1], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[a767]::balance::p2c::service::{impl#1}), self_ty: balance::p2c::service::Balance<^2, ^3> }) }) }, span: /Users/suresh/.cargo/registry/src/github.com-1ecc6299db9ec823/tower-0.4.13/src/balance/pool/mod.rs:293:22: 293:34 (#0), inferred_ty: fn(std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>) -> balance::p2c::service::Balance<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request> {balance::p2c::service::Balance::<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request>::new} }): bad user type AscribeUserType(fn(std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>) -> balance::p2c::service::Balance<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request> {balance::p2c::service::Balance::<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request>::new}, DefId(0:232 ~ tower[a767]::balance::p2c::service::{impl#1}::new) UserSubsts { substs: [_, _], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[a767]::balance::p2c::service::{impl#1}), self_ty: balance::p2c::service::Balance<_, _> }) }, type_of=fn(D) -> balance::p2c::service::Balance<D, Req> {balance::p2c::service::Balance::<D, Req>::new}): NoSolution
  |
  = note: delayed at compiler/rustc_borrowck/src/type_check/mod.rs:1087:25

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1492:13
stack backtrace:
   0:        0x10503d562 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7c606ed39af3c977
   1:        0x105094cda - core::fmt::write::hd050c91eba8ab2b4
   2:        0x10502f5dc - std::io::Write::write_fmt::h3f5cc8884c999cca
   3:        0x10504044b - std::panicking::default_hook::{{closure}}::h2107e030d5e79fab
   4:        0x105040157 - std::panicking::default_hook::h455d96c131ddf744
   5:        0x112e129ea - rustc_driver[82b50a4d5b7f2fa0]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x105040b7e - std::panicking::rust_panic_with_hook::haf931a0c2a6e5b0c
   7:        0x117813757 - std[7415c8c995e59273]::panicking::begin_panic::<rustc_errors[5795b0248035ffe8]::ExplicitBug>::{closure#0}
   8:        0x117812f09 - std[7415c8c995e59273]::sys_common::backtrace::__rust_end_short_backtrace::<std[7415c8c995e59273]::panicking::begin_panic<rustc_errors[5795b0248035ffe8]::ExplicitBug>::{closure#0}, !>
   9:        0x117b78c69 - std[7415c8c995e59273]::panicking::begin_panic::<rustc_errors[5795b0248035ffe8]::ExplicitBug>
  10:        0x117808289 - std[7415c8c995e59273]::panic::panic_any::<rustc_errors[5795b0248035ffe8]::ExplicitBug>
  11:        0x11780cd47 - <rustc_errors[5795b0248035ffe8]::HandlerInner as core[e75ec226292a4799]::ops::drop::Drop>::drop
  12:        0x112e41f0a - core[e75ec226292a4799]::ptr::drop_in_place::<rustc_session[737c48d2e88decc6]::parse::ParseSess>
  13:        0x112e4897b - <alloc[d9e3a1f03acd69e7]::rc::Rc<rustc_session[737c48d2e88decc6]::session::Session> as core[e75ec226292a4799]::ops::drop::Drop>::drop
  14:        0x112e2e9f2 - core[e75ec226292a4799]::ptr::drop_in_place::<rustc_interface[7232c8082d234140]::interface::Compiler>
  15:        0x112e18cdf - rustc_interface[7232c8082d234140]::interface::create_compiler_and_run::<core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>, rustc_driver[82b50a4d5b7f2fa0]::run_compiler::{closure#1}>
  16:        0x112e8c535 - <scoped_tls[c3943e6b81e4160f]::ScopedKey<rustc_span[ae2349af12ca5e5a]::SessionGlobals>>::set::<rustc_interface[7232c8082d234140]::interface::run_compiler<core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>, rustc_driver[82b50a4d5b7f2fa0]::run_compiler::{closure#1}>::{closure#0}, core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>>
  17:        0x112e4f93a - std[7415c8c995e59273]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7232c8082d234140]::util::run_in_thread_pool_with_globals<rustc_interface[7232c8082d234140]::interface::run_compiler<core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>, rustc_driver[82b50a4d5b7f2fa0]::run_compiler::{closure#1}>::{closure#0}, core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>>::{closure#0}, core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>>
  18:        0x112e53068 - <<std[7415c8c995e59273]::thread::Builder>::spawn_unchecked_<rustc_interface[7232c8082d234140]::util::run_in_thread_pool_with_globals<rustc_interface[7232c8082d234140]::interface::run_compiler<core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>, rustc_driver[82b50a4d5b7f2fa0]::run_compiler::{closure#1}>::{closure#0}, core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>>::{closure#0}, core[e75ec226292a4799]::result::Result<(), rustc_errors[5795b0248035ffe8]::ErrorGuaranteed>>::{closure#1} as core[e75ec226292a4799]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  19:        0x105049ae7 - std::sys::unix::thread::Thread::new::thread_start::he90b8cf058ff781c
  20:     0x7ff81d0b14e1 - __pthread_start

note: the compiler unexpectedly panicked. this is a bug.
@SKumarMetro SKumarMetro 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 Sep 17, 2022
@SKumarMetro
Copy link
Author

export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off"

These are the flags used, when I remove -Zprofile then don't see the compier panic.

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Sep 17, 2022

Could you please share the code to reproduce this ICE?

@matthiaskrgr
Copy link
Member

Duplicate of #101844 , should be fixed with todays nightly

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