rust-lang / rust-lang/rust

Error: A dep graph node (mir_drops_elaborated_and_const_checked) does not have an unique index.

Open
#144,441 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-incr-comp C-bug I-ICE S-needs-repro T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

This was a transient error. I started following the instructions to debug, but after 'cargo clean' it "worked" without upgrading the compiler. As I'm no longer able to replicate it, I'm not sure how helpful this report will be...

Code

Unable to provide.

Meta

rustc --version:

rustc 1.88.0 (6b00bc388 2025-06-23)
Error output
thread 'rustc' panicked at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/compiler/rustc_query_system/src/dep_graph/serialized.rs:284:21:
Error: A dep graph node (mir_drops_elaborated_and_const_checked) 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: 55 }(d8d994139a368e95-43443ad1da2179ef)
stack backtrace:
   0:     0x7fd306900cd2 - std::backtrace_rs::backtrace::libunwind::trace::h07b464ba1a39fec2
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
   1:     0x7fd306900cd2 - std::backtrace_rs::backtrace::trace_unsynchronized::hd7ed72492808aeb8
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
   2:     0x7fd306900cd2 - std::sys::backtrace::_print_fmt::h705128e5d29b2cb9
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/sys/backtrace.rs:66:9
   3:     0x7fd306900cd2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h4b468a00e1d0cfb3
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/sys/backtrace.rs:39:26
   4:     0x7fd30694c873 - core::fmt::rt::Argument::fmt::hac399a46233e756b
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/core/src/fmt/rt.rs:181:76
   5:     0x7fd30694c873 - core::fmt::write::hdc1fc9a524040222
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/core/src/fmt/mod.rs:1446:25
   6:     0x7fd3068f5523 - std::io::default_write_fmt::haeae9d6633819b60
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/io/mod.rs:639:11
   7:     0x7fd3068f5523 - std::io::Write::write_fmt::hc6070a7eadf2ef05
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/io/mod.rs:1914:13
   8:     0x7fd306900b22 - std::sys::backtrace::BacktraceLock::print::h51ed30a23b9aa12e
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/sys/backtrace.rs:42:9
   9:     0x7fd30690481c - std::panicking::default_hook::{{closure}}::h513fb43c6fb13bac
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/panicking.rs:300:22
  10:     0x7fd30690461f - std::panicking::default_hook::h7d42a331fe21b111
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/panicking.rs:327:9
  11:     0x7fd2ff00dde2 - <alloc[29baaddd4a72e6f6]::boxed::Box<rustc_driver_impl[af7bfd6d15711e00]::install_ice_hook::{closure#1}> as core[1c7d6ac65e8f99bc]::ops::function::Fn<(&dyn for<'a, 'b> core[1c7d6ac65e8f99bc]::ops::function::Fn<(&'a std[a90c730f755c31c5]::panic::PanicHookInfo<'b>,), Output = ()> + core[1c7d6ac65e8f99bc]::marker::Send + core[1c7d6ac65e8f99bc]::marker::Sync, &std[a90c730f755c31c5]::panic::PanicHookInfo)>>::call
  12:     0x7fd306905303 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5d696daa813d5ce5
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/alloc/src/boxed.rs:1980:9
  13:     0x7fd306905303 - std::panicking::rust_panic_with_hook::h8c5b06e6fbde8cc6
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/panicking.rs:841:13
  14:     0x7fd306904fda - std::panicking::begin_panic_handler::{{closure}}::hb2d7871776dd6f92
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/panicking.rs:706:13
  15:     0x7fd3069011c9 - std::sys::backtrace::__rust_end_short_backtrace::h2e68ab90f89f891f
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/sys/backtrace.rs:168:18
  16:     0x7fd306904c6d - __rustc[f67a3b4e60d8f4c4]::rust_begin_unwind
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/panicking.rs:697:5
  17:     0x7fd2fee5de80 - core::panicking::panic_fmt::h7f8d5731b7ac1326
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/core/src/panicking.rs:75:14
  18:     0x7fd305ae459d - <rustc_query_system[41fb662b5a94adb]::dep_graph::serialized::SerializedDepGraph>::decode::<rustc_middle[6344956a75e93216]::dep_graph::DepsType>
  19:     0x7fd305adb1eb - rustc_incremental[483150aad1e8de6d]::persist::load::setup_dep_graph
  20:     0x7fd2ff03ae48 - rustc_interface[66c70064d860d1ec]::passes::create_and_enter_global_ctxt::<core[1c7d6ac65e8f99bc]::option::Option<rustc_interface[66c70064d860d1ec]::queries::Linker>, rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}::{closure#2}>
  21:     0x7fd2ff053e7c - <rayon_core[3e7b88acf172d05b]::thread_pool::ThreadPool>::install::<rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#1}::{closure#0}, ()>::{closure#0}
  22:     0x7fd2ff055333 - <rayon_core[3e7b88acf172d05b]::job::StackJob<rayon_core[3e7b88acf172d05b]::latch::LatchRef<rayon_core[3e7b88acf172d05b]::latch::LockLatch>, <rayon_core[3e7b88acf172d05b]::registry::Registry>::in_worker_cold<<rayon_core[3e7b88acf172d05b]::thread_pool::ThreadPool>::install<rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#1}::{closure#0}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> as rayon_core[3e7b88acf172d05b]::job::Job>::execute
  23:     0x7fd2fee51f74 - <rayon_core[3e7b88acf172d05b]::registry::WorkerThread>::wait_until_cold
  24:     0x7fd30687f9a6 - <rayon_core[3e7b88acf172d05b]::registry::ThreadBuilder>::run
  25:     0x7fd2feff3e71 - rustc_span[ea12bb445c524975]::set_session_globals_then::<(), rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#0}::{closure#0}>
  26:     0x7fd2fefab8f5 - std[a90c730f755c31c5]::sys::backtrace::__rust_begin_short_backtrace::<<rayon_core[3e7b88acf172d05b]::ThreadPoolBuilder>::build_scoped<rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#0}, rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#1}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
  27:     0x7fd2fefc6c6a - <<std[a90c730f755c31c5]::thread::Builder>::spawn_unchecked_<<rayon_core[3e7b88acf172d05b]::ThreadPoolBuilder>::build_scoped<rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#0}, rustc_interface[66c70064d860d1ec]::util::run_in_thread_pool_with_globals<rustc_interface[66c70064d860d1ec]::interface::run_compiler<(), rustc_driver_impl[af7bfd6d15711e00]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#5}::{closure#0}::{closure#1}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#1} as core[1c7d6ac65e8f99bc]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:     0x7fd306907c0b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd8af81633cf8c0e5
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/alloc/src/boxed.rs:1966:9
  29:     0x7fd306907c0b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h648c89e9d88407d7
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/alloc/src/boxed.rs:1966:9
  30:     0x7fd306907c0b - std::sys::pal::unix::thread::Thread::new::thread_start::h63a285a49202a77d
                               at /rustc/50aa04180709189a03dde5fd1c05751b2625ed37/library/std/src/sys/pal/unix/thread.rs:97:17
  31:     0x7fd30b3d79d2 - start
                               at /home/buildozer/aports/main/musl/src/musl-1.2.5/src/thread/pthread_create.c:207:2

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: compiler flags: --crate-type lib -C embed-bitcode=no -C incremental=[REDACTED] -C strip=debuginfo -C target-feature=-crt-static -Z threads=24

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

query stack during panic:
end of query stack

rustc-ice-2025-07-25T09_23_16-603.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at compiler/rustc_query_system/src/dep_graph/serialized.rs:284 and review the incremental dep-graph loading path, using the attached ICE report and the recorded rustc 1.88.0 flags. Try the suggested clean nightly build with -Z incremental-verify-ich; done means reproducing the panic well enough to identify its cause or confirming that it cannot be investigated without more information.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.