rust-lang / rust-lang/rust

rustc panic when installing program cargo

Open
#163,023 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-ICE needs-triage S-needs-repro
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

error: internal compiler error: /rustc-dev/008fa22ce3f8d3c8dfaca2e6486043c2b21851eb/compiler/rustc_codegen_ssa/src/mir/operand.rs:291:18: not immediate: OperandRef(Uninit @ TyAndLayout { ty: unsafe_cell::UnsafeCell<MaybeUninit<runtime::task::Notified<Arc<multi_thread::handle::Handle>>>>, layout: Layout { size: Size(8 bytes), align: AbiAlign { abi: Align(8 bytes)
 }, backend_repr: Scalar(union pointer), fields: Arbitrary { offsets: [Size(0 bytes)], in_memory_order: [0] }, largest_niche: None, uninhabited: false, variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes), randomization_seed: 333452897022569717 } })     
                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                
thread 'rustc' (1226384) panicked at /rustc-dev/008fa22ce3f8d3c8dfaca2e6486043c2b21851eb/compiler/rustc_codegen_ssa/src/mir/operand.rs:291:18:                                        
Box<dyn Any>                                                                                                                                                                                                                                                                                       
stack backtrace:                                                                                                                                                                      
   0:     0x7f0bdc239d76 - <<std[9bbe39c4ebb48d27]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[1f60bb6b581356a0]::fmt::Display>::fmt                                                                                                                                          
   1:     0x7f0bdc80dd52 - core[1f60bb6b581356a0]::fmt::write                                                                                                                                                                                                                                      
   2:     0x7f0bdc24eecc - <std[9bbe39c4ebb48d27]::sys::stdio::unix::Stderr as core[1f60bb6b581356a0]::io::write::Write>::write_fmt                                                   
   3:     0x7f0bdc20b9aa - std[9bbe39c4ebb48d27]::panicking::default_hook::{closure#0}                                                           
   4:     0x7f0bdc22c413 - std[9bbe39c4ebb48d27]::panicking::default_hook                                                                                                             
   5:     0x7f0bdb1a98eb - std[9bbe39c4ebb48d27]::panicking::update_hook::<alloc[b6cfe650a8ceb8b4]::boxed::Box<rustc_driver_impl[b782b708b8dc6cb9]::install_ice_hook::{closure#1}>>::{closure#0}                                                                                                   
   6:     0x7f0bdc22c8b2 - std[9bbe39c4ebb48d27]::panicking::panic_with_hook                                                                                                          
   7:     0x7f0bdb1d6eb1 - std[9bbe39c4ebb48d27]::panicking::begin_panic::<rustc_errors[2adba249962b7d78]::ExplicitBug>::{closure#0}                                                                                                                                                               
   8:     0x7f0bdb1cfd96 - std[9bbe39c4ebb48d27]::sys::backtrace::__rust_end_short_backtrace::<std[9bbe39c4ebb48d27]::panicking::begin_panic<rustc_errors[2adba249962b7d78]::ExplicitBug>::{closure#0}, !>                                                                                         
   9:     0x7f0bdb1cfbdb - std[9bbe39c4ebb48d27]::panicking::begin_panic::<rustc_errors[2adba249962b7d78]::ExplicitBug>                                                               
  10:     0x7f0bdb1e2a71 - <rustc_errors[2adba249962b7d78]::diagnostic::BugAbort as rustc_errors[2adba249962b7d78]::diagnostic::EmissionGuarantee>::emit_producing_guarantee          
  11:     0x7f0bdb77f759 - rustc_middle[86d09869d5c83035]::util::bug::opt_span_bug_fmt::<rustc_span[a756f0f77a801437]::span_encoding::Span>::{closure#0}                              
  12:     0x7f0bdb77f8c2 - rustc_middle[86d09869d5c83035]::ty::context::tls::with_opt::<rustc_middle[86d09869d5c83035]::util::bug::opt_span_bug_fmt<rustc_span[a756f0f77a801437]::span_encoding::Span>::{closure#0}, !>::{closure#0}                                                                                                                                        
  13:     0x7f0bdb76a35b - rustc_middle[86d09869d5c83035]::ty::context::tls::with_context_opt::<rustc_middle[86d09869d5c83035]::ty::context::tls::with_opt<rustc_middle[86d09869d5c83035]::util::bug::opt_span_bug_fmt<rustc_span[a756f0f77a801437]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  14:     0x7f0bd87e9ad4 - rustc_middle[86d09869d5c83035]::util::bug::bug_fmt                                                                                                                                   
  15:     0x7f0bddc624e1 - rustc_codegen_ssa[e52d1b69be8eb43d]::mir::codegen_mir::<rustc_codegen_llvm[73ab5da0892e04a4]::builder::GenericBuilder<rustc_codegen_llvm[73ab5da0892e04a4]::context::FullCx>>                                                                                                                                                                    
  16:     0x7f0bdc8c4a2d - rustc_codegen_llvm[73ab5da0892e04a4]::base::compile_codegen_unit::module_codegen                                                                                                     
  17:     0x7f0bddb52cd5 - <rustc_codegen_llvm[73ab5da0892e04a4]::LlvmCodegenBackend as rustc_codegen_ssa[e52d1b69be8eb43d]::traits::backend::ExtraBackendMethods>::compile_codegen_unit                        
  18:     0x7f0bddb4f14b - rustc_codegen_ssa[e52d1b69be8eb43d]::base::codegen_crate::<rustc_codegen_llvm[73ab5da0892e04a4]::LlvmCodegenBackend, rustc_codegen_llvm[73ab5da0892e04a4]::ModuleLlvm>               
  19:     0x7f0bddb4d34d - <rustc_codegen_llvm[73ab5da0892e04a4]::LlvmCodegenBackend as rustc_codegen_ssa[e52d1b69be8eb43d]::traits::backend::CodegenBackend>::codegen_crate                                    
  20:     0x7f0bddb58460 - <rustc_interface[4913174e329c8d79]::queries::Linker>::codegen_and_build_linker                                                                                                       
  21:     0x7f0bdd98f850 - rustc_interface[4913174e329c8d79]::interface::run_compiler::<(), rustc_driver_impl[b782b708b8dc6cb9]::run_compiler::{closure#0}>::{closure#2}                                                                           
  22:     0x7f0bdd9e4a24 - std[9bbe39c4ebb48d27]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[4913174e329c8d79]::util::run_in_thread_with_globals<rustc_interface[4913174e329c8d79]::util::run_in_thread_pool_with_globals<rustc_interface[4913174e329c8d79]::interface::run_compiler<(), rustc_driver_impl[b782b708b8dc6cb9]::run_compiler::{closure#0}>
::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>                                                                                                                                                                                
  23:     0x7f0bdd9e47ed - <std[9bbe39c4ebb48d27]::thread::lifecycle::spawn_unchecked<rustc_interface[4913174e329c8d79]::util::run_in_thread_with_globals<rustc_interface[4913174e329c8d79]::util::run_in_thread_pool_with_globals<rustc_interface[4913174e329c8d79]::interface::run_compiler<(), rustc_driver_impl[b782b708b8dc6cb9]::run_compiler::{closure#0}>::{closure#
2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[1f60bb6b581356a0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}                                                                                            
  24:     0x7f0bdd9e7f86 - <std[9bbe39c4ebb48d27]::sys::thread::unix::Thread>::new::thread_start                                                                                                                                                   
  25:     0x7f0bd70a3d64 - start_thread                                                                                                                                                                                                            
                               at ./nptl/pthread_create.c:448:8                                                                                                                                                                                    
  26:     0x7f0bd71373fc - __GI___clone3                    
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0                                                                                                                                                           
  27:                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: please make sure that you have updated to the latest nightly                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                   
note: please attach the file at `/home/maxim/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/rustc-ice-2026-09-19T15_21_54-1226381.txt` to your bug report                                                                                                                       
                                                                                                                                                                                                                                                                                                   
note: rustc 1.99.0-nightly (008fa22ce 2026-07-25) running on x86_64-unknown-linux-gnu                                                                                                                                                                                                              
                                                                        
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C strip=debuginfo                                                                                                                                                                                                       
                                                                                                                                                 
note: some of the compiler flags provided by cargo are hidden                                                                                                                                                                                                                                      

query stack during panic:                                                                  
end of query stack                                                                         
error: could not compile `tokio` (lib)                                                     

Caused by:                                                                                 
  process didn't exit successfully: `/home/maxim/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name tokio --edition=2021 /home/maxim/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=121 --crate-type lib --emit=dep-i
nfo,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="bytes"' --cfg 'feature="default"' --cfg 'feature="io-util"' --cfg 'feature="libc"' --cfg 'feature="mio"' --cfg 'feature="net"' --cfg 'feature="process"' --cfg 'feature="rt"' --cfg 'feature="rt-multi-thread"' --cfg 'feature="signal-hook-registry"' --cfg 'feature="socket2"' --cfg 'feature="sync"'
 --cfg 'feature="time"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("bytes", "default", "fs", "full", "io-std", "io-uring", "io-util", "libc", "macros", "mio", "net", "parking_lot", "process", "rt", "rt-multi-thread", "schedule-latency", "signal", "signal-hook-registry", "socket2", "sync", "taskdump", "test-util", "time", "tokio-macros", "tra
cing", "windows-sys"))' -C metadata=d0eea83489cd1595 -C extra-filename=-ebc8c2ccf3df054c --out-dir /tmp/cargo-installAbpRng/release/deps -C strip=debuginfo -L dependency=/tmp/cargo-installAbpRng/release/deps --extern bytes=/tmp/cargo-installAbpRng/release/deps/libbytes-2cff5765dc02cab8.rmeta --extern libc=/tmp/cargo-installAbpRng/release/deps/liblibc-92ef575d55f
b2e15.rmeta --extern mio=/tmp/cargo-installAbpRng/release/deps/libmio-18f5c5431cfc67f8.rmeta --extern pin_project_lite=/tmp/cargo-installAbpRng/release/deps/libpin_project_lite-c7fff26b062085d8.rmeta --extern signal_hook_registry=/tmp/cargo-installAbpRng/release/deps/libsignal_hook_registry-29fe655c8defd656.rmeta --extern socket2=/tmp/cargo-installAbpRng/release
/deps/libsocket2-59031759540f78ac.rmeta --cap-lints allow` (exit status: 101)              
warning: build failed, waiting for other jobs to finish...                                 
error: failed to compile `sploithub v0.7.0 (ssh://github.com/DayDun/snht-tooling.git#subdirectory=sploithub#950146f5)`, intermediate artifacts can be found at `/tmp/cargo-installAbpRng`.                                                                                                                                                                                  
To reuse those artifacts with a future compilation, set the environment variable `CARGO_BUILD_BUILD_DIR` to that path.                       

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

Reproduce the tokio-1.53.1 build with rustc 1.99.0-nightly and the listed compiler flags, then inspect compiler/rustc_codegen_ssa/src/mir/operand.rs:291 and the referenced rustc-ice report. The issue is complete when the panic is explained and a regression test or fix prevents this internal compiler error.

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
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.