Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'rustc' panicked... range start index 4631390642143051830 out of range for slice of length 3368540 #136267

Closed
jamesx-improving opened this issue Jan 29, 2025 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-AArch64 Armv8-A or later processors in AArch64 mode T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jamesx-improving
Copy link

Code

cargo install cbindgen

Meta

rustc --version --verbose:

rustc 1.84.0 (9fc6b4312 2025-01-07)

Error output

thread 'rustc' panicked at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/compiler/rustc_serialize/src/opaque.rs:269:45:
range start index 4631390642143051830 out of range for slice of length 3368540
...(stack backtrace)
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.84.0 (9fc6b4312 2025-01-07) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debug-assertions=off -C strip=debuginfo

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

query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
Backtrace

stack backtrace:
   0:     0xffaaa921186c - std::backtrace_rs::backtrace::libunwind::trace::h41252309c76992b5
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0xffaaa921186c - std::backtrace_rs::backtrace::trace_unsynchronized::hf225d125cca37a81
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffaaa921186c - std::sys::backtrace::_print_fmt::hf329c51b3772454a
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:66:9
   3:     0xffaaa921186c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h00b09a4bf39b2d85
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:39:26
   4:     0xffaaa925e62c - core::fmt::rt::Argument::fmt::heddda1cce7046e46
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/fmt/rt.rs:177:76
   5:     0xffaaa925e62c - core::fmt::write::h7ceb4b84[80](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:81)f8c249
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/fmt/mod.rs:1189:21
   6:     0xffaaa92058e0 - std::io::Write::write_fmt::h85dd460e8a217df7
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/io/mod.rs:1884:15
   7:     0xffaaa9211720 - std::sys::backtrace::BacktraceLock::print::h9a7ef9a5429d1e7e
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:42:9
   8:     0xffaaa9213a60 - std::panicking::default_hook::{{closure}}::h0c27709af3f8d4c6
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:268:22
   9:     0xffaaa92138a8 - std::panicking::default_hook::h896b14ac97871c98
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:295:9
  10:     0xffaaa3035e7c - <alloc[b23c587ff69f26b0]::boxed::Box<rustc_driver_impl[233ea3aee64cd688]::install_ice_hook::{closure#0}> as core[2b1f2bbd3b605c]::ops::function::Fn<(&dyn for<'a, 'b> core[2b1f2bbd3b605c]::ops::function::Fn<(&'a std[a32bae77f370052a]::panic::PanicHookInfo<'b>,), Output = ()> + core[2b1f2bbd3b605c]::marker::Sync + core[2b1f2bbd3b605c]::marker::Send, &std[a32bae77f370052a]::panic::PanicHookInfo)>>::call
  11:     0xffaaa92141d0 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he48809e66f217622
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/alloc/src/boxed.rs:1986:9
  12:     0xffaaa92141d0 - std::panicking::rust_panic_with_hook::h660add0bcc8a80ea
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:809:13
  13:     0xffaaa9213f8c - std::panicking::begin_panic_handler::{{closure}}::h83d17f92f6c8c9b6
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:674:13
  14:     0xffaaa9211d68 - std::sys::backtrace::__rust_end_short_backtrace::hab5cb706f3ff2287
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:170:18
  15:     0xffaaa9213c4c - rust_begin_unwind
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:665:5
  16:     0xffaaa2eed6cc - core::panicking::panic_fmt::h8267c22f618f324d
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:76:14
  17:     0xffaaa926c80c - core::slice::index::slice_start_index_len_fail::do_panic::runtime::hcf2d4900b63c7fab
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panic.rs:219:21
  18:     0xffaaa2eedb00 - core::slice::index::slice_start_index_len_fail::do_panic::h7135aa2b2663528e
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/intrinsics/mod.rs:3535:9
  19:     0xffaaa2eedb00 - core::slice::index::slice_start_index_len_fail::he172df34be0ef418
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panic.rs:224:9
  20:     0xffaaa863e8e4 - <rustc_metadata[bc7dd363cf28a80b]::creader::CrateMetadataRef>::def_key
  21:     0xffaaa7882224 - <rustc_middle[2c6500b4474def4b]::ty::context::TyCtxt>::def_key::<rustc_span[d6938c8799c78ecd]::def_id::DefId>
  22:     0xffaaa777a1b4 - <rustc_resolve[803f36c130519f4a]::Resolver>::get_module
  23:     0xffaaa777b1f8 - <rustc_resolve[803f36c130519f4a]::Resolver>::build_reduced_graph_external
  24:     0xffaaa77a6f9c - <rustc_resolve[803f36c130519f4a]::Module>::for_each_child::<rustc_resolve[803f36c130519f4a]::build_reduced_graph::BuildReducedGraphVisitor, <rustc_resolve[803f36c130519f4a]::build_reduced_graph::BuildReducedGraphVisitor>::process_macro_use_imports::{closure#2}>
  25:     0xffaaa783834c - <rustc_resolve[803f36c130519f4a]::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast[ba5aba888c7ba019]::visit::Visitor>::visit_item
  26:     0xffaaa77e9b1c - <rustc_expand[448f8608944c7a44]::expand::AstFragment>::visit_with::<rustc_resolve[803f36c130519f4a]::build_reduced_graph::BuildReducedGraphVisitor>
  27:     0xffaaa779cd74 - <rustc_resolve[803f36c130519f4a]::Resolver as rustc_expand[448f8608944c7a44]::base::ResolverExpand>::visit_ast_fragment_with_placeholders
  28:     0xffaaa8707048 - <rustc_expand[448f8608944c7a44]::expand::MacroExpander>::collect_invocations
  29:     0xffaaa8702cc8 - <rustc_expand[448f8608944c7a44]::expand::MacroExpander>::fully_expand_fragment
  30:     0xffaaa870298c - <rustc_expand[448f8608944c7a44]::expand::MacroExpander>::expand_crate
  31:     0xffaaa31bf2c8 - <rustc_session[8fe50856523cfc[81](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:82)]::session::Session>::time::<rustc_ast[ba5aba888c7ba019]::ast::Crate, rustc_interface[45f6ee680972b70c]::passes::configure_and_expand::{closure#1}>
  32:     0xffaaa322d8cc - rustc_interface[45f6ee680972b70c]::passes::resolver_for_lowering_raw
  33:     0xffaaa7b0086c - rustc_query_impl[b3a5340e321ea8a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b3a5340e321ea8a9]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2c6500b4474def4b]::query::erase::Erased<[u8; 16usize]>>
  34:     0xffaaa7b53d70 - <rustc_query_impl[b3a5340e321ea8a9]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[2b1f2bbd3b605c]::ops::function::FnOnce<(rustc_middle[2c6500b4474def4b]::ty::context::TyCtxt, ())>>::call_once
  35:     0xffaaa7d7[82](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:83)c4 - rustc_query_system[4379a6dd4de40329]::query::plumbing::try_execute_query::<rustc_query_impl[b3a5340e321ea8a9]::DynamicConfig<rustc_query_system[4379a6dd4de40329]::query::caches::SingleCache<rustc_middle[2c6500b4474def4b]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b3a5340e321ea8a9]::plumbing::QueryCtxt, false>
  36:     0xffaaa7bffd58 - rustc_query_impl[b3a5340e321ea8a9]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
  37:     0xffaaa8b42454 - <rustc_middle[2c6500b4474def4b]::ty::context::TyCtxt>::resolver_for_lowering
  38:     0xffaaa2febd7c - <rustc_middle[2c6500b4474def4b]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[233ea3aee64cd688]::run_compiler::{closure#0}::{closure#1}::{closure#3}, &rustc_data_structures[c3ef3f3d456babe4]::steal::Steal<(rustc_middle[2c6500b4474def4b]::ty::ResolverAstLowering, alloc[b23c587ff69f26b0]::sync::Arc<rustc_ast[ba5aba888c7ba019]::ast::Crate>)>>
  39:     0xffaaa2fc3[84](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:85)0 - <rustc_interface[45f6ee680972b70c]::interface::Compiler>::enter::<rustc_driver_impl[233ea3aee64cd688]::run_compiler::{closure#0}::{closure#1}, core[2b1f2bbd3b605c]::result::Result<core[2b1f2bbd3b605c]::option::Option<rustc_interface[45f6ee680972b70c]::queries::Linker>, rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>
  40:     0xffaaa3029100 - rustc_span[d6938c8799c78ecd]::create_session_globals_then::<core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>, rustc_interface[45f6ee680972b70c]::util::run_in_thread_with_globals<rustc_interface[45f6ee680972b70c]::util::run_in_thread_pool_with_globals<rustc_interface[45f6ee680972b70c]::interface::run_compiler<core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>, rustc_driver_impl[233ea3aee64cd688]::run_compiler::{closure#0}>::{closure#1}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  41:     0xffaaa3023c04 - std[a32bae77f370052a]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[45f6ee680972b70c]::util::run_in_thread_with_globals<rustc_interface[45f6ee680972b70c]::util::run_in_thread_pool_with_globals<rustc_interface[45f6ee680972b70c]::interface::run_compiler<core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>, rustc_driver_impl[233ea3aee64cd688]::run_compiler::{closure#0}>::{closure#1}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>
  42:     0xffaaa30264bc - <<std[a32bae77f370052a]::thread::Builder>::spawn_unchecked_<rustc_interface[45f6ee680972b70c]::util::run_in_thread_with_globals<rustc_interface[45f6ee680972b70c]::util::run_in_thread_pool_with_globals<rustc_interface[45f6ee680972b70c]::interface::run_compiler<core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>, rustc_driver_impl[233ea3aee64cd688]::run_compiler::{closure#0}>::{closure#1}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[2b1f2bbd3b605c]::result::Result<(), rustc_span[d6938c8799c78ecd]::ErrorGuaranteed>>::{closure#1} as core[2b1f2bbd3b605c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43:     0xffaaa921d94c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8f59f5b3c43759d1
                               at /rustc/9fc6b43126469e3[85](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:86)8e2fe86cafb4f0fd5068869/library/alloc/src/boxed.rs:1972:9
  44:     0xffaaa921d94c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7541037a2f8924a1
                               at /rustc/9fc6b43126469e3858e2fe[86](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:87)cafb4f0fd5068869/library/alloc/src/boxed.rs:1972:9
  45:     0xffaaa921d94c - std::sys::pal::unix::thread::Thread::new::thread_start::hd1bb28d1647e61f1
                               at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd506[88](https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658#step:7:89)69/library/std/src/sys/pal/unix/thread.rs:105:17
  46:     0xffaaa22c597c - <unknown>
  47:     0xffaaa232ba4c - <unknown>
  48:                0x0 - <unknown>

@jamesx-improving jamesx-improving added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 29, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 29, 2025
@jamesx-improving
Copy link
Author

More context: I happens sometimes on a arm64 Linux GitHub Action runner.

An example of such job: https://github.com/jamesx-improving/valkey-glide/actions/runs/13041402015/job/36383921658

@lqd
Copy link
Member

lqd commented Jan 29, 2025

Looks like a duplicate of #135867

@saethlin saethlin added O-AArch64 Armv8-A or later processors in AArch64 mode and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-AArch64 Armv8-A or later processors in AArch64 mode T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants