Thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:506:5:
Open
Nobody has claimed this yet.
C-bug
I-ICE
S-needs-info
S-needs-repro
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
Compiling the main branch (aka commit 3935dc9cb6f74db8bf301c3a210473b2c7be9131) of https://github.com/spaceandtimefdn/sxt-proof-of-sql-sdk to run the cli example
That is,
cargo build --example cli
Meta
rustc --version --verbose:
rustc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: x86_64-unknown-linux-gnu
release: 1.85.0
LLVM version: 19.1.7
Error output
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:506:5:
assertion `left == right` failed
left: 3733157840821228655755399166
right: 1002111927320821928687967599834759150
stack backtrace:
0: 0x74c078adc07a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::he089f96442833f67
1: 0x74c079214d26 - core::fmt::write::h2f210ed4c94745cb
2: 0x74c07a10f7d1 - std::io::Write::write_fmt::h7de08171ab770fb2
3: 0x74c078adbed2 - std::sys::backtrace::BacktraceLock::print::h810fbd31421329e6
4: 0x74c078ade477 - std::panicking::default_hook::{{closure}}::hbaad47ed9dc6356d
5: 0x74c078ade260 - std::panicking::default_hook::h24e207139139d40a
6: 0x74c077c4e258 - std[cba35227022cdb8c]::panicking::update_hook::<alloc[304106e3416ed1f2]::boxed::Box<rustc_driver_impl[16f35eaf1f029c02]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x74c078adecc3 - std::panicking::rust_panic_with_hook::ha9131beeb2ddc506
8: 0x74c078ade9ba - std::panicking::begin_panic_handler::{{closure}}::h1bba0eaeb6da506f
9: 0x74c078adc549 - std::sys::backtrace::__rust_end_short_backtrace::h1d1ca3eade483f4c
10: 0x74c078ade67d - rust_begin_unwind
11: 0x74c0757a1480 - core::panicking::panic_fmt::h896a0727a1a943f9
12: 0x74c077672d66 - core::panicking::assert_failed_inner::ha51bf8fa7906dee4
13: 0x74c0781e9de0 - core[3b140760090fa97d]::panicking::assert_failed::<u128, u128>
14: 0x74c07a490a2d - <rustc_middle[c26a501345a63c03]::query::on_disk_cache::OnDiskCache>::new
15: 0x74c07a16bacc - rustc_incremental[eeaa62103b2f7725]::persist::load::load_query_result_cache
16: 0x74c07a16e1d8 - rustc_interface[d49f06094f81b30c]::interface::run_compiler::<(), rustc_driver_impl[16f35eaf1f029c02]::run_compiler::{closure#0}>::{closure#1}
17: 0x74c07a034251 - std[cba35227022cdb8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[d49f06094f81b30c]::util::run_in_thread_with_globals<rustc_interface[d49f06094f81b30c]::util::run_in_thread_pool_with_globals<rustc_interface[d49f06094f81b30c]::interface::run_compiler<(), rustc_driver_impl[16f35eaf1f029c02]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
18: 0x74c07a034708 - <<std[cba35227022cdb8c]::thread::Builder>::spawn_unchecked_<rustc_interface[d49f06094f81b30c]::util::run_in_thread_with_globals<rustc_interface[d49f06094f81b30c]::util::run_in_thread_pool_with_globals<rustc_interface[d49f06094f81b30c]::interface::run_compiler<(), rustc_driver_impl[16f35eaf1f029c02]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[3b140760090fa97d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
19: 0x74c07a035caf - std::sys::pal::unix::thread::Thread::new::thread_start::ha07e360225fa3528
20: 0x74c074294ac3 - start_thread
at ./nptl/pthread_create.c:442:8
21: 0x74c074326850 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
22: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
Backtrace
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed::<u128, u128>
4: <rustc_middle::query::on_disk_cache::OnDiskCache>::new
5: rustc_incremental::persist::load::load_query_result_cache
6: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
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 with compiler/rustc_middle/src/query/on_disk_cache.rs:506:5 and follow the rustc_incremental persist::load::load_query_result_cache path shown in the backtrace. Reproduce with cargo build --example cli in the sxt-proof-of-sql-sdk main branch at the reported commit, then verify that the compiler no longer panics while loading the incremental cache.
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
- Mostly clear
- Newbie friendliness
- 42/100