ICE: transient panic in cstore_impl.rs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
May be related to: https://github.com/rust-lang/rust/issues/148576, https://github.com/rust-lang/rust/issues/149697.
While working on a project, I noticed the following file had appeared in the project root:
rustc-ice-2025-12-15T22_46_57-51355.txt
I'm not sure what caused it, but I figured I'd provide its contents here in case someone encounters a similar issue.
Before then I noticed I was having some issues getting rust-analyzer to recognize a module as a part of the file tree after I issued an LSP command (via Zed) to rename a folder containing a mod.rs. This may be completely unrelated, however.
Meta
rustc --version --verbose:
rustc 1.91.0-nightly (6ba0ce409 2025-08-21)
binary: rustc
commit-hash: 6ba0ce40941eee1ca02e9ba49c791ada5158747a
commit-date: 2025-08-21
host: aarch64-apple-darwin
release: 1.91.0-nightly
LLVM version: 21.1.0
Error output
See details for full backtrace:
Backtrace
thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:692:32:
Box<dyn Any>
stack backtrace:
0: 0x110593668 - std::backtrace::Backtrace::create::h5663981ce73a174f
1: 0x10e5fb1ac - rustc_driver_impl[630d3111ef02b9d8]::install_ice_hook::{closure#1}
2: 0x11058ab48 - std::panicking::panic_with_hook::hffdc458c545a548b
3: 0x10e6d4e8c - std[299b698f6100d167]::panicking::begin_panic::<rustc_errors[60a837efbe2b5142]::ExplicitBug>::{closure#0}
4: 0x10e6d4e5c - std[299b698f6100d167]::sys::backtrace::__rust_end_short_backtrace::<std[299b698f6100d167]::panicking::begin_panic<rustc_errors[60a837efbe2b5142]::ExplicitBug>::{closure#0}, !>
5: 0x11335ad04 - std[299b698f6100d167]::panicking::begin_panic::<rustc_errors[60a837efbe2b5142]::ExplicitBug>
6: 0x11335746c - <rustc_errors[60a837efbe2b5142]::diagnostic::BugAbort as rustc_errors[60a837efbe2b5142]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
7: 0x1133b0e50 - rustc_middle[f163148c521ccef4]::util::bug::opt_span_bug_fmt::<rustc_span[b89bf32fa74290af]::span_encoding::Span>::{closure#0}
8: 0x10f364d64 - rustc_middle[f163148c521ccef4]::ty::context::tls::with_opt::<rustc_middle[f163148c521ccef4]::util::bug::opt_span_bug_fmt<rustc_span[b89bf32fa74290af]::span_encoding::Span>::{closure#0}, !>::{closure#0}
9: 0x10f364d30 - rustc_middle[f163148c521ccef4]::ty::context::tls::with_context_opt::<rustc_middle[f163148c521ccef4]::ty::context::tls::with_opt<rustc_middle[f163148c521ccef4]::util::bug::opt_span_bug_fmt<rustc_span[b89bf32fa74290af]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
10: 0x1133b0e88 - rustc_middle[f163148c521ccef4]::util::bug::bug_fmt
11: 0x10f18ce34 - <rustc_metadata[1114383d1d0a92df]::rmeta::decoder::cstore_impl::provide_cstore_hooks::{closure#0} as core[ffba9b917033cfae]::ops::function::FnOnce<(rustc_middle[f163148c521ccef4]::ty::context::TyCtxt, rustc_span[b89bf32fa74290af]::def_id::DefPathHash, rustc_span[b89bf32fa74290af]::def_id::StableCrateId)>>::call_once
12: 0x10f23e8bc - <rustc_middle[f163148c521ccef4]::ty::context::TyCtxt>::def_path_hash_to_def_id
13: 0x10fbfebbc - rustc_query_impl[20f71b674d03b0f7]::plumbing::force_from_dep_node::<rustc_query_impl[20f71b674d03b0f7]::DynamicConfig<rustc_data_structures[6bd2b9243466d873]::vec_cache::VecCache<rustc_span[b89bf32fa74290af]::def_id::LocalDefId, rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[d0c8b3c65c3b9d8a]::dep_graph::graph::DepNodeIndex>, false, false, false>>
14: 0x10fbf7c80 - <rustc_query_impl[20f71b674d03b0f7]::plumbing::query_callback<rustc_query_impl[20f71b674d03b0f7]::query_impl::local_def_id_to_hir_id::QueryType>::{closure#0} as core[ffba9b917033cfae]::ops::function::FnOnce<(rustc_middle[f163148c521ccef4]::ty::context::TyCtxt, rustc_query_system[d0c8b3c65c3b9d8a]::dep_graph::dep_node::DepNode, rustc_query_system[d0c8b3c65c3b9d8a]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
15: 0x10fc2a758 - <rustc_query_system[d0c8b3c65c3b9d8a]::dep_graph::graph::DepGraphData<rustc_middle[f163148c521ccef4]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[20f71b674d03b0f7]::plumbing::QueryCtxt>
16: 0x10fc285f0 - <rustc_query_system[d0c8b3c65c3b9d8a]::dep_graph::graph::DepGraphData<rustc_middle[f163148c521ccef4]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[20f71b674d03b0f7]::plumbing::QueryCtxt>
17: 0x10fa7f14c - rustc_query_system[d0c8b3c65c3b9d8a]::query::plumbing::try_execute_query::<rustc_query_impl[20f71b674d03b0f7]::DynamicConfig<rustc_query_system[d0c8b3c65c3b9d8a]::query::caches::DefIdCache<rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[20f71b674d03b0f7]::plumbing::QueryCtxt, true>
18: 0x10fd8bbdc - rustc_query_impl[20f71b674d03b0f7]::query_impl::def_span::get_query_incr::__rust_end_short_backtrace
19: 0x10f8e7f08 - rustc_passes[53e878855b1e198a]::entry::entry_fn
20: 0x10fc033d8 - rustc_query_impl[20f71b674d03b0f7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[20f71b674d03b0f7]::query_impl::entry_fn::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 12usize]>>
21: 0x10fae5950 - rustc_query_system[d0c8b3c65c3b9d8a]::query::plumbing::try_execute_query::<rustc_query_impl[20f71b674d03b0f7]::DynamicConfig<rustc_query_system[d0c8b3c65c3b9d8a]::query::caches::SingleCache<rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 12usize]>>, false, false, false>, rustc_query_impl[20f71b674d03b0f7]::plumbing::QueryCtxt, true>
22: 0x10fda2858 - rustc_query_impl[20f71b674d03b0f7]::query_impl::entry_fn::get_query_incr::__rust_end_short_backtrace
23: 0x10ee7115c - rustc_interface[12a2d3700f2b4c86]::passes::run_required_analyses
24: 0x10ee8660c - rustc_interface[12a2d3700f2b4c86]::passes::analysis
25: 0x10fbfc8d4 - rustc_query_impl[20f71b674d03b0f7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[20f71b674d03b0f7]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 0usize]>>
26: 0x10faa94c8 - rustc_query_system[d0c8b3c65c3b9d8a]::query::plumbing::try_execute_query::<rustc_query_impl[20f71b674d03b0f7]::DynamicConfig<rustc_query_system[d0c8b3c65c3b9d8a]::query::caches::SingleCache<rustc_middle[f163148c521ccef4]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[20f71b674d03b0f7]::plumbing::QueryCtxt, true>
27: 0x10fd9f8ec - rustc_query_impl[20f71b674d03b0f7]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
28: 0x10e62ab74 - rustc_interface[12a2d3700f2b4c86]::passes::create_and_enter_global_ctxt::<core[ffba9b917033cfae]::option::Option<rustc_interface[12a2d3700f2b4c86]::queries::Linker>, rustc_driver_impl[630d3111ef02b9d8]::run_compiler::{closure#0}::{closure#2}>
29: 0x10e606bbc - rustc_interface[12a2d3700f2b4c86]::interface::run_compiler::<(), rustc_driver_impl[630d3111ef02b9d8]::run_compiler::{closure#0}>::{closure#1}
30: 0x10e63e714 - std[299b698f6100d167]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[12a2d3700f2b4c86]::util::run_in_thread_with_globals<rustc_interface[12a2d3700f2b4c86]::util::run_in_thread_pool_with_globals<rustc_interface[12a2d3700f2b4c86]::interface::run_compiler<(), rustc_driver_impl[630d3111ef02b9d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
31: 0x10e62df44 - <<std[299b698f6100d167]::thread::Builder>::spawn_unchecked_<rustc_interface[12a2d3700f2b4c86]::util::run_in_thread_with_globals<rustc_interface[12a2d3700f2b4c86]::util::run_in_thread_pool_with_globals<rustc_interface[12a2d3700f2b4c86]::interface::run_compiler<(), rustc_driver_impl[630d3111ef02b9d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[ffba9b917033cfae]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
32: 0x110587180 - std::sys::pal::unix::thread::Thread::new::thread_start::hb7546f7c05dbb7eb
33: 0x190f31c08 - __pthread_cond_wait
rustc version: 1.91.0-nightly (6ba0ce409 2025-08-21)
platform: aarch64-apple-darwin
query stack during panic:
#0 [def_span] looking up span for `main`
#1 [entry_fn] looking up the entry function of a crate
#2 [analysis] running analysis passes on this crate
end of query stack
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:692 and compare the behavior with related issues #148576 and #149697. Try to reduce the reported nightly ICE to a minimal reproducible example, checking whether the preceding rust-analyzer/Zed module rename is relevant. Done means identifying a reproducible trigger and validating a compiler fix or regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100