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 in nightly while compiling tower #101856

Closed
tdelabro opened this issue Sep 15, 2022 · 1 comment
Closed

ICE in nightly while compiling tower #101856

tdelabro opened this issue Sep 15, 2022 · 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

@tdelabro
Copy link
Contributor

tdelabro commented Sep 15, 2022

Code

I don't know what part of my code is responsible for this.

Meta

rustc +nightly --version --verbose:

rustc 1.65.0-nightly (750bd1a7f 2022-09-14)
binary: rustc
commit-hash: 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c
commit-date: 2022-09-14
host: aarch64-apple-darwin
release: 1.65.0-nightly
LLVM version: 15.0.0

Error output

cargo +nightly build
   Compiling migrations_macros v1.4.2
   Compiling marketplace-domain v0.0.1 (/Users/tdelabro/Documents/only-dust/deathnote-contributions-feeder/marketplace-domain)
   Compiling tower v0.4.13
   Compiling rocket_okapi v0.8.0-rc.2
   Compiling tonic-build v0.7.2
   Compiling axum-core v0.2.7
   Compiling http-api-problem v0.53.0
   Compiling diesel_migrations v1.4.0
   Compiling marketplace-indexer v0.1.0 (/Users/tdelabro/Documents/only-dust/deathnote-contributions-feeder/marketplace-indexer)
   Compiling tower-http v0.3.4
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DefId(0:345 ~ tower[4925]::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[4925]::balance::p2c::service::{impl#1}::new), UserSubsts { substs: [^0, ^1], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[4925]::balance::p2c::service::{impl#1}), self_ty: balance::p2c::service::Balance<^2, ^3> }) }) }, span: /Users/tdelabro/.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[4925]::balance::p2c::service::{impl#1}::new) UserSubsts { substs: [_, _], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[4925]::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:        0x10353b674 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h73e970e05a6bf6f4
   1:        0x103585cb0 - core::fmt::write::hd9cd64c16d8fd98c
   2:        0x10352e614 - std::io::Write::write_fmt::h5d2b2d095caf1139
   3:        0x10353def0 - std::panicking::default_hook::{{closure}}::ha6c7c7f01b1b2a1f
   4:        0x10353dc14 - std::panicking::default_hook::hcaed88806e48b30d
   5:        0x10b39284c - rustc_driver[204a304eb552b27e]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x10353e5b4 - std::panicking::rust_panic_with_hook::hf035e6e087d07291
   7:        0x10f2afc08 - std[c0c9dc31ce531edb]::panicking::begin_panic::<rustc_errors[2a3cc773c9beae6c]::ExplicitBug>::{closure#0}
   8:        0x10f2af3a0 - std[c0c9dc31ce531edb]::sys_common::backtrace::__rust_end_short_backtrace::<std[c0c9dc31ce531edb]::panicking::begin_panic<rustc_errors[2a3cc773c9beae6c]::ExplicitBug>::{closure#0}, !>
   9:        0x10f59cde0 - std[c0c9dc31ce531edb]::panicking::begin_panic::<rustc_errors[2a3cc773c9beae6c]::ExplicitBug>
  10:        0x10f2a7580 - std[c0c9dc31ce531edb]::panic::panic_any::<rustc_errors[2a3cc773c9beae6c]::ExplicitBug>
  11:        0x10f2aa084 - <rustc_errors[2a3cc773c9beae6c]::HandlerInner as core[390033399dd91e36]::ops::drop::Drop>::drop
  12:        0x10b3baa18 - core[390033399dd91e36]::ptr::drop_in_place::<rustc_session[75643165ebe3368e]::parse::ParseSess>
  13:        0x10b3c0960 - <alloc[1508344f4503e9d8]::rc::Rc<rustc_session[75643165ebe3368e]::session::Session> as core[390033399dd91e36]::ops::drop::Drop>::drop
  14:        0x10b3a89fc - core[390033399dd91e36]::ptr::drop_in_place::<rustc_interface[3b34bd2c42adabcd]::interface::Compiler>
  15:        0x10b3ae228 - rustc_interface[3b34bd2c42adabcd]::interface::create_compiler_and_run::<core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>, rustc_driver[204a304eb552b27e]::run_compiler::{closure#1}>
  16:        0x10b3fb7bc - <scoped_tls[23c3db75e03351d0]::ScopedKey<rustc_span[9eaf7bb8bc869ca5]::SessionGlobals>>::set::<rustc_interface[3b34bd2c42adabcd]::interface::run_compiler<core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>, rustc_driver[204a304eb552b27e]::run_compiler::{closure#1}>::{closure#0}, core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>>
  17:        0x10b3c6f2c - std[c0c9dc31ce531edb]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3b34bd2c42adabcd]::util::run_in_thread_pool_with_globals<rustc_interface[3b34bd2c42adabcd]::interface::run_compiler<core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>, rustc_driver[204a304eb552b27e]::run_compiler::{closure#1}>::{closure#0}, core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>>::{closure#0}, core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>>
  18:        0x10b3c9db0 - <<std[c0c9dc31ce531edb]::thread::Builder>::spawn_unchecked_<rustc_interface[3b34bd2c42adabcd]::util::run_in_thread_pool_with_globals<rustc_interface[3b34bd2c42adabcd]::interface::run_compiler<core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>, rustc_driver[204a304eb552b27e]::run_compiler::{closure#1}>::{closure#0}, core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>>::{closure#0}, core[390033399dd91e36]::result::Result<(), rustc_errors[2a3cc773c9beae6c]::ErrorGuaranteed>>::{closure#1} as core[390033399dd91e36]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  19:        0x103546450 - std::sys::unix::thread::Thread::new::thread_start::habfef6fa3f2b24db
  20:        0x1b2fec26c - __pthread_deallocate

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.65.0-nightly (750bd1a7f 2022-09-14) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2

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

query stack during panic:
end of query stack
error: could not compile `tower`
warning: build failed, waiting for other jobs to finish...


[dependencies]
# Async
tokio = { version = "1.18.2", features = ["full"] }
async-trait = "0.1.56"
futures = { version = "0.3.21", features = ["alloc"] }
tokio-stream = "0.1.9"

# Serde
serde = { version = "1.0.137", features = ["derive"] }
serde_json = "1.0.81"

# Web client
tonic = "0.7.2"
reqwest = { version = "0.11", default-features = false }

# Utils
dotenv = "0.15.0"
itertools = "0.10.3"
mapinto = "0.2.1"
thiserror = "1.0.31"
anyhow = "1.0.57"

# Starknet
starknet = { git = "https://github.com/ofux/starknet-rs" }
crypto-bigint = { version = "0.4.8", features = ["serde"] }

# Protocol Buffers
prost = "0.10.4"
prost-types = "0.10.1"

# Logs
log = "0.4.17"
slog = "2.7.0"
slog-async = "2.7.0"
slog-envlogger = "2.2.0"
slog-json = "2.6.1"
slog-scope = "4.4.0"
slog-stdlog = "4.1.1"
slog-term = "2.9.0"

# Unit tests
mockall = "0.11.2"

# Local dependecies
marketplace-domain = { path = "../marketplace-domain" }
marketplace-infrastructure = { path = "../marketplace-infrastructure" }

@tdelabro tdelabro 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 15, 2022
@jackh726
Copy link
Member

Duplicate of #101844, I think. But thanks for the report!

@jackh726 jackh726 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
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

2 participants