Skip to content

rustc panics when compiling rocket.rs project #105922

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

Closed
jasper-vdhoven opened this issue Dec 19, 2022 · 5 comments
Closed

rustc panics when compiling rocket.rs project #105922

jasper-vdhoven opened this issue Dec 19, 2022 · 5 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

@jasper-vdhoven
Copy link

Code

Tried running my little web app project available under github.com/jasper-vdhoven/rust-text-converter/tree/RTC-7-TLS-Implementation on the RTC-7-TLS-Implemantation branch.

Meta

rustc --version --verbose:

❯ rustc --version --verbose
rustc 1.68.0-nightly (d0dc9efff 2022-12-18)
binary: rustc
commit-hash: d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0
commit-date: 2022-12-18
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

error: internal compiler error: compiler/rustc_codegen_llvm/src/context.rs:971:13: failed to get layout for `&mut Pin<&mut rocket::http::hyper::server::shutdown::Graceful<rocket::http::private::Incoming<rocket::ext::CancellableListener<rocket::Shutdown, L>>, service::make::MakeServiceFn<[closure@rocket::server::<impl Rocket<Orbit>>::http_server<L>::{closure#0}::{closure#2}]>, rocket::Shutdown, hyper::common::exec::Exec>>`: unable to determine layout for `&mut Pin<&mut rocket::http::hyper::server::shutdown::Graceful<rocket::http::private::Incoming<rocket::ext::CancellableListener<rocket::Shutdown, L>>, service::make::MakeServiceFn<[closure@rocket::server::<impl Rocket<Orbit>>::http_server<L>::{closure#0}::{closure#2}]>, rocket::Shutdown, hyper::common::exec::Exec>>` because `&mut Pin<&mut rocket::http::hyper::server::shutdown::Graceful<rocket::http::private::Incoming<rocket::ext::CancellableListener<rocket::Shutdown, L>>, service::make::MakeServiceFn<[closure@rocket::server::<impl Rocket<Orbit>>::http_server<L>::{closure#0}::{closure#2}]>, rocket::Shutdown, hyper::common::exec::Exec>>` cannot be normalized
Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/compiler/rustc_errors/src/lib.rs:973:33
stack backtrace:
   0:     0x7f4f22565a7a - std::backtrace_rs::backtrace::libunwind::trace::h196c489280b5a090
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4f22565a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h13bf778637c29636
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4f22565a7a - std::sys_common::backtrace::_print_fmt::h0f4861fc71bccacd
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4f22565a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5f011e3cd484ad42
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4f225c87ae - core::fmt::write::h1524a82fa967022b
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f4f22555e45 - std::io::Write::write_fmt::ha3d33adc534ae39a
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/io/mod.rs:1682:15
   6:     0x7f4f22565845 - std::sys_common::backtrace::_print::h11f95f719c502811
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f4f22565845 - std::sys_common::backtrace::print::h71adea94b47d00ae
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f4f2256858f - std::panicking::default_hook::{{closure}}::he466417f162d07e8
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/panicking.rs:267:22
   9:     0x7f4f225682cb - std::panicking::default_hook::hff6ac2c6adb87df1
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/panicking.rs:286:9
  10:     0x7f4f2584b261 - <rustc_driver[308d730545d14786]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[cf0a937d1125fa47]::ops::function::FnOnce<(&core[cf0a937d1125fa47]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f4f22568dcd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h50ec27c76f2a595f
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/alloc/src/boxed.rs:2032:9
  12:     0x7f4f22568dcd - std::panicking::rust_panic_with_hook::hcb61d2700034f188
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/panicking.rs:692:13
  13:     0x7f4f256e30a1 - std[645413f22396c11]::panicking::begin_panic::<rustc_errors[3067a2436b21c54]::ExplicitBug>::{closure#0}
  14:     0x7f4f256e2856 - std[645413f22396c11]::sys_common::backtrace::__rust_end_short_backtrace::<std[645413f22396c11]::panicking::begin_panic<rustc_errors[3067a2436b21c54]::ExplicitBug>::{closure#0}, !>
  15:     0x7f4f2567c946 - std[645413f22396c11]::panicking::begin_panic::<rustc_errors[3067a2436b21c54]::ExplicitBug>
  16:     0x7f4f256e2676 - std[645413f22396c11]::panic::panic_any::<rustc_errors[3067a2436b21c54]::ExplicitBug>
  17:     0x7f4f256df9e9 - <rustc_errors[3067a2436b21c54]::HandlerInner>::span_bug::<rustc_span[7195c1839470b4e2]::span_encoding::Span, &alloc[e89cf99e2daa46aa]::string::String>
  18:     0x7f4f256df650 - <rustc_errors[3067a2436b21c54]::Handler>::span_bug::<rustc_span[7195c1839470b4e2]::span_encoding::Span, &alloc[e89cf99e2daa46aa]::string::String>
  19:     0x7f4f256e29f9 - rustc_middle[3f796d6b9d25fb15]::ty::context::tls::with_context_opt::<rustc_middle[3f796d6b9d25fb15]::ty::context::tls::with_opt<rustc_middle[3f796d6b9d25fb15]::util::bug::opt_span_bug_fmt<rustc_span[7195c1839470b4e2]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  20:     0x7f4f256e2846 - rustc_middle[3f796d6b9d25fb15]::util::bug::opt_span_bug_fmt::<rustc_span[7195c1839470b4e2]::span_encoding::Span>
  21:     0x7f4f23f213e4 - rustc_middle[3f796d6b9d25fb15]::util::bug::span_bug_fmt::<rustc_span[7195c1839470b4e2]::span_encoding::Span>
  22:     0x7f4f25686412 - <rustc_codegen_llvm[a48ef6c2d8d93bca]::context::CodegenCx as rustc_middle[3f796d6b9d25fb15]::ty::layout::LayoutOfHelpers>::handle_layout_err
  23:     0x7f4f25682f51 - <rustc_codegen_llvm[a48ef6c2d8d93bca]::context::CodegenCx as rustc_middle[3f796d6b9d25fb15]::ty::layout::LayoutOf>::spanned_layout_of::{closure#0}
  24:     0x7f4f2568601a - <rustc_codegen_llvm[a48ef6c2d8d93bca]::context::CodegenCx as rustc_middle[3f796d6b9d25fb15]::ty::layout::LayoutOf>::layout_of
  25:     0x7f4f2567b456 - <rustc_codegen_ssa[833d31b763ae114d]::mir::place::PlaceRef<&rustc_codegen_llvm[a48ef6c2d8d93bca]::llvm_::ffi::Value>>::project_type::<rustc_codegen_llvm[a48ef6c2d8d93bca]::builder::Builder>
  26:     0x7f4f23f25019 - <rustc_codegen_ssa[833d31b763ae114d]::mir::FunctionCx<rustc_codegen_llvm[a48ef6c2d8d93bca]::builder::Builder>>::codegen_place
  27:     0x7f4f23f00e50 - <rustc_codegen_ssa[833d31b763ae114d]::mir::FunctionCx<rustc_codegen_llvm[a48ef6c2d8d93bca]::builder::Builder>>::codegen_block
  28:     0x7f4f23eede07 - rustc_codegen_ssa[833d31b763ae114d]::mir::codegen_mir::<rustc_codegen_llvm[a48ef6c2d8d93bca]::builder::Builder>
  29:     0x7f4f24d10cf6 - rustc_codegen_llvm[a48ef6c2d8d93bca]::base::compile_codegen_unit::module_codegen
  30:     0x7f4f24eda6fc - <rustc_query_system[3cfc2c8ad6a9fb05]::dep_graph::graph::DepGraph<rustc_middle[3f796d6b9d25fb15]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[3f796d6b9d25fb15]::ty::context::TyCtxt, rustc_span[7195c1839470b4e2]::symbol::Symbol, rustc_codegen_ssa[833d31b763ae114d]::ModuleCodegen<rustc_codegen_llvm[a48ef6c2d8d93bca]::ModuleLlvm>>
  31:     0x7f4f24eda2d7 - <rustc_codegen_llvm[a48ef6c2d8d93bca]::LlvmCodegenBackend as rustc_codegen_ssa[833d31b763ae114d]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  32:     0x7f4f24ed7d33 - rustc_codegen_ssa[833d31b763ae114d]::base::codegen_crate::<rustc_codegen_llvm[a48ef6c2d8d93bca]::LlvmCodegenBackend>
  33:     0x7f4f24ed74d9 - <rustc_codegen_llvm[a48ef6c2d8d93bca]::LlvmCodegenBackend as rustc_codegen_ssa[833d31b763ae114d]::traits::backend::CodegenBackend>::codegen_crate
  34:     0x7f4f24ada611 - <rustc_session[285c9883f1e66712]::session::Session>::time::<alloc[e89cf99e2daa46aa]::boxed::Box<dyn core[cf0a937d1125fa47]::any::Any>, rustc_interface[ef42ad965cd11b9c]::passes::start_codegen::{closure#0}>
  35:     0x7f4f24ada139 - rustc_interface[ef42ad965cd11b9c]::passes::start_codegen
  36:     0x7f4f24ad7e36 - <rustc_interface[ef42ad965cd11b9c]::passes::QueryContext>::enter::<<rustc_interface[ef42ad965cd11b9c]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[cf0a937d1125fa47]::result::Result<alloc[e89cf99e2daa46aa]::boxed::Box<dyn core[cf0a937d1125fa47]::any::Any>, rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>
  37:     0x7f4f24ad52e6 - <rustc_interface[ef42ad965cd11b9c]::queries::Queries>::ongoing_codegen
  38:     0x7f4f24ad4807 - <rustc_interface[ef42ad965cd11b9c]::interface::Compiler>::enter::<rustc_driver[308d730545d14786]::run_compiler::{closure#1}::{closure#2}, core[cf0a937d1125fa47]::result::Result<core[cf0a937d1125fa47]::option::Option<rustc_interface[ef42ad965cd11b9c]::queries::Linker>, rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>
  39:     0x7f4f24acf7e8 - rustc_span[7195c1839470b4e2]::with_source_map::<core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>, rustc_interface[ef42ad965cd11b9c]::interface::run_compiler<core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>, rustc_driver[308d730545d14786]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  40:     0x7f4f24acf2d5 - <scoped_tls[39b0712e649d5f34]::ScopedKey<rustc_span[7195c1839470b4e2]::SessionGlobals>>::set::<rustc_interface[ef42ad965cd11b9c]::interface::run_compiler<core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>, rustc_driver[308d730545d14786]::run_compiler::{closure#1}>::{closure#0}, core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>
  41:     0x7f4f24ace8c2 - std[645413f22396c11]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ef42ad965cd11b9c]::util::run_in_thread_pool_with_globals<rustc_interface[ef42ad965cd11b9c]::interface::run_compiler<core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>, rustc_driver[308d730545d14786]::run_compiler::{closure#1}>::{closure#0}, core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>
  42:     0x7f4f2510827a - <<std[645413f22396c11]::thread::Builder>::spawn_unchecked_<rustc_interface[ef42ad965cd11b9c]::util::run_in_thread_pool_with_globals<rustc_interface[ef42ad965cd11b9c]::interface::run_compiler<core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>, rustc_driver[308d730545d14786]::run_compiler::{closure#1}>::{closure#0}, core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cf0a937d1125fa47]::result::Result<(), rustc_errors[3067a2436b21c54]::ErrorGuaranteed>>::{closure#1} as core[cf0a937d1125fa47]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43:     0x7f4f22572dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfa728446fdf5ae93
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/alloc/src/boxed.rs:2000:9
  44:     0x7f4f22572dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3934f485a9254b50
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/alloc/src/boxed.rs:2000:9
  45:     0x7f4f22572dc3 - std::sys::unix::thread::Thread::new::thread_start::he535d9cd9ed14925
                               at /rustc/d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0/library/std/src/sys/unix/thread.rs:108:17
  46:     0x7f4f2231414d - start_thread
  47:     0x7f4f22395a00 - __GI___clone3
  48:                0x0 - <unknown>

@jasper-vdhoven jasper-vdhoven 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 Dec 19, 2022
@jasper-vdhoven
Copy link
Author

Extra note from compiler output:

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

@SpBills
Copy link

SpBills commented Dec 19, 2022

@trevyn
Copy link
Contributor

trevyn commented Dec 20, 2022

Dupe of #105809; a revert just landed, so should be fixed in tomorrow's nightly.

@jasper-vdhoven
Copy link
Author

Dupe of #105809; a revert just landed, so should be fixed in tomorrow's nightly.

Awesome! Will check when released and then close if fixed.

@jackh726
Copy link
Member

Closing as duplicate

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

4 participants