Skip to content

cargo build works but cargo test results in this "internal compiler error" #100432

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

Closed
triccs opened this issue Aug 12, 2022 · 2 comments
Closed
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@triccs
Copy link

triccs commented Aug 12, 2022

Code

<code>
Didn't add the code bc it errors on any portion of the tests and its fairly large. It was working earlier but hasn't since, I don't recall there being any changes made between the instances.

Meta

rustc --version --verbose:

<version>
rustc 1.62.1 (e092d0b6b 2022-07-16)
binary: rustc
commit-hash: e092d0b6b43f2de967af0887873151bb1c0b18d3
commit-date: 2022-07-16
host: x86_64-unknown-linux-gnu
release: 1.62.1
LLVM version: 14.0.5

Error output

<output>
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.62.1 (e092d0b6b 2022-07-16) running on x86_64-unknown-linux-gnu

note: compiler flags: -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 [unsafety_check_result] unsafety-checking `state::CONFIG`
#1 [analysis] running analysis passes on this crate
end of query stack
BackTrace

<backtrace>
thread 'rustc' panicked at 'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/check_unsafety.rs:517:36
stack backtrace:
   0:     0x7fd2df920fbd - std::backtrace_rs::backtrace::libunwind::trace::h8e036432725b1c57
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fd2df920fbd - std::backtrace_rs::backtrace::trace_unsynchronized::h4f83092254c85869
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fd2df920fbd - std::sys_common::backtrace::_print_fmt::h9728b5e056a3ece3
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fd2df920fbd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h48bb4bd2928827d2
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fd2df97cc4c - core::fmt::write::h909e69a2c24f44cc
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/fmt/mod.rs:1196:17
   5:     0x7fd2df912731 - std::io::Write::write_fmt::h7f4b8ab8af89e9ef
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/io/mod.rs:1654:15
   6:     0x7fd2df923cd5 - std::sys_common::backtrace::_print::hff4838ebf14a2171
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fd2df923cd5 - std::sys_common::backtrace::print::h2499280374189ad9
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fd2df923cd5 - std::panicking::default_hook::{{closure}}::h8b270fc55eeb284e
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:295:22
   9:     0x7fd2df923949 - std::panicking::default_hook::h3217e229d6e9d13c
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:314:9
  10:     0x7fd2e00e8571 - rustc_driver[b4654d3c4d4292dd]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fd2c8cd52c3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hdda9110d1c72accb
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/alloc/src/boxed.rs:1886:9
  12:     0x7fd2c8cd382d - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h8ccc9716ce80e326
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/proc_macro/src/bridge/client.rs:335:21
  13:     0x7fd2df9244a6 - std::panicking::rust_panic_with_hook::h9acb8048b738d2e0
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:702:17
  14:     0x7fd2df9242a7 - std::panicking::begin_panic_handler::{{closure}}::h70f3b839526af6dc
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:588:13
  15:     0x7fd2df921474 - std::sys_common::backtrace::__rust_end_short_backtrace::h1ecf2cee857fbe0a
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:138:18
  16:     0x7fd2df923fd9 - rust_begin_unwind
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
  17:     0x7fd2df8e9253 - core::panicking::panic_fmt::h9f8393e7fd56d655
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
  18:     0x7fd2e15351ff - rustc_mir_transform[fea6be209b04bad0]::check_unsafety::unsafety_check_result
  19:     0x7fd2e152c5a0 - <rustc_mir_transform[fea6be209b04bad0]::check_unsafety::provide::{closure#0} as core[dbea6f494faa966e]::ops::function::FnOnce<(rustc_middle[74ddc95a19f9493f]::ty::context::TyCtxt, rustc_span[1d0b4d44d1f53955]::def_id::LocalDefId)>>::call_once
  20:     0x7fd2e09c5d9b - <rustc_middle[74ddc95a19f9493f]::dep_graph::dep_node::DepKind as rustc_query_system[b4bd2ce220f7e42d]::dep_graph::DepKind>::with_deps::<rustc_query_system[b4bd2ce220f7e42d]::query::plumbing::try_load_from_disk_and_cache_in_memory<rustc_query_impl[4e222bcb6a32466d]::plumbing::QueryCtxt, rustc_span[1d0b4d44d1f53955]::def_id::LocalDefId, &rustc_middle[74ddc95a19f9493f]::mir::query::UnsafetyCheckResult>::{closure#1}, &rustc_middle[74ddc95a19f9493f]::mir::query::UnsafetyCheckResult>
  21:     0x7fd2e26f3270 - rustc_query_system[b4bd2ce220f7e42d]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[4e222bcb6a32466d]::plumbing::QueryCtxt, rustc_span[1d0b4d44d1f53955]::def_id::LocalDefId, &rustc_middle[74ddc95a19f9493f]::mir::query::UnsafetyCheckResult>
  22:     0x7fd2e1bb3f36 - rustc_query_system[b4bd2ce220f7e42d]::query::plumbing::try_execute_query::<rustc_query_impl[4e222bcb6a32466d]::plumbing::QueryCtxt, rustc_query_system[b4bd2ce220f7e42d]::query::caches::DefaultCache<rustc_span[1d0b4d44d1f53955]::def_id::LocalDefId, &rustc_middle[74ddc95a19f9493f]::mir::query::UnsafetyCheckResult>>
  23:     0x7fd2e1b7d68e - <rustc_query_impl[4e222bcb6a32466d]::Queries as rustc_middle[74ddc95a19f9493f]::ty::query::QueryEngine>::unsafety_check_result
  24:     0x7fd2e153cc2b - rustc_mir_transform[fea6be209b04bad0]::check_unsafety::check_unsafety
  25:     0x7fd2e13c7408 - <rustc_session[a2f3190f51a45935]::session::Session>::time::<(), rustc_interface[9f664daa3237129]::passes::analysis::{closure#3}>
  26:     0x7fd2e2185fdc - rustc_interface[9f664daa3237129]::passes::analysis
  27:     0x7fd2e2632185 - <rustc_query_system[b4bd2ce220f7e42d]::dep_graph::graph::DepGraph<rustc_middle[74ddc95a19f9493f]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[74ddc95a19f9493f]::ty::context::TyCtxt, (), core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>
  28:     0x7fd2e26d75c1 - rustc_query_system[b4bd2ce220f7e42d]::query::plumbing::try_execute_query::<rustc_query_impl[4e222bcb6a32466d]::plumbing::QueryCtxt, rustc_query_system[b4bd2ce220f7e42d]::query::caches::DefaultCache<(), core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>>
  29:     0x7fd2e27188ce - rustc_query_system[b4bd2ce220f7e42d]::query::plumbing::get_query::<rustc_query_impl[4e222bcb6a32466d]::queries::analysis, rustc_query_impl[4e222bcb6a32466d]::plumbing::QueryCtxt>
  30:     0x7fd2e2166777 - <rustc_interface[9f664daa3237129]::passes::QueryContext>::enter::<rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>
  31:     0x7fd2e2151708 - <rustc_interface[9f664daa3237129]::interface::Compiler>::enter::<rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}::{closure#2}, core[dbea6f494faa966e]::result::Result<core[dbea6f494faa966e]::option::Option<rustc_interface[9f664daa3237129]::queries::Linker>, rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>
  32:     0x7fd2e217a09f - rustc_span[1d0b4d44d1f53955]::with_source_map::<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_interface[9f664daa3237129]::interface::create_compiler_and_run<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}>::{closure#1}>
  33:     0x7fd2e2152374 - rustc_interface[9f664daa3237129]::interface::create_compiler_and_run::<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}>
  34:     0x7fd2e214fc12 - <scoped_tls[ab1554bfb6e7ab15]::ScopedKey<rustc_span[1d0b4d44d1f53955]::SessionGlobals>>::set::<rustc_interface[9f664daa3237129]::interface::run_compiler<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}>::{closure#0}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>
  35:     0x7fd2e2166dff - std[8996aeeb2a45fe64]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9f664daa3237129]::util::run_in_thread_pool_with_globals<rustc_interface[9f664daa3237129]::interface::run_compiler<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}>::{closure#0}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>::{closure#0}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>
  36:     0x7fd2e2166f39 - <<std[8996aeeb2a45fe64]::thread::Builder>::spawn_unchecked_<rustc_interface[9f664daa3237129]::util::run_in_thread_pool_with_globals<rustc_interface[9f664daa3237129]::interface::run_compiler<core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>, rustc_driver[b4654d3c4d4292dd]::run_compiler::{closure#1}>::{closure#0}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>::{closure#0}, core[dbea6f494faa966e]::result::Result<(), rustc_errors[4633ef6e4608f9c1]::ErrorGuaranteed>>::{closure#1} as core[dbea6f494faa966e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7fd2df92e3c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h191d5c5ea3edb31d
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/alloc/src/boxed.rs:1872:9
  38:     0x7fd2df92e3c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h42ef7cb2ae640a31
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/alloc/src/boxed.rs:1872:9
  39:     0x7fd2df92e3c3 - std::sys::unix::thread::Thread::new::thread_start::he47f7169665dab60
                               at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys/unix/thread.rs:108:17
  40:     0x7fd2df4676db - start_thread
  41:     0x7fd2def8871f - __clone
  42:                0x0 - <unknown>


@triccs triccs 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 Aug 12, 2022
@luqmana
Copy link
Member

luqmana commented Aug 12, 2022

Seems like a dupe of #91015

Either way, a repro would be great if you got one.

@rustbot label +E-needs-mcve

@rustbot rustbot added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 12, 2022
@triccs
Copy link
Author

triccs commented Aug 12, 2022

running cargo clean fixed it

@triccs triccs closed this as completed Aug 12, 2022
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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

No branches or pull requests

3 participants