Skip to content

ICE: uninterned StableCrateId: StableCrateId(0) #147201

@mullr

Description

@mullr

I intermittently get this error when compiling. Anecdotally, it happens about 1 in 20 times.

My environment is a little funny. I'm building inside of a docker image running RedHat UBI 9, with the target directory on a bind mount to the host system. That's running on an Ubuntu 24.04 machine, on aarch64. And THAT is running in a lima-managed VM, on top of MacOS 15.7, on an Apple M3 Pro chip.

The error happens when I do an incremental build; I have made a small change to a single crate.

I've added RUST_BACKTRACE=1 to my build script; I'll post back here with the additional information when it happens again.

Code

I'm afraid I can't share the code.

Meta

rustc --version --verbose:

rustc 1.90.0 (1159e78c4 2025-09-14)
binary: rustc
commit-hash: 1159e78c4747b02ef996e55082b704c09b970588
commit-date: 2025-09-14
host: aarch64-unknown-linux-gnu
release: 1.90.0
LLVM version: 20.1.8

Error output

error: internal compiler error: compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:709:32: uninterned StableCrateId: StableCrateId(0)


thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:709:32:
Box<dyn Any>
stack backtrace:
   0:     0xf687b42be7b0 - std::backtrace_rs::backtrace::libunwind::trace::hd276b12e818ebb1b
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
   1:     0xf687b42be7b0 - std::backtrace_rs::backtrace::trace_unsynchronized::haaac80839e3628e9
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
   2:     0xf687b42be7b0 - std::sys::backtrace::_print_fmt::h7e990a4dd702d79f
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9
   3:     0xf687b42be7b0 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc631692e4d6d1628
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26
   4:     0xf687b1c406cc - core::fmt::rt::Argument::fmt::h22d843ccec91f0f3
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76
   5:     0xf687b1c406cc - core::fmt::write::h7bf833af8f233fce
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25
   6:     0xf687b42b4018 - std::io::default_write_fmt::h1b7125a4e0f90f54
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11
   7:     0xf687b42b4018 - std::io::Write::write_fmt::h2db9ea039d566f6f
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13
   8:     0xf687b42be670 - std::sys::backtrace::BacktraceLock::print::h2501550d0c1c6b4b
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9
   9:     0xf687b42c1fa4 - std::panicking::default_hook::{{closure}}::hf7dbf92de055b5c9
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27
  10:     0xf687b42c1c98 - std::panicking::default_hook::hf2a38bcea5183167
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:327:9
  11:     0xf687b34dae9c - std[a08433b8d210d858]::panicking::update_hook::<alloc[7216593c9ea27fdf]::boxed::Box<rustc_driver_impl[df1e300a41c0ee7e]::install_ice_hook::{closure#1}>>::{closure#0}
  12:     0xf687b42c2824 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h87ce39970b09a3b4
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9
  13:     0xf687b42c2824 - std::panicking::rust_panic_with_hook::h6d5d1ccb6c488eac
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13
  14:     0xf687b3510718 - std[a08433b8d210d858]::panicking::begin_panic::<rustc_errors[574c470b1f8663fa]::ExplicitBug>::{closure#0}
  15:     0xf687b35068dc - std[a08433b8d210d858]::sys::backtrace::__rust_end_short_backtrace::<std[a08433b8d210d858]::panicking::begin_panic<rustc_errors[574c470b1f8663fa]::ExplicitBug>::{closure#0}, !>
  16:     0xf687b3502d4c - std[a08433b8d210d858]::panicking::begin_panic::<rustc_errors[574c470b1f8663fa]::ExplicitBug>
  17:     0xf687b3519804 - <rustc_errors[574c470b1f8663fa]::diagnostic::BugAbort as rustc_errors[574c470b1f8663fa]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  18:     0xf687b3a7ae48 - rustc_middle[ae1f17ff18bf27c4]::util::bug::opt_span_bug_fmt::<rustc_span[4cbc8e80b3940fae]::span_encoding::Span>::{closure#0}
  19:     0xf687b3a5d8ec - rustc_middle[ae1f17ff18bf27c4]::ty::context::tls::with_opt::<rustc_middle[ae1f17ff18bf27c4]::util::bug::opt_span_bug_fmt<rustc_span[4cbc8e80b3940fae]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  20:     0xf687b3a5d72c - rustc_middle[ae1f17ff18bf27c4]::ty::context::tls::with_context_opt::<rustc_middle[ae1f17ff18bf27c4]::ty::context::tls::with_opt<rustc_middle[ae1f17ff18bf27c4]::util::bug::opt_span_bug_fmt<rustc_span[4cbc8e80b3940fae]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  21:     0xf687b25d00d0 - rustc_middle[ae1f17ff18bf27c4]::util::bug::bug_fmt
  22:     0xf687b1ec95ec - <rustc_query_system[4489d169e895a4b4]::dep_graph::dep_node::DepNode as rustc_middle[ae1f17ff18bf27c4]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  23:     0xf687b16313a4 - rustc_query_impl[736fff5bd8782759]::plumbing::force_from_dep_node::<rustc_query_impl[736fff5bd8782759]::DynamicConfig<rustc_data_structures[e55acce88d2cede]::vec_cache::VecCache<rustc_hir[9fbc183b49f39574]::hir_id::OwnerId, rustc_middle[ae1f17ff18bf27c4]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[4489d169e895a4b4]::dep_graph::graph::DepNodeIndex>, false, false, false>>
  24:     0xf687b1b4638c - <rustc_query_system[4489d169e895a4b4]::dep_graph::graph::DepGraphData<rustc_middle[ae1f17ff18bf27c4]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[736fff5bd8782759]::plumbing::QueryCtxt>
  25:     0xf687b1b45a10 - <rustc_query_system[4489d169e895a4b4]::dep_graph::graph::DepGraphData<rustc_middle[ae1f17ff18bf27c4]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[736fff5bd8782759]::plumbing::QueryCtxt>
  26:     0xf687b2cf7cbc - rustc_query_system[4489d169e895a4b4]::query::plumbing::ensure_must_run::<rustc_query_impl[736fff5bd8782759]::DynamicConfig<rustc_query_system[4489d169e895a4b4]::query::caches::SingleCache<rustc_middle[ae1f17ff18bf27c4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[736fff5bd8782759]::plumbing::QueryCtxt>
  27:     0xf687b2cff650 - rustc_query_impl[736fff5bd8782759]::query_impl::entry_fn::get_query_incr::__rust_end_short_backtrace
  28:     0xf687b1f6d460 - rustc_interface[910b496cd1e31d79]::passes::analysis
  29:     0xf687b2cf5b10 - rustc_query_impl[736fff5bd8782759]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[736fff5bd8782759]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ae1f17ff18bf27c4]::query::erase::Erased<[u8; 0usize]>>
  30:     0xf687b2cf6d3c - rustc_query_system[4489d169e895a4b4]::query::plumbing::try_execute_query::<rustc_query_impl[736fff5bd8782759]::DynamicConfig<rustc_query_system[4489d169e895a4b4]::query::caches::SingleCache<rustc_middle[ae1f17ff18bf27c4]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[736fff5bd8782759]::plumbing::QueryCtxt, true>
  31:     0xf687b2cf65f0 - rustc_query_impl[736fff5bd8782759]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  32:     0xf687b2d521f8 - rustc_interface[910b496cd1e31d79]::passes::create_and_enter_global_ctxt::<core[e0c6978d3fe943a4]::option::Option<rustc_interface[910b496cd1e31d79]::queries::Linker>, rustc_driver_impl[df1e300a41c0ee7e]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  33:     0xf687b2a5ad84 - rustc_interface[910b496cd1e31d79]::interface::run_compiler::<(), rustc_driver_impl[df1e300a41c0ee7e]::run_compiler::{closure#0}>::{closure#1}
  34:     0xf687b2b19068 - std[a08433b8d210d858]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[910b496cd1e31d79]::util::run_in_thread_with_globals<rustc_interface[910b496cd1e31d79]::util::run_in_thread_pool_with_globals<rustc_interface[910b496cd1e31d79]::interface::run_compiler<(), rustc_driver_impl[df1e300a41c0ee7e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  35:     0xf687b2b0e5d4 - <<std[a08433b8d210d858]::thread::Builder>::spawn_unchecked_<rustc_interface[910b496cd1e31d79]::util::run_in_thread_with_globals<rustc_interface[910b496cd1e31d79]::util::run_in_thread_pool_with_globals<rustc_interface[910b496cd1e31d79]::interface::run_compiler<(), rustc_driver_impl[df1e300a41c0ee7e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[e0c6978d3fe943a4]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  36:     0xf687b42c6bf0 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a67626ac294dae1
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9
  37:     0xf687b42c6bf0 - std::sys::pal::unix::thread::Thread::new::thread_start::hc19e229732012ef9
                               at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17
  38:     0xf687aff19b40 - start_thread
  39:     0xf687aff8415c - thread_start
  40:                0x0 - <unknown>

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: rustc 1.90.0 (1159e78c4 2025-09-14) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 entry_fn(0-0)
end of try_mark_green dep node stack
error: could not compile `query` (bin "query")

Caused by:
  process didn't exit successfully: `/home/rmull4/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name query --edition=2024 crates/query/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=e2f97602294f7a2a -C extra-filename=-fb8354d1baa34ff9 --out-dir /src/target/ubi9/debug/deps -C incremental=/src/target/ubi9/debug/incremental -L dependency=/src/target/ubi9/debug/deps --extern anyhow=/src/target/ubi9/debug/deps/libanyhow-2da91dffc9b03fa9.rlib --extern axum=/src/target/ubi9/debug/deps/libaxum-5a32a5193cb2635b.rlib --extern axum_oidc=/src/target/ubi9/debug/deps/libaxum_oidc-17c8fbac52181907.rlib --extern chrono=/src/target/ubi9/debug/deps/libchrono-1ce6728f11262e1a.rlib --extern envy=/src/target/ubi9/debug/deps/libenvy-0fe3f147bece54db.rlib --extern reqwest=/src/target/ubi9/debug/deps/libreqwest-6ab6db377eef3800.rlib --extern serde=/src/target/ubi9/debug/deps/libserde-ae85a4d0fcfddabd.rlib --extern serde_json=/src/target/ubi9/debug/deps/libserde_json-a20077c66684fd9f.rlib --extern serde_urlencoded=/src/target/ubi9/debug/deps/libserde_urlencoded-94cbe3cd42f1f90e.rlib --extern sqlx=/src/target/ubi9/debug/deps/libsqlx-2f63a82b5a589dae.rlib --extern thiserror=/src/target/ubi9/debug/deps/libthiserror-ff288179d2905a4d.rlib --extern tokio=/src/target/ubi9/debug/deps/libtokio-7d0e81a61fe92044.rlib --extern tracing=/src/target/ubi9/debug/deps/libtracing-a2371bda44ddc48e.rlib --extern tracing_subscriber=/src/target/ubi9/debug/deps/libtracing_subscriber-22aed25865b94969.rlib --extern url=/src/target/ubi9/debug/deps/liburl-09b55fb162939b3c.rlib --extern utoipa=/src/target/ubi9/debug/deps/libutoipa-49a6b23f5a7b47a1.rlib -L native=/src/target/ubi9/debug/build/ring-befca75aff8f32a2/out` (exit status: 101)
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-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