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

Unexpected panic in rustc_hir/src/definitions.rs #93020

Closed
esoterra opened this issue Jan 18, 2022 · 3 comments
Closed

Unexpected panic in rustc_hir/src/definitions.rs #93020

esoterra opened this issue Jan 18, 2022 · 3 comments
Labels
A-incr-comp Area: Incremental compilation 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

@esoterra
Copy link

Code

I cannot achieve reproduction except in the exact repo on the exact machine I ran this.
Creating another clone of the same project checked out to the same branch does not reproduce even on the same machine.

The branch in question is:
https://github.com/wrought-lang/wrought-rs/tree/rename_operation

Meta

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0

Error output

WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\proc_macro_error_attr-c6a371d29b9d37ab.dll
   Compiling wrought v0.1.2 (C:\Users\Kyle B\git\wrought)
WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\clap_derive-62021203e3222423.dll
WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\logos_derive-155681c1c4f1014b.dll
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_hir\src\definitions.rs:452:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.57.0 (f1edd0429 2021-11-29) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `wrought`
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_hir\src\definitions.rs:452:14
stack backtrace:
   0:     0x7ff8045292cf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   1:     0x7ff80455306a - core::fmt::write::he97f21b785b90134
   2:     0x7ff80451b448 - <std::io::IoSlice as core::fmt::Debug>::fmt::h967100caef347f28
   3:     0x7ff80452cd96 - std::panicking::take_hook::hb46205f0055becfd
   4:     0x7ff80452c797 - std::panicking::take_hook::hb46205f0055becfd
   5:     0x7ffff885a295 - <tracing_subscriber::fmt::writer::TestWriter as std::io::Write>::flush::hff7a705da113f4ca
   6:     0x7ff80452d6a9 - std::panicking::rust_panic_with_hook::hce0846b912adb5c5
   7:     0x7ff80452d11f - rust_begin_unwind
   8:     0x7ff804529bf7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   9:     0x7ff80452d0a9 - rust_begin_unwind
  10:     0x7ff804589510 - core::panicking::panic_fmt::h58715deff5969a45
  11:     0x7ff80458945c - core::panicking::panic::hc36befec1b90302c
  12:     0x7ffffc0db97e - <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id::h9f7b03ae96e81f81
  13:     0x7ffffcdeeeb4 - rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover::he3ec8272ca40aa05
  14:     0x7ffffc001dad - rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node::h913d78c1ee69fb04
  15:     0x7ffffc05cb34 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  16:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  17:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  18:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  19:     0x7ffffc03497d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  20:     0x7ffffbd1b45e - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  21:     0x7ffffc023283 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  22:     0x7ffffb253b93 - <rustc_typeck::check::PlaceOp as core::fmt::Debug>::fmt::h2e3c14b4c6653d68
  23:     0x7ffffb20daf3 - rustc_typeck::check_crate::h07f2a7631cf584be
  24:     0x7ffff89c3e8d - rustc_interface::passes::analysis::hc0b219c9fceabc88
  25:     0x7ffffbfdb8eb - ZN16rustc_query_impl13on_disk_cache260_$LT$impl$u20$rustc_serialize..serialize..Decodable$LT$rustc_query_impl..on_disk_cache..CacheDecoder$GT$$u20$for$u20$$RF$std..collections..hash..set..HashSet$LT$rustc_span..def_id..LocalDefId$C$core..hash..BuildHasher
  26:     0x7ffffc06c61d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  27:     0x7ffffbfb2972 - <rustc_span::def_id::LocalDefId as rustc_query_impl::profiling_support::SpecIntoSelfProfilingString>::spec_to_self_profile_string::h641e5a6d4a18de66
  28:     0x7ffffbd54849 - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  29:     0x7ffffc01e095 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  30:     0x7ffff88ae59a - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  31:     0x7ffff8878944 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  32:     0x7ffff88b07e6 - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  33:     0x7ffff887ed63 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  34:     0x7ffff88d9a58 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h11014d06e9af86ea
  35:     0x7ff804539d8c - std::sys::windows::thread::Thread::new::h4046847bccf80b57
  36:     0x7ff8638a7034 - BaseThreadInitThunk
  37:     0x7ff865022651 - RtlUserThreadStart

error: internal compiler error: unexpected panic

@esoterra esoterra 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 18, 2022
@hkratz
Copy link
Contributor

hkratz commented Jan 18, 2022

@rustbot label +A-incr-comp

@jamcleod
Copy link

jamcleod commented Feb 1, 2022

In case it isn't clear from the incr-comp label, for anyone else hitting the issue just run cargo clean then it'll work

@workingjubilee
Copy link
Member

This is almost certainly a duplicate of this issue and was probably resolved in this PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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

No branches or pull requests

5 participants