Skip to content

A dep graph node (trait_impls_of) does not have an unique index #139649

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

Open
winterqt opened this issue Apr 10, 2025 · 2 comments
Open

A dep graph node (trait_impls_of) does not have an unique index #139649

winterqt opened this issue Apr 10, 2025 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@winterqt
Copy link
Contributor

winterqt commented Apr 10, 2025

Code

https://github.com/jj-vcs/jj, running cargo nextest run --workspace (which in turn runs cargo test --no-run --message-format json-render-diagnostics --workspace)

Meta

rustc --version --verbose:

rustc 1.88.0-nightly (934880f58 2025-04-09)
binary: rustc
commit-hash: 934880f586f6ac1f952c7090e2a943fcd7775e7b
commit-date: 2025-04-09
host: aarch64-apple-darwin
release: 1.88.0-nightly
LLVM version: 20.1.2

Error output

thread 'rustc' panicked at /rustc/934880f586f6ac1f952c7090e2a943fcd7775e7b/compiler/rustc_query_system/src/dep_graph/serialized.rs:260:21:
Error: A dep graph node (trait_impls_of) does not have an unique index. Running a clean build on a nightly compiler with `-Z incremental-verify-ich` can help narrow down the issue for reporting. A clean build may also work around the issue.

                     DepNode: DepKind { variant: 169 }(c744a15b6df11980-6a9a7eac3146488b)
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rustc_incremental::persist::load::setup_dep_graph
   3: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
   4: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
   5: <rayon_core::job::StackJob<rayon_core::latch::LatchRef<rayon_core::latch::LockLatch>, <rayon_core::registry::Registry>::in_worker_cold<<rayon_core::thread_pool::ThreadPool>::install<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}::{closure#0}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> as rayon_core::job::Job>::execute
   6: <rayon_core::registry::WorkerThread>::wait_until_cold
   7: <rayon_core::registry::ThreadBuilder>::run
   8: <<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: please attach the file at `/Users/winter/src/jj/rustc-ice-2025-04-10T21_18_37-30228.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED] -Z threads=0 -C link-arg=--ld-path=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -C link-arg=-ld_new

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

query stack during panic:
end of query stack
Backtrace

thread 'rustc' panicked at /rustc/934880f586f6ac1f952c7090e2a943fcd7775e7b/compiler/rustc_query_system/src/dep_graph/serialized.rs:260:21:
Error: A dep graph node (trait_impls_of) does not have an unique index. Running a clean build on a nightly compiler with `-Z incremental-verify-ich` can help narrow down the issue for reporting. A clean build may also work around the issue.

                     DepNode: DepKind { variant: 169 }(c744a15b6df11980-6a9a7eac3146488b)
stack backtrace:
   0:        0x112895268 - std::backtrace::Backtrace::create::h17f888852e68a44a
   1:        0x110a4e634 - std[70c9049a42b03de5]::panicking::update_hook::<alloc[74b034654ac3fdbc]::boxed::Box<rustc_driver_impl[2777dae85bcdc542]::install_ice_hook::{closure#1}>>::{closure#0}
   2:        0x1128b2474 - std::panicking::rust_panic_with_hook::h6b7a05e53928ce77
   3:        0x1128b2068 - std::panicking::begin_panic_handler::{{closure}}::h39dc510728b047cc
   4:        0x1128ad81c - std::sys::backtrace::__rust_end_short_backtrace::hd517d603628e7522
   5:        0x1128b1d30 - __rustc[6f2d661375f3a635]::rust_begin_unwind
   6:        0x11550c30c - core::panicking::panic_fmt::h1ad4a09f28d1fd9f
   7:        0x1111b8c6c - rustc_incremental[60da000121c956ed]::persist::load::setup_dep_graph
   8:        0x1109ff8a4 - rustc_interface[8211e4b8c5d175f5]::passes::create_and_enter_global_ctxt::<core[c744a15b6df11980]::option::Option<rustc_interface[8211e4b8c5d175f5]::queries::Linker>, rustc_driver_impl[2777dae85bcdc542]::run_compiler::{closure#0}::{closure#2}>
   9:        0x110a529ec - rustc_interface[8211e4b8c5d175f5]::interface::run_compiler::<(), rustc_driver_impl[2777dae85bcdc542]::run_compiler::{closure#0}>::{closure#1}
  10:        0x110a79998 - <rayon_core[ca3670d84b00c920]::job::StackJob<rayon_core[ca3670d84b00c920]::latch::LatchRef<rayon_core[ca3670d84b00c920]::latch::LockLatch>, <rayon_core[ca3670d84b00c920]::registry::Registry>::in_worker_cold<<rayon_core[ca3670d84b00c920]::thread_pool::ThreadPool>::install<rustc_interface[8211e4b8c5d175f5]::util::run_in_thread_pool_with_globals<rustc_interface[8211e4b8c5d175f5]::interface::run_compiler<(), rustc_driver_impl[2777dae85bcdc542]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}::{closure#0}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> as rayon_core[ca3670d84b00c920]::job::Job>::execute
  11:        0x11551e100 - <rayon_core[ca3670d84b00c920]::registry::WorkerThread>::wait_until_cold
  12:        0x1100aa1f0 - <rayon_core[ca3670d84b00c920]::registry::ThreadBuilder>::run
  13:        0x110a5748c - <<crossbeam_utils[acff86deb04820b8]::thread::ScopedThreadBuilder>::spawn<<rayon_core[ca3670d84b00c920]::ThreadPoolBuilder>::build_scoped<rustc_interface[8211e4b8c5d175f5]::util::run_in_thread_pool_with_globals<rustc_interface[8211e4b8c5d175f5]::interface::run_compiler<(), rustc_driver_impl[2777dae85bcdc542]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[8211e4b8c5d175f5]::util::run_in_thread_pool_with_globals<rustc_interface[8211e4b8c5d175f5]::interface::run_compiler<(), rustc_driver_impl[2777dae85bcdc542]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[c744a15b6df11980]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  14:        0x110a40840 - std[70c9049a42b03de5]::sys::backtrace::__rust_begin_short_backtrace::<alloc[74b034654ac3fdbc]::boxed::Box<dyn core[c744a15b6df11980]::ops::function::FnOnce<(), Output = ()> + core[c744a15b6df11980]::marker::Send>, ()>
  15:        0x110a564dc - <<std[70c9049a42b03de5]::thread::Builder>::spawn_unchecked_<alloc[74b034654ac3fdbc]::boxed::Box<dyn core[c744a15b6df11980]::ops::function::FnOnce<(), Output = ()> + core[c744a15b6df11980]::marker::Send>, ()>::{closure#1} as core[c744a15b6df11980]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  16:        0x1128b5ca0 - std::sys::pal::unix::thread::Thread::new::thread_start::h47a9973da2b56b07
  17:        0x18252c2e4 - __pthread_deallocate


rustc version: 1.88.0-nightly (934880f58 2025-04-09)
platform: aarch64-apple-darwin

-Z incremental-verify-ich on the same target/ causes the command to complete successfully... up to a certain point, then it fails again.

@winterqt winterqt 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 Apr 10, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 10, 2025
@cyrgani
Copy link
Contributor

cyrgani commented Apr 10, 2025

duplicate of #139110 probably

@moxian
Copy link
Contributor

moxian commented Apr 30, 2025

@rustbot label: +A-incr-comp

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. 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