Skip to content

DepNodeIndex assertion failed while compiling rustc_metadata #148295

@zetanumbers

Description

@zetanumbers

Probably just another weird incremental+multithreaded bug. Or git somehow messed up the incremental compilation 🤷🏼.

Code

Commit 72fe2ff after git stash on very small code changes in compiler/rustc_hir/src/definitions.rs with RUSTFLAGS_BOOTSTRAP=-Zthreads24 set.

Meta

build/x86_64-unknown-linux-gnu/stage0/bin/rustc --version --verbose:

rustc 1.92.0-beta.1 (3b4dd9bf1 2025-10-28)
binary: rustc
commit-hash: 3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f
commit-date: 2025-10-28
host: x86_64-unknown-linux-gnu
release: 1.92.0-beta.1
LLVM version: 21.1.3

Error output

thread 'rustc' (247265) panicked at /rustc-dev/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/compiler/rustc_query_system/src/dep_graph/graph.rs:43:1:
assertion failed: value <= 0xFFFF_FF00
Backtrace

  0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   4: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   5: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   6: rustc_query_system::query::plumbing::ensure_must_run::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
   7: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
   8: rustc_data_structures::sync::parallel::par_slice::par_rec::<&rustc_span::def_id::LocalDefId, rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>
   9: <rustc_thread_pool::job::StackJob<rustc_thread_pool::latch::SpinLatch, rustc_thread_pool::join::join_context<rustc_thread_pool::join::join::call<(), rustc_data_structures::sync::parallel::par_slice::par_rec<&rustc_span::def_id::LocalDefId, rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>::{closure#1}>::{closure#0}, rustc_thread_pool::join::join::call<(), rustc_data_structures::sync::parallel::par_slice::par_rec<&rustc_span::def_id::LocalDefId, rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>::{closure#2}>::{closure#0}, (), ()>::{closure#0}::{closure#0}, ()> as rustc_thread_pool::job::Job>::execute
  10: <rustc_thread_pool::registry::WorkerThread>::wait_or_steal_until_cold
  11: <rustc_thread_pool::registry::ThreadBuilder>::run

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationA-parallel-compilerArea: parallel compilerC-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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions