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

ICE trying to compile very large file contents to wasm32-wasi and maybe x86_64-unknown-linux-gnu #95780

Closed
acfoltzer opened this issue Apr 7, 2022 · 1 comment · Fixed by #113562
Labels
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.

Comments

@acfoltzer
Copy link

I'm messing around with some ill-advised inclusion of very large files in Rust programs, and finding ICEs and segfaults when targeting x86_64-unknown-linux-gnu and wasm32-wasi.

I suspect that some of the errors relate to incremental compilation, as when I began cargo cleaning before trying to repro, the x86_64-unknown-linux-gnu errors disappeared. The wasm32-wasi ICE is reproducible regardless of existing /target state.

I am including two error outputs including the native ICE which I can no longer reproduce in case they shed insight into the incremental compilation angle.

Code

First, create a 4GiB file large_file.bin next to the test module. I used:

dd if=/dev/random of=large_file.bin bs=4k iflag=fullblock,count_bytes count=4G
const LARGE_FILE: &'static [u8] = include_bytes!("large_file.bin");

fn main() {}

I also tried to reproduce with smaller files, and for 3GiB I get a reasonable non-ICE error about the data being too large for the architecture.

Meta

rustc --version --verbose:

rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-unknown-linux-gnu
release: 1.60.0
LLVM version: 14.0.0

Error output (wasm32-wasi cross-compile)

When running cargo build --target wasm32-wasi:

