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: debuginfo: Trying to create type name for unexpected type #112776

Closed
marchaesen opened this issue Jun 18, 2023 · 1 comment · Fixed by #112777
Closed

ICE: debuginfo: Trying to create type name for unexpected type #112776

marchaesen opened this issue Jun 18, 2023 · 1 comment · Fixed by #112777
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

@marchaesen
Copy link

Code

[project.tar.gz](https://github.com/rust-lang/rust/files/11782528/project.tar.gz)

Meta

rustc +nightly --version --verbose:

rustc 1.72.0-nightly (3b2073f07 2023-06-17)
binary: rustc
commit-hash: 3b2073f0762cff4d3d625bb10017e0ce4e7abe50
commit-date: 2023-06-17
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error: internal compiler error: compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs:426:13: debuginfo: Trying to create type name for unexpected type: app::__rtic_internal_ledtask_F

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/compiler/rustc_errors/src/lib.rs:1650:9
Backtrace

stack backtrace:
   0:     0x7ff879d67e11 - std::backtrace_rs::backtrace::libunwind::trace::hd102c46c16771587
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7ff879d67e11 - std::backtrace_rs::backtrace::trace_unsynchronized::h6545cf7d6ed27551
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff879d67e11 - std::sys_common::backtrace::_print_fmt::h258fac35947dded0
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7ff879d67e11 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf070a48cb28a24d1
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7ff879dc94bf - core::fmt::rt::Argument::fmt::h0a093c27aabe85c6
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/core/src/fmt/rt.rs:138:9
   5:     0x7ff879dc94bf - core::fmt::write::h809e1a6b668324f6
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/core/src/fmt/mod.rs:1094:21
   6:     0x7ff879d5a877 - std::io::Write::write_fmt::h2ed31d529426c73c
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/io/mod.rs:1713:15
   7:     0x7ff879d67c25 - std::sys_common::backtrace::_print::h72058f630d074235
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7ff879d67c25 - std::sys_common::backtrace::print::h71140e0244457266
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7ff879d6a9d3 - std::panicking::default_hook::{{closure}}::h4cc812472591f5d0
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/panicking.rs:269:22
  10:     0x7ff879d6a764 - std::panicking::default_hook::h63cd13622fb98d85
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/panicking.rs:288:9
  11:     0x7ff87cfad52b - <rustc_driver_impl[2635ae639440f84d]::install_ice_hook::{closure#0} as core[179bd5bdb7674514]::ops::function::FnOnce<(&core[179bd5bdb7674514]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7ff879d6b1fe - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2ecbaa31401232a8
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/alloc/src/boxed.rs:2007:9
  13:     0x7ff879d6b1fe - std::panicking::rust_panic_with_hook::h521173c88e8eb80d
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/panicking.rs:709:13
  14:     0x7ff87d4b22e1 - std[a820ec68793a1c54]::panicking::begin_panic::<rustc_errors[b597254c8f098bdb]::ExplicitBug>::{closure#0}
  15:     0x7ff87d4b0f36 - std[a820ec68793a1c54]::sys_common::backtrace::__rust_end_short_backtrace::<std[a820ec68793a1c54]::panicking::begin_panic<rustc_errors[b597254c8f098bdb]::ExplicitBug>::{closure#0}, !>
  16:     0x7ff87d5476f6 - std[a820ec68793a1c54]::panicking::begin_panic::<rustc_errors[b597254c8f098bdb]::ExplicitBug>
  17:     0x7ff87d4ade74 - <rustc_errors[b597254c8f098bdb]::HandlerInner>::bug::<alloc[94daa9e91581ecb7]::string::String>
  18:     0x7ff87d4adcf6 - <rustc_errors[b597254c8f098bdb]::Handler>::bug::<alloc[94daa9e91581ecb7]::string::String>
  19:     0x7ff87d50146c - rustc_middle[2d6135a6a55a92f4]::util::bug::opt_span_bug_fmt::<rustc_span[9ec16770641762ee]::span_encoding::Span>::{closure#0}
  20:     0x7ff87d4fe30a - rustc_middle[2d6135a6a55a92f4]::ty::context::tls::with_opt::<rustc_middle[2d6135a6a55a92f4]::util::bug::opt_span_bug_fmt<rustc_span[9ec16770641762ee]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7ff87d4fe2da - rustc_middle[2d6135a6a55a92f4]::ty::context::tls::with_context_opt::<rustc_middle[2d6135a6a55a92f4]::ty::context::tls::with_opt<rustc_middle[2d6135a6a55a92f4]::util::bug::opt_span_bug_fmt<rustc_span[9ec16770641762ee]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7ff87b2e4aed - rustc_middle[2d6135a6a55a92f4]::util::bug::bug_fmt
  23:     0x7ff87b1afe11 - rustc_codegen_ssa[48a71250af989085]::debuginfo::type_names::push_debuginfo_type_name
  24:     0x7ff87b1b35ca - rustc_codegen_ssa[48a71250af989085]::debuginfo::type_names::push_generic_params_internal
  25:     0x7ff87b535b6e - rustc_codegen_llvm[9635be2417e1ae72]::debuginfo::metadata::type_di_node
  26:     0x7ff87bc2a73a - rustc_codegen_llvm[9635be2417e1ae72]::debuginfo::metadata::build_global_var_di_node
  27:     0x7ff87bc29d6b - <rustc_codegen_llvm[9635be2417e1ae72]::context::CodegenCx as rustc_codegen_ssa[48a71250af989085]::traits::statics::StaticMethods>::codegen_static
  28:     0x7ff87bc12eac - rustc_codegen_llvm[9635be2417e1ae72]::base::compile_codegen_unit::module_codegen
  29:     0x7ff87bc111d5 - <rustc_middle[2d6135a6a55a92f4]::dep_graph::dep_node::DepKind as rustc_query_system[820ba01abcedc11e]::dep_graph::DepKind>::with_deps::<<rustc_query_system[820ba01abcedc11e]::dep_graph::graph::DepGraphData<rustc_middle[2d6135a6a55a92f4]::dep_graph::dep_node::DepKind>>::with_task<rustc_middle[2d6135a6a55a92f4]::ty::context::TyCtxt, rustc_span[9ec16770641762ee]::symbol::Symbol, rustc_codegen_ssa[48a71250af989085]::ModuleCodegen<rustc_codegen_llvm[9635be2417e1ae72]::ModuleLlvm>>::{closure#0}::{closure#0}, rustc_codegen_ssa[48a71250af989085]::ModuleCodegen<rustc_codegen_llvm[9635be2417e1ae72]::ModuleLlvm>>
  30:     0x7ff87bc109cf - rustc_codegen_llvm[9635be2417e1ae72]::base::compile_codegen_unit
  31:     0x7ff87bc0def1 - rustc_codegen_ssa[48a71250af989085]::base::codegen_crate::<rustc_codegen_llvm[9635be2417e1ae72]::LlvmCodegenBackend>
  32:     0x7ff87bc0d7ff - <rustc_codegen_llvm[9635be2417e1ae72]::LlvmCodegenBackend as rustc_codegen_ssa[48a71250af989085]::traits::backend::CodegenBackend>::codegen_crate
  33:     0x7ff87c4d7652 - <rustc_session[dc274bc86de11b2]::session::Session>::time::<alloc[94daa9e91581ecb7]::boxed::Box<dyn core[179bd5bdb7674514]::any::Any>, rustc_interface[b727bedca2f0eb3b]::passes::start_codegen::{closure#0}>
  34:     0x7ff87c4d71cb - rustc_interface[b727bedca2f0eb3b]::passes::start_codegen
  35:     0x7ff87c4d1f2d - <rustc_middle[2d6135a6a55a92f4]::ty::context::GlobalCtxt>::enter::<<rustc_interface[b727bedca2f0eb3b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[179bd5bdb7674514]::result::Result<alloc[94daa9e91581ecb7]::boxed::Box<dyn core[179bd5bdb7674514]::any::Any>, rustc_span[9ec16770641762ee]::ErrorGuaranteed>>
  36:     0x7ff87c4d115d - <rustc_interface[b727bedca2f0eb3b]::queries::Queries>::ongoing_codegen
  37:     0x7ff87c4d0280 - <rustc_interface[b727bedca2f0eb3b]::interface::Compiler>::enter::<rustc_driver_impl[2635ae639440f84d]::run_compiler::{closure#1}::{closure#2}, core[179bd5bdb7674514]::result::Result<core[179bd5bdb7674514]::option::Option<rustc_interface[b727bedca2f0eb3b]::queries::Linker>, rustc_span[9ec16770641762ee]::ErrorGuaranteed>>
  38:     0x7ff87c4cd8b1 - std[a820ec68793a1c54]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b727bedca2f0eb3b]::util::run_in_thread_pool_with_globals<rustc_interface[b727bedca2f0eb3b]::interface::run_compiler<core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>, rustc_driver_impl[2635ae639440f84d]::run_compiler::{closure#1}>::{closure#0}, core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>>
  39:     0x7ff87c4cd035 - <<std[a820ec68793a1c54]::thread::Builder>::spawn_unchecked_<rustc_interface[b727bedca2f0eb3b]::util::run_in_thread_pool_with_globals<rustc_interface[b727bedca2f0eb3b]::interface::run_compiler<core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>, rustc_driver_impl[2635ae639440f84d]::run_compiler::{closure#1}>::{closure#0}, core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[179bd5bdb7674514]::result::Result<(), rustc_span[9ec16770641762ee]::ErrorGuaranteed>>::{closure#1} as core[179bd5bdb7674514]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  40:     0x7ff879d75685 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7557df74034f0cd4
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/alloc/src/boxed.rs:1993:9
  41:     0x7ff879d75685 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha799d8f85cbbc72f
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/alloc/src/boxed.rs:1993:9
  42:     0x7ff879d75685 - std::sys::unix::thread::Thread::new::thread_start::h88ab86e849d99fd7
                               at /rustc/3b2073f0762cff4d3d625bb10017e0ce4e7abe50/library/std/src/sys/unix/thread.rs:108:17
  43:     0x7ff879a8f18a - start_thread
                               at ./nptl/pthread_create.c:444:8
  44:     0x7ff879b1dbd0 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  45:                0x0 - <unknown>

@marchaesen marchaesen 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 Jun 18, 2023
@Noratrieb Noratrieb changed the title Internal compiler error during cargo build of attached project. ICE: debuginfo: Trying to create type name for unexpected type Jun 19, 2023
@jieyouxu
Copy link
Member

jieyouxu commented Jun 19, 2023

My guess is https://github.com/rtic-rs/rtic/blob/08c0065c02b1c027207c25a297b2c0aa92646786/rtic-macros/src/codegen/async_dispatchers.rs#L25

type #type_name = impl core::future::Future;

I think it's probably another instance of #112752.

jyn514 added a commit to jyn514/rust that referenced this issue Jun 19, 2023
…e, r=oli-obk

Continue folding in query normalizer on weak aliases

Fixes rust-lang#112752
Fixes rust-lang#112731 (same root cause, so didn't make a test for it)
fixes rust-lang#112776

r? `@oli-obk`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 19, 2023
…e, r=oli-obk

Continue folding in query normalizer on weak aliases

Fixes rust-lang#112752
Fixes rust-lang#112731 (same root cause, so didn't make a test for it)
fixes rust-lang#112776

r? ``@oli-obk``
@bors bors closed this as completed in 68f2f1e Jun 19, 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

Successfully merging a pull request may close this issue.

2 participants