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

Compiler panic: failed to lookup SourceFile in new context ; on_disk_cache.rs:500:22 #92459

Closed
benjamincoven opened this issue Dec 31, 2021 · 2 comments
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

@benjamincoven
Copy link

Hello,

For an unknown reason, my compiler started to panic on my current project. I did not major change on sources and I restarted my computer without success.

rustc --version --verbose:

 1.59.0-nightly (51e8031e1 2021-12-25) running on x86_64-pc-windows-msvc

Error output

thread 'rustc' panicked at 'failed to lookup `SourceFile` in new context', compiler\rustc_query_impl\src\on_disk_cache.rs:500:22
stack backtrace:
   0:     0x7ffaf551677f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5a58400851e949f8
   1:     0x7ffaf554444a - core::fmt::write::hff4bb0c0b35375a8
   2:     0x7ffaf55080f8 - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h5875a3bfa929f340
   3:     0x7ffaf5519f26 - std::panicking::take_hook::h7f5048eec714962f
   4:     0x7ffaf5519a09 - std::panicking::take_hook::h7f5048eec714962f
   5:     0x7ffae90d1ba9 - <rustc_lint[e722703b740bd8e2]::BuiltinCombinedPreExpansionLintPass as rustc_lint[e722703b740bd8e2]::passes::EarlyLintPass>::check_variant
   6:     0x7ffaf551a789 - std::panicking::rust_panic_with_hook::h23cca693aabca7f8
   7:     0x7ffaf551a50b - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h8d0417ea1330e57e
   8:     0x7ffaf55170a7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5a58400851e949f8
   9:     0x7ffaf551a239 - rust_begin_unwind
  10:     0x7ffaf5576cb0 - core::panicking::panic_fmt::h5ab4e3ba5dc3c967
  11:     0x7ffaf5541050 - <core::panic::panic_info::PanicInfo as core::fmt::Display>::fmt::h8540fd79ab2049d4
  12:     0x7ffaf5540ffb - <core::panic::panic_info::PanicInfo as core::fmt::Display>::fmt::h8540fd79ab2049d4
  13:     0x7ffaf5576ba9 - core::option::expect_failed::hb07a65e07bc3f1e2
  14:     0x7ffaec881163 - <rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::OnDiskCache>::load_side_effects
  15:     0x7ffaec9d53e7 - <rustc_span[b5f4c6ecb907092a]::span_encoding::Span as rustc_serialize[7f9c756e62a1b2ff]::serialize::Decodable<rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::CacheDecoder>>::decode
  16:     0x7ffaec98a276 - <&[(rustc_middle[dffb3ae2acfe2c55]::ty::Predicate, rustc_span[b5f4c6ecb907092a]::span_encoding::Span)] as rustc_serialize[7f9c756e62a1b2ff]::serialize::Decodable<rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::CacheDecoder>>::decode
  17:     0x7ffaec86c470 - rustc_query_impl[9a1695dcc6352ba]::query_callbacks::diagnostic_hir_wf_check
  18:     0x7ffaec8382b3 - RNvXsd_NtCsPgiYi3T7yE_16rustc_query_impl13on_disk_cacheRINtNtNtNtCscQxF4DLPIEc_3std11collections4hash3set7HashSetNtNtCsfCxZWo2PWQw_10rustc_span6def_id10LocalDefIdINtNtCsdvBdo98bZob_4core4hash18BuildHasherDefaultNtCs347PDGvn2rC_10rustc_hash8FxHasherEEINtNt
  19:     0x7ffaec7e5ff8 - <rustc_query_impl[9a1695dcc6352ba]::Queries as rustc_middle[dffb3ae2acfe2c55]::ty::query::QueryEngine>::try_mark_green
  20:     0x7ffaec97b4c9 - <&[(rustc_middle[dffb3ae2acfe2c55]::ty::Predicate, rustc_span[b5f4c6ecb907092a]::span_encoding::Span)] as rustc_serialize[7f9c756e62a1b2ff]::serialize::Decodable<rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::CacheDecoder>>::decode
  21:     0x7ffaec881314 - <rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::OnDiskCache>::load_side_effects
  22:     0x7ffaec97b5b8 - <&[(rustc_middle[dffb3ae2acfe2c55]::ty::Predicate, rustc_span[b5f4c6ecb907092a]::span_encoding::Span)] as rustc_serialize[7f9c756e62a1b2ff]::serialize::Decodable<rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::CacheDecoder>>::decode
  23:     0x7ffaec876983 - rustc_query_impl[9a1695dcc6352ba]::query_callbacks::diagnostic_hir_wf_check
  24:     0x7ffaec839220 - RNvXsd_NtCsPgiYi3T7yE_16rustc_query_impl13on_disk_cacheRINtNtNtNtCscQxF4DLPIEc_3std11collections4hash3set7HashSetNtNtCsfCxZWo2PWQw_10rustc_span6def_id10LocalDefIdINtNtCsdvBdo98bZob_4core4hash18BuildHasherDefaultNtCs347PDGvn2rC_10rustc_hash8FxHasherEEINtNt
  25:     0x7ffaec87fd77 - <rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::OnDiskCache>::load_side_effects
  26:     0x7ffaec6d187b - <rustc_mir_dataflow[7c8b32c87ef962b4]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[7c8b32c87ef962b4]::framework::AnalysisDomain>::initialize_start_block
  27:     0x7ffaec7a71e2 - <rustc_query_impl[9a1695dcc6352ba]::Queries>::as_dyn
  28:     0x7ffaec62bb8d - <rustc_mir_dataflow[7c8b32c87ef962b4]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[7c8b32c87ef962b4]::framework::AnalysisDomain>::initialize_start_block
  29:     0x7ffaec7534e5 - <rustc_mir_dataflow[7c8b32c87ef962b4]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[7c8b32c87ef962b4]::framework::AnalysisDomain>::initialize_start_block
  30:     0x7ffaed5b70d9 - <rustc_middle[dffb3ae2acfe2c55]::ty::context::TyCtxt>::typeck_body
  31:     0x7ffaebeff3b6 - <rustc_ast_lowering[d2a5b025fa61f3d]::index::NodeCollector as rustc_hir[c0668b581783b1ce]::intravisit::Visitor>::visit_trait_item_ref
  32:     0x7ffaebedf031 - <rustc_ast_lowering[d2a5b025fa61f3d]::index::NodeCollector as rustc_hir[c0668b581783b1ce]::intravisit::Visitor>::visit_trait_item_ref
  33:     0x7ffaebf67b7e - rustc_passes[60789fe10190c029]::dead::check_crate
  34:     0x7ffae92ff860 - <rustc_interface[ac1c543e5312ea9c]::passes::boxed_resolver::BoxedResolver>::to_resolver_outputs
  35:     0x7ffae931548b - rustc_interface[ac1c543e5312ea9c]::proc_macro_decls::provide
  36:     0x7ffae93037ce - <rustc_interface[ac1c543e5312ea9c]::passes::boxed_resolver::BoxedResolver>::to_resolver_outputs
  37:     0x7ffae92483c7 - rustc_interface[ac1c543e5312ea9c]::passes::analysis
  38:     0x7ffaec7ee2cb - <rustc_query_impl[9a1695dcc6352ba]::Queries as rustc_middle[dffb3ae2acfe2c55]::ty::query::QueryEngine>::try_mark_green
  39:     0x7ffaec92138e - <&[rustc_ast[8d82637ee02e01ce]::ast::InlineAsmTemplatePiece] as rustc_serialize[7f9c756e62a1b2ff]::serialize::Decodable<rustc_query_impl[9a1695dcc6352ba]::on_disk_cache::CacheDecoder>>::decode
  40:     0x7ffaec7b4be1 - <rustc_query_impl[9a1695dcc6352ba]::Queries>::as_dyn
  41:     0x7ffaec6b4179 - <rustc_mir_dataflow[7c8b32c87ef962b4]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[7c8b32c87ef962b4]::framework::AnalysisDomain>::initialize_start_block
  42:     0x7ffaec753932 - <rustc_mir_dataflow[7c8b32c87ef962b4]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[7c8b32c87ef962b4]::framework::AnalysisDomain>::initialize_start_block
  43:     0x7ffae915b960 - <rustc_driver[902bcae73d63f6eb]::args::Error as core[9d5b09b8b1721859]::fmt::Debug>::fmt
  44:     0x7ffae9151286 - <rustc_middle[dffb3ae2acfe2c55]::ty::SymbolName as core[9d5b09b8b1721859]::fmt::Display>::fmt
  45:     0x7ffae90edf55 - rustc_driver[902bcae73d63f6eb]::pretty::print_after_hir_lowering
  46:     0x7ffae914f633 - <rustc_middle[dffb3ae2acfe2c55]::ty::SymbolName as core[9d5b09b8b1721859]::fmt::Display>::fmt
  47:     0x7ffae90fb103 - <tracing_subscriber[e899c594dcdb8621]::util::TryInitError as core[9d5b09b8b1721859]::fmt::Display>::fmt
  48:     0x7ffae916d3c8 - <rustc_driver[902bcae73d63f6eb]::args::Error as core[9d5b09b8b1721859]::fmt::Debug>::fmt
  49:     0x7ffaf55292dc - std::sys::windows::thread::Thread::new::hb9cc99db3f1e711c
  50:     0x7ffb647c7034 - BaseThreadInitThunk
  51:     0x7ffb65742651 - RtlUserThreadStart

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.59.0-nightly (51e8031e1 2021-12-25) 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 [typeck] type-checking `utils::Logging::log_new_error`
#1 [analysis] running analysis passes on this crate
end of query stack

Thank you for your help.

@benjamincoven benjamincoven 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 Dec 31, 2021
@benjamincoven
Copy link
Author

Well I did not see that there is a pinned issue that is a duplicate.

@benjamincoven
Copy link
Author

#92163

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

No branches or pull requests

1 participant