Skip to content

trait_impls_of does not have an unique index (DepKind variant: 166) #139110

Description

@kornelski

I occasionally get a corrupted target directory:

thread 'rustc' panicked at /rustc/920d95eaf23d7eb6b415d09868e4f793024fa604/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: 166 }(edc9942d4bc9e683-29b7d5f0f789d82)
stack backtrace:
   0:        0x1108599e4 - std::backtrace::Backtrace::create::h23b6908fc40e125e
   1:        0x10ea09454 - std[54631d7a81de9e90]::panicking::update_hook::<alloc[898041eeb075be66]::boxed::Box<rustc_driver_impl[cbe3ee50a9b64982]::install_ice_hook::{closure#1}>>::{closure#0}
   2:        0x11087499c - std::panicking::rust_panic_with_hook::h6e33d145b73c56b6
   3:        0x110874590 - std::panicking::begin_panic_handler::{{closure}}::h1b530e3befd00369
   4:        0x110871f80 - std::sys::backtrace::__rust_end_short_backtrace::h08b2dd416eec9a36
   5:        0x110874258 - __rustc[30d06caa1ba95d]::rust_begin_unwind
   6:        0x1134cd77c - core::panicking::panic_fmt::ha09de3336dfd93b2
   7:        0x10f1669ec - rustc_incremental[b6678e5139e06e3a]::persist::load::setup_dep_graph
   8:        0x10e9b51b8 - rustc_interface[21db00968683b297]::passes::create_and_enter_global_ctxt::<core[edc9942d4bc9e683]::option::Option<rustc_interface[21db00968683b297]::queries::Linker>, rustc_driver_impl[cbe3ee50a9b64982]::run_compiler::{closure#0}::{closure#2}>
   9:        0x10ea06098 - rustc_interface[21db00968683b297]::interface::run_compiler::<(), rustc_driver_impl[cbe3ee50a9b64982]::run_compiler::{closure#0}>::{closure#1}
  10:        0x10ea2f4d4 - <rayon_core[ea3f96dfc7cd810e]::job::StackJob<rayon_core[ea3f96dfc7cd810e]::latch::LatchRef<rayon_core[ea3f96dfc7cd810e]::latch::LockLatch>, <rayon_core[ea3f96dfc7cd810e]::registry::Registry>::in_worker_cold<<rayon_core[ea3f96dfc7cd810e]::thread_pool::ThreadPool>::install<rustc_interface[21db00968683b297]::util::run_in_thread_pool_with_globals<rustc_interface[21db00968683b297]::interface::run_compiler<(), rustc_driver_impl[cbe3ee50a9b64982]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}::{closure#0}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> as rayon_core[ea3f96dfc7cd810e]::job::Job>::execute
  11:        0x1134df5c4 - <rayon_core[ea3f96dfc7cd810e]::registry::WorkerThread>::wait_until_cold
  12:        0x10e0738d8 - <rayon_core[ea3f96dfc7cd810e]::registry::ThreadBuilder>::run
  13:        0x10ea0d4e4 - <<crossbeam_utils[32e36cdb49266747]::thread::ScopedThreadBuilder>::spawn<<rayon_core[ea3f96dfc7cd810e]::ThreadPoolBuilder>::build_scoped<rustc_interface[21db00968683b297]::util::run_in_thread_pool_with_globals<rustc_interface[21db00968683b297]::interface::run_compiler<(), rustc_driver_impl[cbe3ee50a9b64982]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[21db00968683b297]::util::run_in_thread_pool_with_globals<rustc_interface[21db00968683b297]::interface::run_compiler<(), rustc_driver_impl[cbe3ee50a9b64982]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#3}::{closure#0}::{closure#1}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[edc9942d4bc9e683]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  14:        0x10e9f6270 - std[54631d7a81de9e90]::sys::backtrace::__rust_begin_short_backtrace::<alloc[898041eeb075be66]::boxed::Box<dyn core[edc9942d4bc9e683]::ops::function::FnOnce<(), Output = ()> + core[edc9942d4bc9e683]::marker::Send>, ()>
  15:        0x10ea0c534 - <<std[54631d7a81de9e90]::thread::Builder>::spawn_unchecked_<alloc[898041eeb075be66]::boxed::Box<dyn core[edc9942d4bc9e683]::ops::function::FnOnce<(), Output = ()> + core[edc9942d4bc9e683]::marker::Send>, ()>::{closure#1} as core[edc9942d4bc9e683]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  16:        0x110878a30 - std::sys::pal::unix::thread::Thread::new::thread_start::hc32cbdf418fc6461
  17:        0x1805e5c0c - __pthread_cond_wait


rustc version: 1.87.0-nightly (920d95eaf 2025-03-28)
platform: aarch64-apple-darwin
compiler flags: --crate-type lib -C opt-level=1 -C embed-bitcode=no -C debuginfo=line-tables-only -C split-debuginfo=unpacked -C debug-assertions=on -C incremental=[REDACTED] -Z incremental-verify-ich

I have -Zincremental-verify-ich set, but it doesn't seem to change anything.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions