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 on nightly when compiling futures-util with cargo-llvm-cov #135291

Closed
jwodder opened this issue Jan 9, 2025 · 1 comment
Closed

ICE on nightly when compiling futures-util with cargo-llvm-cov #135291

jwodder opened this issue Jan 9, 2025 · 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

@jwodder
Copy link

jwodder commented Jan 9, 2025

Code

cargo new ice-mvce
cd ice-mvce
cargo add futures-util --no-default-features --features std
cargo binstall llvm-cov
cargo +nightly llvm-cov --lcov

Meta

rustc +nightly --version --verbose:

rustc 1.86.0-nightly (a580b5c37 2025-01-08)
binary: rustc
commit-hash: a580b5c379b4fca50dfe5afc0fc0ce00921e4e00
commit-date: 2025-01-08
host: x86_64-apple-darwin
release: 1.86.0-nightly
LLVM version: 19.1.6

Error output

info: cargo-llvm-cov currently setting cfg(coverage) and cfg(coverage_nightly); you can opt-out it by passing --no-cfg-coverage and --no-cfg-coverage-nightly
   Compiling futures-util v0.3.31
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize future::future::flatten::Flatten<Fut/#0, Alias(Projection, AliasTy { args: [Fut/#0], def_id: DefId(1:50942 ~ core[1df7]::future::future::Future::Output), .. })>, maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90:
Box<dyn Any>
stack backtrace:
   0:        0x1176d5866 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h9bf9ff327e2df040
   1:        0x1146aeb93 - core::fmt::write::h88424f6485c19682
   2:        0x1176c93d2 - std::io::Write::write_fmt::hab6d2b5e7840637a
   3:        0x1176d56b2 - std::sys::backtrace::BacktraceLock::print::ha894967f905c9e1b
   4:        0x1176d7ff8 - std::panicking::default_hook::{{closure}}::h8f63c070efaefa9e
   5:        0x1176d7dd9 - std::panicking::default_hook::h2b5b81623d2ef97f
   6:        0x115322edd - std[4333fcc3397f1e4d]::panicking::update_hook::<alloc[9ea2481e0677791b]::boxed::Box<rustc_driver_impl[4e490b3d18de3daf]::install_ice_hook::{closure#1}>>::{closure#0}
   7:        0x1176d8a73 - std::panicking::rust_panic_with_hook::h92ff237edb6290f8
   8:        0x1153b7bc7 - std[4333fcc3397f1e4d]::panicking::begin_panic::<rustc_errors[bdc8807e94b634b2]::ExplicitBug>::{closure#0}
   9:        0x1153a4939 - std[4333fcc3397f1e4d]::sys::backtrace::__rust_end_short_backtrace::<std[4333fcc3397f1e4d]::panicking::begin_panic<rustc_errors[bdc8807e94b634b2]::ExplicitBug>::{closure#0}, !>
  10:        0x11a3b451e - std[4333fcc3397f1e4d]::panicking::begin_panic::<rustc_errors[bdc8807e94b634b2]::ExplicitBug>
  11:        0x1153cdcb6 - <rustc_errors[bdc8807e94b634b2]::diagnostic::BugAbort as rustc_errors[bdc8807e94b634b2]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:        0x11619f2a5 - rustc_middle[75ceb8712c4b6e4c]::util::bug::opt_span_bug_fmt::<rustc_span[dbf047cd43b8acb]::span_encoding::Span>::{closure#0}
  13:        0x116151117 - rustc_middle[75ceb8712c4b6e4c]::ty::context::tls::with_opt::<rustc_middle[75ceb8712c4b6e4c]::util::bug::opt_span_bug_fmt<rustc_span[dbf047cd43b8acb]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:        0x1161505e5 - rustc_middle[75ceb8712c4b6e4c]::ty::context::tls::with_context_opt::<rustc_middle[75ceb8712c4b6e4c]::ty::context::tls::with_opt<rustc_middle[75ceb8712c4b6e4c]::util::bug::opt_span_bug_fmt<rustc_span[dbf047cd43b8acb]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:        0x11a43b43b - rustc_middle[75ceb8712c4b6e4c]::util::bug::bug_fmt
  16:        0x11702aa34 - <&rustc_middle[75ceb8712c4b6e4c]::ty::list::RawList<(), rustc_middle[75ceb8712c4b6e4c]::ty::generic_args::GenericArg> as rustc_type_ir[80a3009ac695697]::fold::TypeFoldable<rustc_middle[75ceb8712c4b6e4c]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[75ceb8712c4b6e4c]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
  17:        0x117024b0d - <rustc_middle[75ceb8712c4b6e4c]::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir[80a3009ac695697]::predicate::TraitRef<rustc_middle[75ceb8712c4b6e4c]::ty::context::TyCtxt>>
  18:        0x11704441f - <rustc_symbol_mangling[178b78460e6dc54]::v0::SymbolMangler as rustc_middle[75ceb8712c4b6e4c]::ty::print::Printer>::print_impl_path
  19:        0x1170434cc - <rustc_symbol_mangling[178b78460e6dc54]::v0::SymbolMangler as rustc_middle[75ceb8712c4b6e4c]::ty::print::Printer>::print_def_path
  20:        0x11704394b - <rustc_symbol_mangling[178b78460e6dc54]::v0::SymbolMangler as rustc_middle[75ceb8712c4b6e4c]::ty::print::Printer>::print_def_path
  21:        0x1170428f9 - rustc_symbol_mangling[178b78460e6dc54]::v0::mangle
  22:        0x11704a09d - rustc_symbol_mangling[178b78460e6dc54]::symbol_name_provider
  23:        0x116c7a8de - rustc_query_impl[f0081debe8a8454e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f0081debe8a8454e]::query_impl::symbol_name::dynamic_query::{closure#2}::{closure#0}, rustc_middle[75ceb8712c4b6e4c]::query::erase::Erased<[u8; 16usize]>>
  24:        0x116bf8b3e - <rustc_query_impl[f0081debe8a8454e]::query_impl::symbol_name::dynamic_query::{closure#2} as core[1df7861a0f3a1edb]::ops::function::FnOnce<(rustc_middle[75ceb8712c4b6e4c]::ty::context::TyCtxt, rustc_middle[75ceb8712c4b6e4c]::ty::instance::Instance)>>::call_once
  25:        0x116a549df - rustc_query_system[b5ddd9f23afd8ee8]::query::plumbing::try_execute_query::<rustc_query_impl[f0081debe8a8454e]::DynamicConfig<rustc_query_system[b5ddd9f23afd8ee8]::query::caches::DefaultCache<rustc_middle[75ceb8712c4b6e4c]::ty::instance::Instance, rustc_middle[75ceb8712c4b6e4c]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[f0081debe8a8454e]::plumbing::QueryCtxt, false>
  26:        0x116cbcbb9 - rustc_query_impl[f0081debe8a8454e]::query_impl::symbol_name::get_query_non_incr::__rust_end_short_backtrace
  27:        0x114efdfc8 - rustc_middle[75ceb8712c4b6e4c]::query::plumbing::query_get_at::<rustc_query_system[b5ddd9f23afd8ee8]::query::caches::DefaultCache<rustc_middle[75ceb8712c4b6e4c]::ty::instance::Instance, rustc_middle[75ceb8712c4b6e4c]::query::erase::Erased<[u8; 16usize]>>>
  28:        0x114fba1ee - rustc_codegen_llvm[25826cfec24e129]::base::compile_codegen_unit::module_codegen
  29:        0x11500b77b - <rustc_codegen_llvm[25826cfec24e129]::LlvmCodegenBackend as rustc_codegen_ssa[c1c622737c32cccb]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  30:        0x114ef6913 - rustc_codegen_ssa[c1c622737c32cccb]::base::codegen_crate::<rustc_codegen_llvm[25826cfec24e129]::LlvmCodegenBackend>
  31:        0x115013a7c - <rustc_codegen_llvm[25826cfec24e129]::LlvmCodegenBackend as rustc_codegen_ssa[c1c622737c32cccb]::traits::backend::CodegenBackend>::codegen_crate
  32:        0x115d4de0b - <rustc_interface[4ce5778a50e46cc9]::queries::Linker>::codegen_and_build_linker
  33:        0x115311d8b - rustc_interface[4ce5778a50e46cc9]::passes::create_and_enter_global_ctxt::<core[1df7861a0f3a1edb]::option::Option<rustc_interface[4ce5778a50e46cc9]::queries::Linker>, rustc_driver_impl[4e490b3d18de3daf]::run_compiler::{closure#0}::{closure#2}>
  34:        0x11532b8ca - rustc_interface[4ce5778a50e46cc9]::interface::run_compiler::<(), rustc_driver_impl[4e490b3d18de3daf]::run_compiler::{closure#0}>::{closure#1}
  35:        0x115314b50 - std[4333fcc3397f1e4d]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[4ce5778a50e46cc9]::util::run_in_thread_with_globals<rustc_interface[4ce5778a50e46cc9]::util::run_in_thread_pool_with_globals<rustc_interface[4ce5778a50e46cc9]::interface::run_compiler<(), rustc_driver_impl[4e490b3d18de3daf]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:        0x11532eb73 - <<std[4333fcc3397f1e4d]::thread::Builder>::spawn_unchecked_<rustc_interface[4ce5778a50e46cc9]::util::run_in_thread_with_globals<rustc_interface[4ce5778a50e46cc9]::util::run_in_thread_pool_with_globals<rustc_interface[4ce5778a50e46cc9]::interface::run_compiler<(), rustc_driver_impl[4e490b3d18de3daf]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[1df7861a0f3a1edb]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:        0x1176e454b - std::sys::pal::unix::thread::Thread::new::thread_start::h753290422a45572c
  38:     0x7ff8063e118b - __pthread_start

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/rustc-ice-2025-01-09T16_56_43-36260.txt` to your bug report

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

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

query stack during panic:
#0 [symbol_name] computing the symbol for `future::future::flatten::<impl at /Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/src/future/future/flatten.rs:26:1: 29:25>::is_terminated`
end of query stack
error: could not compile `futures-util` (lib)

Caused by:
  process didn't exit successfully: `/Users/jwodder/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/rustc --crate-name futures_util --edition=2018 /Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --warn=unreachable_pub --warn=unexpected_cfgs --warn=single_use_lifetimes --warn=rust_2018_idioms --warn=missing_debug_implementations --check-cfg 'cfg(futures_sanitizer)' --cfg 'feature="alloc"' --cfg 'feature="slab"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "async-await", "async-await-macro", "bilock", "cfg-target-has-atomic", "channel", "compat", "default", "futures-channel", "futures-io", "futures-macro", "futures-sink", "futures_01", "io", "io-compat", "memchr", "portable-atomic", "sink", "slab", "std", "tokio-io", "unstable", "write-all-vectored"))' -C metadata=cf655fbc96ba0c3c -C extra-filename=-c7f8dd9466b3e7af --out-dir /Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps -L dependency=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps --extern futures_core=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libfutures_core-e69e3f1537054857.rmeta --extern futures_task=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libfutures_task-63f46da0688199ef.rmeta --extern pin_project_lite=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libpin_project_lite-9c282788c3f27025.rmeta --extern pin_utils=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libpin_utils-92d69a372da8d41b.rmeta --extern slab=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libslab-433ab38e3fd6f0b6.rmeta --cap-lints allow -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target` (exit status: 101)
error: process didn't exit successfully: `/Users/jwodder/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo test --tests --manifest-path /Users/jwodder/work/dev/tmp/ice-mvce/Cargo.toml --target-dir /Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target` (exit status: 101)
Backtrace

info: cargo-llvm-cov currently setting cfg(coverage) and cfg(coverage_nightly); you can opt-out it by passing --no-cfg-coverage and --no-cfg-coverage-nightly
   Compiling futures-util v0.3.31
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize future::future::flatten::Flatten<Fut/#0, Alias(Projection, AliasTy { args: [Fut/#0], def_id: DefId(1:50942 ~ core[1df7]::future::future::Future::Output), .. })>, maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   2: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   3: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   5: rustc_middle::util::bug::bug_fmt
   6: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_middle::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
   7: <rustc_middle::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>
   8: <rustc_symbol_mangling::v0::SymbolMangler as rustc_middle::ty::print::Printer>::print_impl_path
   9: <rustc_symbol_mangling::v0::SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
  10: <rustc_symbol_mangling::v0::SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
  11: rustc_symbol_mangling::v0::mangle
  12: rustc_symbol_mangling::symbol_name_provider
      [... omitted 2 frames ...]
  13: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::instance::Instance, rustc_middle::query::erase::Erased<[u8; 16]>>>
  14: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  16: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  17: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  20: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/rustc-ice-2025-01-09T16_58_43-36363.txt` to your bug report

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

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

query stack during panic:
#0 [symbol_name] computing the symbol for `future::future::flatten::<impl at /Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/src/future/future/flatten.rs:26:1: 29:25>::is_terminated`
end of query stack
error: could not compile `futures-util` (lib)

Caused by:
  process didn't exit successfully: `/Users/jwodder/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/rustc --crate-name futures_util --edition=2018 /Users/jwodder/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --warn=unreachable_pub --warn=unexpected_cfgs --warn=single_use_lifetimes --warn=rust_2018_idioms --warn=missing_debug_implementations --check-cfg 'cfg(futures_sanitizer)' --cfg 'feature="alloc"' --cfg 'feature="slab"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "async-await", "async-await-macro", "bilock", "cfg-target-has-atomic", "channel", "compat", "default", "futures-channel", "futures-io", "futures-macro", "futures-sink", "futures_01", "io", "io-compat", "memchr", "portable-atomic", "sink", "slab", "std", "tokio-io", "unstable", "write-all-vectored"))' -C metadata=cf655fbc96ba0c3c -C extra-filename=-c7f8dd9466b3e7af --out-dir /Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps -L dependency=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps --extern futures_core=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libfutures_core-e69e3f1537054857.rmeta --extern futures_task=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libfutures_task-63f46da0688199ef.rmeta --extern pin_project_lite=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libpin_project_lite-9c282788c3f27025.rmeta --extern pin_utils=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libpin_utils-92d69a372da8d41b.rmeta --extern slab=/Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target/debug/deps/libslab-433ab38e3fd6f0b6.rmeta --cap-lints allow -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target` (exit status: 101)
error: process didn't exit successfully: `/Users/jwodder/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo test --tests --manifest-path /Users/jwodder/work/dev/tmp/ice-mvce/Cargo.toml --target-dir /Users/jwodder/work/dev/tmp/ice-mvce/target/llvm-cov-target` (exit status: 101)

@jwodder jwodder 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 Jan 9, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 9, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 9, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 9, 2025

Thank you for the report, this is a duplicate of #135235.

@jieyouxu jieyouxu closed this as completed Jan 9, 2025
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