rust-lang / rust-lang/rust

Compiler unexpectedly panicked

Open
#149,311 1 comment 0 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

Hello, today I had a panic during compilation to wasm32. Unfortunately I cannot reproduce it, it worked after cargo clean. The data is below

Meta

rustc --version --verbose:

rustc 1.93.0-nightly (94b49fd99 2025-11-22)
binary: rustc
commit-hash: 94b49fd998d6723e0a9240a7cff5f9df37b84dd8
commit-date: 2025-11-22
host: x86_64-unknown-linux-gnu
release: 1.93.0-nightly
LLVM version: 21.1.5
Error output
thread 'rustc' panicked at /rustc-dev/94b49fd998d6723e0a9240a7cff5f9df37b84dd8/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: 58 }(b48dbd9815b938d2-a60ee5df1c5195e)
stack backtrace:
   0:     0x7f9a16e557db - std::backtrace::Backtrace::create::h392f8e0573381c67
   1:     0x7f9a16e55725 - std::backtrace::Backtrace::force_capture::hc23684700ff4a74b
   2:     0x7f9a15edb5ee - std[df35e42f6a34002b]::panicking::update_hook::<alloc[6172d4cc99e83e55]::boxed::Box<rustc_driver_impl[aa2ac209e2f71d8e]::install_ice_hook::{closure#1}>>::{closure#0}
   3:     0x7f9a16e56692 - std::panicking::panic_with_hook::hb60d75bf2ed00241
   4:     0x7f9a16e56428 - std::panicking::panic_handler::{{closure}}::h1ee55c9d1789bc89
   5:     0x7f9a16e50469 - std::sys::backtrace::__rust_end_short_backtrace::hf332718482ddf616
   6:     0x7f9a16e3174d - __rustc[b6eabfaa35b60ce7]::rust_begin_unwind
   7:     0x7f9a1404d9ec - core::panicking::panic_fmt::h70822b95d1035f04
   8:     0x7f9a1873e5d5 - rustc_incremental[9ef051be951760fc]::persist::load::setup_dep_graph
   9:     0x7f9a18588c6d - rustc_interface[6c5b7d1af19e4954]::interface::run_compiler::<(), rustc_driver_impl[aa2ac209e2f71d8e]::run_compiler::{closure#0}>::{closure#1}
  10:     0x7f9a184faf14 - std[df35e42f6a34002b]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[6c5b7d1af19e4954]::util::run_in_thread_with_globals<rustc_interface[6c5b7d1af19e4954]::util::run_in_thread_pool_with_globals<rustc_interface[6c5b7d1af19e4954]::interface::run_compiler<(), rustc_driver_impl[aa2ac209e2f71d8e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  11:     0x7f9a184fac1e - <<std[df35e42f6a34002b]::thread::Builder>::spawn_unchecked_<rustc_interface[6c5b7d1af19e4954]::util::run_in_thread_with_globals<rustc_interface[6c5b7d1af19e4954]::util::run_in_thread_pool_with_globals<rustc_interface[6c5b7d1af19e4954]::interface::run_compiler<(), rustc_driver_impl[aa2ac209e2f71d8e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f004b6afb7c8d423]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  12:     0x7f9a18500a2f - std::sys::thread::unix::Thread::new::thread_start::h6b600d90916512c1
  13:     0x7f9a1209a97a - start_thread
  14:     0x7f9a12122d2c - __GI___clone3
  15:                0x0 - <unknown>


rustc version: 1.93.0-nightly (94b49fd99 2025-11-22)
platform: x86_64-unknown-linux-gnu

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 with the panic location in compiler/rustc_query_system/src/dep_graph/serialized.rs:284 and the rustc_incremental persist::load::setup_dep_graph frame. Try to reproduce the wasm32 incremental-compilation failure, using cargo clean and -Z incremental-verify-ich as suggested. Done would require a reproducible case and a confirmed resolution for the duplicate dep-graph index panic.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.