error: internal compiler error: /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/compiler/rustc_middle/src/mir/interpret/value.rs:224:32: Unsigned value 0x100000000 does not fit in 32 bits
Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1160:9
stack backtrace:
   0:     0x7f14832e886d - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f14832e886d - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f14832e886d - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f14832e886d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f14833484ec - core::fmt::write::he803f0f418caf762
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f14832d8a98 - std::io::Write::write_fmt::h70bc45872f37e7bb
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
   6:     0x7f14832ec847 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f14832ec847 - std::sys_common::backtrace::print::h359300b4a7fccf65
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f14832ec847 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
   9:     0x7f14832ec510 - std::panicking::default_hook::h03ca0f22e1d2d25e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
  10:     0x7f1483a782c1 - rustc_driver[6eeb127b85fe99ac]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f14832ed124 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
  12:     0x7f1484b4e301 - std[cd3cf6af28dff6de]::panicking::begin_panic::<rustc_errors[bd800fb2a5e0b9f5]::ExplicitBug>::{closure#0}
  13:     0x7f1484b4e266 - std[cd3cf6af28dff6de]::sys_common::backtrace::__rust_end_short_backtrace::<std[cd3cf6af28dff6de]::panicking::begin_panic<rustc_errors[bd800fb2a5e0b9f5]::ExplicitBug>::{closure#0}, !>
  14:     0x7f1484b5463f - std[cd3cf6af28dff6de]::panicking::begin_panic::<rustc_errors[bd800fb2a5e0b9f5]::ExplicitBug>
  15:     0x7f1484b612ed - std[cd3cf6af28dff6de]::panic::panic_any::<rustc_errors[bd800fb2a5e0b9f5]::ExplicitBug>
  16:     0x7f1484b605a7 - <rustc_errors[bd800fb2a5e0b9f5]::HandlerInner>::bug
  17:     0x7f1484b600d0 - <rustc_errors[bd800fb2a5e0b9f5]::Handler>::bug
  18:     0x7f14849e2609 - rustc_middle[c145adf1c4567bf]::ty::context::tls::with_opt::<rustc_middle[c145adf1c4567bf]::util::bug::opt_span_bug_fmt<rustc_span[4b4bb4534443c42f]::span_encoding::Span>::{closure#0}, ()>
  19:     0x7f14849e2ff0 - rustc_middle[c145adf1c4567bf]::util::bug::opt_span_bug_fmt::<rustc_span[4b4bb4534443c42f]::span_encoding::Span>
  20:     0x7f14849e2f66 - rustc_middle[c145adf1c4567bf]::util::bug::bug_fmt
  21:     0x7f1485b30bfe - <rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt>::mk_array
  22:     0x7f1484e45818 - <rustc_typeck[1c3c3b5b5d734e80]::check::fn_ctxt::FnCtxt>::check_expr_kind
  23:     0x7f1484e07c1c - <rustc_typeck[1c3c3b5b5d734e80]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x7f1484eb878a - <rustc_infer[844122ed1ec4b57a]::infer::InferCtxtBuilder>::enter::<&rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults, <rustc_typeck[1c3c3b5b5d734e80]::check::inherited::InheritedBuilder>::enter<rustc_typeck[1c3c3b5b5d734e80]::check::typeck_with_fallback<rustc_typeck[1c3c3b5b5d734e80]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults>::{closure#0}>
  25:     0x7f1484e935c3 - rustc_typeck[1c3c3b5b5d734e80]::check::typeck
  26:     0x7f1485e37aed - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, &rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults>
  27:     0x7f1485ea9bae - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(&rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, &rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults>::{closure#3}>
  28:     0x7f1485330cc2 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, &rustc_middle[c145adf1c4567bf]::ty::context::TypeckResults>>
  29:     0x7f148538f5fc - <rustc_query_impl[8218de0923c6cd45]::Queries as rustc_middle[c145adf1c4567bf]::ty::query::QueryEngine>::typeck
  30:     0x7f1484f303e5 - rustc_typeck[1c3c3b5b5d734e80]::check::check::check_item_type
  31:     0x7f1484ef6a0d - <rustc_middle[c145adf1c4567bf]::hir::map::Map>::visit_item_likes_in_module::<rustc_typeck[1c3c3b5b5d734e80]::check::CheckItemTypesVisitor>
  32:     0x7f1485bce14c - rustc_typeck[1c3c3b5b5d734e80]::check::check::check_mod_item_types
  33:     0x7f1485e394de - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, ()>
  34:     0x7f1485eabf8e - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<((), rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, ()>::{closure#3}>
  35:     0x7f1485333a66 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, ()>>
  36:     0x7f1485dc6963 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::check_mod_item_types, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  37:     0x7f1485ba8086 - <rustc_middle[c145adf1c4567bf]::hir::map::Map>::for_each_module::<rustc_typeck[1c3c3b5b5d734e80]::check_crate::{closure#6}::{closure#0}>
  38:     0x7f1485b6d118 - <rustc_session[95a8f1c94d15e5dc]::session::Session>::time::<(), rustc_typeck[1c3c3b5b5d734e80]::check_crate::{closure#6}>
  39:     0x7f1485b615c3 - rustc_typeck[1c3c3b5b5d734e80]::check_crate
  40:     0x7f14858faed7 - rustc_interface[afc566840a941718]::passes::analysis
  41:     0x7f1485e52b62 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  42:     0x7f1485ea5303 - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#3}>
  43:     0x7f1485d94bae - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<(), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>>
  44:     0x7f1485dd3c05 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::analysis, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  45:     0x7f14858d9608 - <rustc_interface[afc566840a941718]::passes::QueryContext>::enter::<rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  46:     0x7f14858c7ac5 - rustc_interface[afc566840a941718]::interface::create_compiler_and_run::<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>
  47:     0x7f14858ad134 - std[cd3cf6af28dff6de]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  48:     0x7f14858e03e9 - <<std[cd3cf6af28dff6de]::thread::Builder>::spawn_unchecked_<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#1} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f14832f8d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf70ac038171e3e1a
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  50:     0x7f14832f8d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he6690128792365ad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  51:     0x7f14832f8d03 - std::sys::unix::thread::Thread::new::thread_start::ha07928d93d5a5ec9
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys/unix/thread.rs:108:17
  52:     0x7f148321b609 - start_thread
                               at /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
  53:     0x7f1483134163 - clone
  54:                0x0 - <unknown>

note: 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.60.0 (7737e0b5c 2022-04-04) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
#0 [typeck] type-checking `LARGE_FILE`
#1 [check_mod_item_types] checking item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `bigboy`

Error output (native, no clean)

When running cargo build:

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `35`,
 right: `1483`', compiler/rustc_query_impl/src/on_disk_cache.rs:540:5
Backtrace

stack backtrace:
   0:     0x7f91d687886d - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f91d687886d - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f91d687886d - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f91d687886d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f91d68d84ec - core::fmt::write::he803f0f418caf762
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f91d6868a98 - std::io::Write::write_fmt::h70bc45872f37e7bb
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
   6:     0x7f91d687c847 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f91d687c847 - std::sys_common::backtrace::print::h359300b4a7fccf65
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f91d687c847 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
   9:     0x7f91d687c510 - std::panicking::default_hook::h03ca0f22e1d2d25e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
  10:     0x7f91d70082c1 - rustc_driver[6eeb127b85fe99ac]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f91d687d124 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
  12:     0x7f91d687cdd7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
  13:     0x7f91d6878d34 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f91d687cae9 - rust_begin_unwind
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
  15:     0x7f91d6845863 - core::panicking::panic_fmt::he1bbc7336d49a357
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
  16:     0x7f91d68d5438 - core::panicking::assert_failed_inner::hbaac70a629215a04
  17:     0x7f91d796bb2c - core[2734bb1f7d9ec6a5]::panicking::assert_failed::<rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex, rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex>
  18:     0x7f91d894c774 - <rustc_query_impl[8218de0923c6cd45]::on_disk_cache::OnDiskCache>::try_load_query_result::<rustc_middle[c145adf1c4567bf]::middle::codegen_fn_attrs::CodegenFnAttrs>
  19:     0x7f91d92d7300 - <<rustc_query_impl[8218de0923c6cd45]::queries::codegen_fn_attrs as rustc_query_system[cf3d2502706fe991]::query::config::QueryDescription<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>>::TRY_LOAD_FROM_DISK::{closure#0} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<(rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  20:     0x7f91d88de4de - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_middle[c145adf1c4567bf]::middle::codegen_fn_attrs::CodegenFnAttrs>
  21:     0x7f91d88ebf33 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::codegen_fn_attrs, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  22:     0x7f91d85f86e2 - <rustc_passes[fd3a786e9a92d522]::dead::LifeSeeder as rustc_hir[cb2e3a51e91fc9ed]::itemlikevisit::ItemLikeVisitor>::visit_item
  23:     0x7f91d8608e0e - <rustc_middle[c145adf1c4567bf]::hir::map::Map>::visit_all_item_likes::<rustc_passes[fd3a786e9a92d522]::dead::LifeSeeder>
  24:     0x7f91d85f8ef3 - rustc_passes[fd3a786e9a92d522]::dead::live_symbols_and_ignored_derived_traits
  25:     0x7f91d7a30608 - <rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind as rustc_query_system[cf3d2502706fe991]::dep_graph::DepKind>::with_deps::<<rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>::{closure#0}, (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>
  26:     0x7f91d7983120 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>
  27:     0x7f91d7a8a3cc - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<((std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>), rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>::{closure#3}>
  28:     0x7f91d92f10d5 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::ArenaCache<(), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>>
  29:     0x7f91d78a7eaa - rustc_query_system[cf3d2502706fe991]::query::plumbing::force_query::<rustc_query_impl[8218de0923c6cd45]::queries::live_symbols_and_ignored_derived_traits, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  30:     0x7f91d78e1cf6 - rustc_query_impl[8218de0923c6cd45]::query_callbacks::live_symbols_and_ignored_derived_traits::force_from_dep_node
  31:     0x7f91d969a841 - <rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt as rustc_query_system[cf3d2502706fe991]::dep_graph::DepContext>::try_force_from_dep_node
  32:     0x7f91d8962263 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  33:     0x7f91d88dea49 - rustc_query_system[cf3d2502706fe991]::query::plumbing::ensure_must_run::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, &rustc_middle[c145adf1c4567bf]::mir::query::BorrowCheckResult>
  34:     0x7f91d9355cda - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::check_mod_deathness, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  35:     0x7f91d8ea7c01 - <core[2734bb1f7d9ec6a5]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[afc566840a941718]::passes::analysis::{closure#5}::{closure#0}::{closure#1}> as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once
  36:     0x7f91d8ea9b0b - <core[2734bb1f7d9ec6a5]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[afc566840a941718]::passes::analysis::{closure#5}::{closure#0}> as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once
  37:     0x7f91d8ea60a8 - <rustc_session[95a8f1c94d15e5dc]::session::Session>::time::<(), rustc_interface[afc566840a941718]::passes::analysis::{closure#5}>
  38:     0x7f91d8e8af6c - rustc_interface[afc566840a941718]::passes::analysis
  39:     0x7f91d93e2b62 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  40:     0x7f91d9435303 - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#3}>
  41:     0x7f91d9324bae - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<(), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>>
  42:     0x7f91d9363c05 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::analysis, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  43:     0x7f91d8e69608 - <rustc_interface[afc566840a941718]::passes::QueryContext>::enter::<rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  44:     0x7f91d8e57ac5 - rustc_interface[afc566840a941718]::interface::create_compiler_and_run::<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>
  45:     0x7f91d8e3d134 - std[cd3cf6af28dff6de]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  46:     0x7f91d8e703e9 - <<std[cd3cf6af28dff6de]::thread::Builder>::spawn_unchecked_<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#1} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  47:     0x7f91d6888d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf70ac038171e3e1a
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  48:     0x7f91d6888d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he6690128792365ad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  49:     0x7f91d6888d03 - std::sys::unix::thread::Thread::new::thread_start::ha07928d93d5a5ec9
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys/unix/thread.rs:108:17
  50:     0x7f91d67ab609 - start_thread
                               at /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
  51:     0x7f91d66c4163 - clone
  52:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: 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.60.0 (7737e0b5c 2022-04-04) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
thread 'rustc' panicked at 'Illegal read of: 272', /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/compiler/rustc_query_system/src/dep_graph/graph.rs:436:25
stack backtrace:
   0:     0x7f91d687886d - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f91d687886d - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f91d687886d - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f91d687886d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f91d68d84ec - core::fmt::write::he803f0f418caf762
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f91d6868a98 - std::io::Write::write_fmt::h70bc45872f37e7bb
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
   6:     0x7f91d687c847 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f91d687c847 - std::sys_common::backtrace::print::h359300b4a7fccf65
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f91d687c847 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
   9:     0x7f91d687c510 - std::panicking::default_hook::h03ca0f22e1d2d25e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
  10:     0x7f91d70082c1 - rustc_driver[6eeb127b85fe99ac]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f91d687d124 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
  12:     0x7f91d687cdd7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
  13:     0x7f91d6878d34 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f91d687cae9 - rust_begin_unwind
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
  15:     0x7f91d6845863 - core::panicking::panic_fmt::he1bbc7336d49a357
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
  16:     0x7f91d899c749 - <rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind as rustc_query_system[cf3d2502706fe991]::dep_graph::DepKind>::read_deps::<<rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::read_index::{closure#0}>
  17:     0x7f91d8921e67 - <rustc_query_impl[8218de0923c6cd45]::Queries as rustc_middle[c145adf1c4567bf]::ty::query::QueryEngine>::def_span
  18:     0x7f91d7a4dd68 - <rustc_span[4b4bb4534443c42f]::def_id::DefId as rustc_query_impl[8218de0923c6cd45]::keys::Key>::default_span
  19:     0x7f91d7a71378 - rustc_query_impl[8218de0923c6cd45]::make_query::codegen_fn_attrs
  20:     0x7f91d78531a4 - <rustc_query_system[cf3d2502706fe991]::query::plumbing::QueryState<rustc_span[4b4bb4534443c42f]::def_id::DefId>>::try_collect_active_jobs::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  21:     0x7f91d78bc5c4 - <rustc_query_impl[8218de0923c6cd45]::Queries>::try_collect_active_jobs
  22:     0x7f91d7a2cfac - <rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>::try_print_query_stack
  23:     0x7f91d710ea4f - rustc_interface[afc566840a941718]::interface::try_print_query_stack
  24:     0x7f91d7008f1a - rustc_driver[6eeb127b85fe99ac]::report_ice
  25:     0x7f91d687d124 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
  26:     0x7f91d687cdd7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
  27:     0x7f91d6878d34 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
  28:     0x7f91d687cae9 - rust_begin_unwind
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
  29:     0x7f91d6845863 - core::panicking::panic_fmt::he1bbc7336d49a357
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
  30:     0x7f91d68d5438 - core::panicking::assert_failed_inner::hbaac70a629215a04
  31:     0x7f91d796bb2c - core[2734bb1f7d9ec6a5]::panicking::assert_failed::<rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex, rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex>
  32:     0x7f91d894c774 - <rustc_query_impl[8218de0923c6cd45]::on_disk_cache::OnDiskCache>::try_load_query_result::<rustc_middle[c145adf1c4567bf]::middle::codegen_fn_attrs::CodegenFnAttrs>
  33:     0x7f91d92d7300 - <<rustc_query_impl[8218de0923c6cd45]::queries::codegen_fn_attrs as rustc_query_system[cf3d2502706fe991]::query::config::QueryDescription<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>>::TRY_LOAD_FROM_DISK::{closure#0} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<(rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  34:     0x7f91d88de4de - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_middle[c145adf1c4567bf]::middle::codegen_fn_attrs::CodegenFnAttrs>
  35:     0x7f91d88ebf33 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::codegen_fn_attrs, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  36:     0x7f91d85f86e2 - <rustc_passes[fd3a786e9a92d522]::dead::LifeSeeder as rustc_hir[cb2e3a51e91fc9ed]::itemlikevisit::ItemLikeVisitor>::visit_item
  37:     0x7f91d8608e0e - <rustc_middle[c145adf1c4567bf]::hir::map::Map>::visit_all_item_likes::<rustc_passes[fd3a786e9a92d522]::dead::LifeSeeder>
  38:     0x7f91d85f8ef3 - rustc_passes[fd3a786e9a92d522]::dead::live_symbols_and_ignored_derived_traits
  39:     0x7f91d7a30608 - <rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind as rustc_query_system[cf3d2502706fe991]::dep_graph::DepKind>::with_deps::<<rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>::{closure#0}, (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>
  40:     0x7f91d7983120 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>
  41:     0x7f91d7a8a3cc - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<((std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>), rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>::{closure#3}>
  42:     0x7f91d92f10d5 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::ArenaCache<(), (std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, std[cd3cf6af28dff6de]::collections::hash::map::HashMap<rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, alloc[9a009599db7253ec]::vec::Vec<(rustc_span[4b4bb4534443c42f]::def_id::DefId, rustc_span[4b4bb4534443c42f]::def_id::DefId)>, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>)>>
  43:     0x7f91d78a7eaa - rustc_query_system[cf3d2502706fe991]::query::plumbing::force_query::<rustc_query_impl[8218de0923c6cd45]::queries::live_symbols_and_ignored_derived_traits, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  44:     0x7f91d78e1cf6 - rustc_query_impl[8218de0923c6cd45]::query_callbacks::live_symbols_and_ignored_derived_traits::force_from_dep_node
  45:     0x7f91d969a841 - <rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt as rustc_query_system[cf3d2502706fe991]::dep_graph::DepContext>::try_force_from_dep_node
  46:     0x7f91d8962263 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  47:     0x7f91d88dea49 - rustc_query_system[cf3d2502706fe991]::query::plumbing::ensure_must_run::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::LocalDefId, &rustc_middle[c145adf1c4567bf]::mir::query::BorrowCheckResult>
  48:     0x7f91d9355cda - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::check_mod_deathness, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  49:     0x7f91d8ea7c01 - <core[2734bb1f7d9ec6a5]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[afc566840a941718]::passes::analysis::{closure#5}::{closure#0}::{closure#1}> as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once
  50:     0x7f91d8ea9b0b - <core[2734bb1f7d9ec6a5]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[afc566840a941718]::passes::analysis::{closure#5}::{closure#0}> as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once
  51:     0x7f91d8ea60a8 - <rustc_session[95a8f1c94d15e5dc]::session::Session>::time::<(), rustc_interface[afc566840a941718]::passes::analysis::{closure#5}>
  52:     0x7f91d8e8af6c - rustc_interface[afc566840a941718]::passes::analysis
  53:     0x7f91d93e2b62 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  54:     0x7f91d9435303 - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#3}>
  55:     0x7f91d9324bae - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<(), core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>>
  56:     0x7f91d9363c05 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::analysis, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  57:     0x7f91d8e69608 - <rustc_interface[afc566840a941718]::passes::QueryContext>::enter::<rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  58:     0x7f91d8e57ac5 - rustc_interface[afc566840a941718]::interface::create_compiler_and_run::<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>
  59:     0x7f91d8e3d134 - std[cd3cf6af28dff6de]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  60:     0x7f91d8e703e9 - <<std[cd3cf6af28dff6de]::thread::Builder>::spawn_unchecked_<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#1} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  61:     0x7f91d6888d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf70ac038171e3e1a
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  62:     0x7f91d6888d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he6690128792365ad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
  63:     0x7f91d6888d03 - std::sys::unix::thread::Thread::new::thread_start::ha07928d93d5a5ec9
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys/unix/thread.rs:108:17
  64:     0x7f91d67ab609 - start_thread
                               at /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
  65:     0x7f91d66c4163 - clone
  66:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: 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.60.0 (7737e0b5c 2022-04-04) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
sccache: Compile terminated by signal 6
error: could not compile `bigboy`

@acfoltzer acfoltzer 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 Apr 7, 2022
@saethlin
Copy link
Member

saethlin commented Jul 1, 2023

Just doing some bookkeeping: This ICEs differently since #110632

@bors bors closed this as completed in 6f65ef5 Jul 17, 2023
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jul 18, 2023
Use u64 for incr comp allocation offsets

Fixes rust-lang/rust#76037
Fixes rust-lang/rust#95780
Fixes rust-lang/rust#111613

These issues are all reporting ICEs caused by using `u32` to store offsets to allocations in the incremental compilation cache. This PR aims to lift that limitation by changing the offset type in question to `u64`.

There are two perf runs in this PR. The first reports a regression, and the second does not. The changes are the same in both. I rebased the PR then did the second perf run because I noticed that the primary regression in it was very commonly seen in spurious regression reports.

I do not know what the perf run will report when this is merged. I would not be surprised to see regression or neutral, but the cachegrind diffs for the regression point at `try_mark_previous_green` which is a common source of inexplicable regressions and I don't think should be perturbed by this PR.

I'm not opposed to adding a regression test such as
```rust
fn main() {
    println!("{}", [37; 1 << 30].len());
}
```
But that program takes 1 minute to compile and consumes 4.6 GB of memory then writes that much to disk. Is that a concerning amount of resource use for a test?

r? `@nnethercote`
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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants