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

Failing to compile on nightly under branch coverage #366

Closed
jayvdb opened this issue Jan 9, 2025 · 2 comments
Closed

Failing to compile on nightly under branch coverage #366

jayvdb opened this issue Jan 9, 2025 · 2 comments

Comments

@jayvdb
Copy link

jayvdb commented Jan 9, 2025

Under both v2 and v1.13.2 branches the following occurs on the latest nightly.
It was working 24 hrs ago.
This is likely a problem that needs to be upstream in rustc as noted, but capturing it here also as other users of this crate are likely going to be seeing this.

rust-smallvec> cargo +nightly llvm-cov --branch test --all-features
warning: --branch option is unstable
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 serde v1.0.217
   Compiling bincode v1.3.3
   Compiling smallvec v2.0.0-alpha.9 (/home/jayvdb/rust/rust-smallvec)
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize Alias(Projection, AliasTy { args: [A/#1, '{erased}], def_id: DefId(0:1610 ~ serde[72bd]::de::SeqAccess::Error), .. }), 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:     0x7f69d9ae3a7a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc48a3003e72a1fb5
   1:     0x7f69da213126 - core::fmt::write::h244b471aa97315bd
   2:     0x7f69db122211 - std::io::Write::write_fmt::h63cacec38f2c7922
   3:     0x7f69d9ae38d2 - std::sys::backtrace::BacktraceLock::print::h8e88b30882062ce8
   4:     0x7f69d9ae5e77 - std::panicking::default_hook::{{closure}}::he2b2f35b61e5b6b4
   5:     0x7f69d9ae5c60 - std::panicking::default_hook::h2b9fc43053d2ca15
   6:     0x7f69d8c568a8 - std[c08ade969ea4a026]::panicking::update_hook::<alloc[ecf666bc700c7d64]::boxed::Box<rustc_driver_impl[7ccddf7307cff907]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f69d9ae66c3 - std::panicking::rust_panic_with_hook::h1126dbe971a7f919
   8:     0x7f69d8c8ecc1 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}
   9:     0x7f69d8c83ea6 - std[c08ade969ea4a026]::sys::backtrace::__rust_end_short_backtrace::<std[c08ade969ea4a026]::panicking::begin_panic<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>::{closure#0}, !>
  10:     0x7f69d8c83c63 - std[c08ade969ea4a026]::panicking::begin_panic::<rustc_errors[1eaa06d4a73dafc5]::ExplicitBug>
  11:     0x7f69d8c98c21 - <rustc_errors[1eaa06d4a73dafc5]::diagnostic::BugAbort as rustc_errors[1eaa06d4a73dafc5]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7f69d926db03 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt::<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}
  13:     0x7f69d9252b1a - rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_opt::<rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7f69d92529ab - rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_context_opt::<rustc_middle[bc4ae9fc2bf4235a]::ty::context::tls::with_opt<rustc_middle[bc4ae9fc2bf4235a]::util::bug::opt_span_bug_fmt<rustc_span[cfc513d191a8d813]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7f69d73d3d20 - rustc_middle[bc4ae9fc2bf4235a]::util::bug::bug_fmt
  16:     0x7f69da80f12f - <rustc_middle[bc4ae9fc2bf4235a]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[72683c14ceefff53]::fold::TypeFolder<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>::fold_ty
  17:     0x7f69db48b513 - <&rustc_middle[bc4ae9fc2bf4235a]::ty::list::RawList<(), rustc_middle[bc4ae9fc2bf4235a]::ty::generic_args::GenericArg> as rustc_type_ir[72683c14ceefff53]::fold::TypeFoldable<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[bc4ae9fc2bf4235a]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
  18:     0x7f69d97afe45 - <rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir[72683c14ceefff53]::predicate::TraitRef<rustc_middle[bc4ae9fc2bf4235a]::ty::context::TyCtxt>>
  19:     0x7f69d97bcb75 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_impl_path
  20:     0x7f69d97bc0b9 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  21:     0x7f69d97bc7a5 - <rustc_symbol_mangling[403ef980f7f2d81]::v0::SymbolMangler as rustc_middle[bc4ae9fc2bf4235a]::ty::print::Printer>::print_def_path
  22:     0x7f69d97bbbd0 - rustc_symbol_mangling[403ef980f7f2d81]::v0::mangle
  23:     0x7f69dad226ae - rustc_symbol_mangling[403ef980f7f2d81]::symbol_name_provider
  24:     0x7f69dad2112a - rustc_query_impl[9bbd9b92042adb73]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9bbd9b92042adb73]::query_impl::symbol_name::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>
  25:     0x7f69dad200b7 - rustc_query_system[7c1448542a492b7f]::query::plumbing::try_execute_query::<rustc_query_impl[9bbd9b92042adb73]::DynamicConfig<rustc_query_system[7c1448542a492b7f]::query::caches::DefaultCache<rustc_middle[bc4ae9fc2bf4235a]::ty::instance::Instance, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[9bbd9b92042adb73]::plumbing::QueryCtxt, false>
  26:     0x7f69dad1fd22 - rustc_query_impl[9bbd9b92042adb73]::query_impl::symbol_name::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f69dada968c - rustc_middle[bc4ae9fc2bf4235a]::query::plumbing::query_get_at::<rustc_query_system[7c1448542a492b7f]::query::caches::DefaultCache<rustc_middle[bc4ae9fc2bf4235a]::ty::instance::Instance, rustc_middle[bc4ae9fc2bf4235a]::query::erase::Erased<[u8; 16usize]>>>
  28:     0x7f69d8add915 - rustc_codegen_llvm[cf0745383bf2fa70]::coverageinfo::mapgen::finalize
  29:     0x7f69dad3e458 - rustc_codegen_llvm[cf0745383bf2fa70]::base::compile_codegen_unit::module_codegen
  30:     0x7f69db1e9dc8 - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  31:     0x7f69db1e612c - <rustc_codegen_llvm[cf0745383bf2fa70]::LlvmCodegenBackend as rustc_codegen_ssa[8aad7319a10dd306]::traits::backend::CodegenBackend>::codegen_crate
  32:     0x7f69db1ee124 - <rustc_interface[9ea0a400d5371a28]::queries::Linker>::codegen_and_build_linker
  33:     0x7f69db158892 - rustc_interface[9ea0a400d5371a28]::passes::create_and_enter_global_ctxt::<core[6b5cbebef9c0da3b]::option::Option<rustc_interface[9ea0a400d5371a28]::queries::Linker>, rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  34:     0x7f69db1cba64 - rustc_interface[9ea0a400d5371a28]::interface::run_compiler::<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7f69db02d651 - std[c08ade969ea4a026]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_with_globals<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_pool_with_globals<rustc_interface[9ea0a400d5371a28]::interface::run_compiler<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:     0x7f69db02db08 - <<std[c08ade969ea4a026]::thread::Builder>::spawn_unchecked_<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_with_globals<rustc_interface[9ea0a400d5371a28]::util::run_in_thread_pool_with_globals<rustc_interface[9ea0a400d5371a28]::interface::run_compiler<(), rustc_driver_impl[7ccddf7307cff907]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[6b5cbebef9c0da3b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7f69db02f0af - std::sys::pal::unix::thread::Thread::new::thread_start::h2f2b51e924b57f78
  38:     0x7f69d52983b2 - start_thread
  39:     0x7f69d531d5fc - __clone3
  40:                0x0 - <unknown>

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 `/home/jayvdb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.217/rustc-ice-2025-01-09T10_59_17-2792671.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C instrument-coverage -Z coverage-options=branch

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

query stack during panic:
#0 [symbol_name] computing the symbol for `de::value::<impl at /home/jayvdb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.217/src/de/value.rs:1212:1: 1214:27>::into_deserializer`
end of query stack
error: could not compile `serde` (lib)

Caused by:
  process didn't exit successfully: `/home/jayvdb/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name serde --edition=2018 /home/jayvdb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.217/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=190 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "default", "derive", "rc", "serde_derive", "std", "unstable"))' -C metadata=0f48dfd3ac74974d -C extra-filename=-5a4c666c14890bf8 --out-dir /home/jayvdb/rust/rust-smallvec/target/llvm-cov-target/debug/deps -L dependency=/home/jayvdb/rust/rust-smallvec/target/llvm-cov-target/debug/deps --cap-lints allow -C instrument-coverage -Z coverage-options=branch --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target --check-cfg 'cfg(no_core_cstr)' --check-cfg 'cfg(no_core_error)' --check-cfg 'cfg(no_core_net)' --check-cfg 'cfg(no_core_num_saturating)' --check-cfg 'cfg(no_core_try_from)' --check-cfg 'cfg(no_diagnostic_namespace)' --check-cfg 'cfg(no_float_copysign)' --check-cfg 'cfg(no_num_nonzero_signed)' --check-cfg 'cfg(no_relaxed_trait_bounds)' --check-cfg 'cfg(no_serde_derive)' --check-cfg 'cfg(no_std_atomic)' --check-cfg 'cfg(no_std_atomic64)' --check-cfg 'cfg(no_systemtime_checked_add)' --check-cfg 'cfg(no_target_has_atomic)'` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
error: process didn't exit successfully: `/home/jayvdb/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo test --tests --manifest-path /home/jayvdb/rust/rust-smallvec/Cargo.toml --target-dir /home/jayvdb/rust/rust-smallvec/target/llvm-cov-target --all-features` (exit status: 101)
@jayvdb
Copy link
Author

jayvdb commented Jan 9, 2025

tracking issue upstream: rust-lang/rust#135235

@jayvdb
Copy link
Author

jayvdb commented Jan 12, 2025

Fixed in latest nightly.

@jayvdb jayvdb closed this as completed Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant