rust-lang / rust-lang/rust

Name change cargo check fail

Open
#132,375 2 comments 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

Code
cargo check
Meta

rustc --version --verbose:

rustc --version --verbose
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: x86_64-unknown-linux-gnu
release: 1.82.0
LLVM version: 19.1.1
Error output
cargo check
    Checking zingolib v0.2.0 (/home/nattyb/src/zingolabs/zingolibs/fix_names/zingolib)
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:518:5:
assertion `left == right` failed
  left: 234403281
 right: 1002111927320821928687967599834759150
stack backtrace:
   0:     0x78c4a83ce6ea - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h304520fd6a30aa07
   1:     0x78c4a8c19525 - core::fmt::write::hf5713710ce10ff22
   2:     0x78c4a9a34d91 - std::io::Write::write_fmt::hda708db57927dacf
   3:     0x78c4a83d0dbb - std::panicking::default_hook::{{closure}}::he1ad87607d0c11c5
   4:     0x78c4a83d0a2e - std::panicking::default_hook::h81c8cd2e7c59ee33
   5:     0x78c4a759a5d7 - std[5204e9590b4985ef]::panicking::update_hook::<alloc[fd15fd9026f491e1]::boxed::Box<rustc_driver_impl[c41f2638408ed175]::install_ice_hook::{closure#0}>>::{closure#0}
   6:     0x78c4a83d16d7 - std::panicking::rust_panic_with_hook::had2118629c312a4a
   7:     0x78c4a83d1397 - std::panicking::begin_panic_handler::{{closure}}::h7fa5985d111bafa2
   8:     0x78c4a83ceb99 - std::sys::backtrace::__rust_end_short_backtrace::h704d151dbefa09c5
   9:     0x78c4a83d1064 - rust_begin_unwind
  10:     0x78c4a5a58413 - core::panicking::panic_fmt::h3eea515d05f7a35e
  11:     0x78c4a6fb837e - core::panicking::assert_failed_inner::h11b1378688fb0090
  12:     0x78c4a7aeb747 - core[d89802b8f5f07590]::panicking::assert_failed::<u128, u128>
  13:     0x78c4a9b39d38 - <rustc_middle[c83967c7761a8780]::query::on_disk_cache::OnDiskCache>::new
  14:     0x78c4a9b49cdb - rustc_incremental[229da3a1dfe91e94]::persist::load::load_query_result_cache
  15:     0x78c4a9b4abc2 - <rustc_interface[706ab71263ce060a]::queries::Queries>::global_ctxt
  16:     0x78c4a9985da6 - rustc_interface[706ab71263ce060a]::interface::run_compiler::<core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>, rustc_driver_impl[c41f2638408ed175]::run_compiler::{closure#0}>::{closure#1}
  17:     0x78c4a9a3ed16 - std[5204e9590b4985ef]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[706ab71263ce060a]::util::run_in_thread_with_globals<rustc_interface[706ab71263ce060a]::interface::run_compiler<core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>, rustc_driver_impl[c41f2638408ed175]::run_compiler::{closure#0}>::{closure#1}, core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>>
  18:     0x78c4a9a779b0 - <<std[5204e9590b4985ef]::thread::Builder>::spawn_unchecked_<rustc_interface[706ab71263ce060a]::util::run_in_thread_with_globals<rustc_interface[706ab71263ce060a]::interface::run_compiler<core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>, rustc_driver_impl[c41f2638408ed175]::run_compiler::{closure#0}>::{closure#1}, core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d89802b8f5f07590]::result::Result<(), rustc_span[233999951ced9cd1]::ErrorGuaranteed>>::{closure#1} as core[d89802b8f5f07590]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  19:     0x78c4a9a77d2b - std::sys::pal::unix::thread::Thread::new::thread_start::hcdbd1049068002f4
  20:     0x78c4aaf3a39d - <unknown>
  21:     0x78c4aafbf49c - <unknown>
  22:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

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.82.0 (f6e511eec 2024-10-15) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -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:
end of query stack
error: could not compile `zingolib` (lib)
1730331920 || shofth nattyb fix_names[ ]
/home/nattyb/src/zingolabs/zingolibs/fix_names RC: 101 $
git show -s
commit d46d1af84165cbd373b7d94f141b3a268c354731 (HEAD -> fix_names, zancos/fix_names)
Author: zancas <zancas@zingolabs.org>
Date:   Wed Oct 30 17:39:50 2024 -0600

    wip
Backtrace

<backtrace>

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 by reproducing the failure with cargo check in the reported zingolib checkout using rustc 1.82.0, then read compiler/rustc_middle/src/query/on_disk_cache.rs around line 518 and the incremental-cache loading frames in the backtrace. A useful result would require a minimal reproducer and a regression test demonstrating that the compiler no longer panics during incremental compilation.

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.