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

Assertion during ArgusCallbacks::after_expansion() #41

Open
djc opened this issue Oct 2, 2024 · 2 comments
Open

Assertion during ArgusCallbacks::after_expansion() #41

djc opened this issue Oct 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@djc
Copy link

djc commented Oct 2, 2024

Problem

Encountered this while working on https://github.com/KumoCorp/kumomta, in this branch. (I think this is the one I was mentioning earlier in my conversation with @gavinleroy.)

Logs

OS: darwin (24.0.0)
VSCode: 1.93.1
Error message

[INFO src/plugin.rs:238] - Starting rustc analysis...
[INFO src/timer.rs:8] - rustc took 0.0206s
[INFO src/timer.rs:8] - global_ctxt took 0.0000s
[INFO src/find_bodies.rs:52] - Starting find_bodies...
[INFO src/timer.rs:8] - find_bodies took 0.0028s
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:109 ~ kumo_spf[8991]::record::starts_with_number).13) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:109 ~ kumo_spf[8991]::record::starts_with_number).26) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:109 ~ kumo_spf[8991]::record::starts_with_number).69) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:109 ~ kumo_spf[8991]::record::starts_with_number).146) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:113 ~ kumo_spf[8991]::record::starts_with_ident).60) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:129 ~ kumo_spf[8991]::record::{impl#9}::parse::add_literal).44) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:130 ~ kumo_spf[8991]::record::{impl#9}::parse::is_macro_literal).31) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:167 ~ kumo_spf[8991]::record::{impl#13}::fmt).23) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:87 ~ kumo_spf[8991]::record::{impl#0}::parse).30) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:87 ~ kumo_spf[8991]::record::{impl#0}::parse).243) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:89 ~ kumo_spf[8991]::record::{impl#0}::evaluate).158) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:89 ~ kumo_spf[8991]::record::{impl#0}::evaluate).159) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:176 ~ kumo_spf[8991]::record::{impl#14}::fmt).47) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:181 ~ kumo_spf[8991]::record::{impl#15}::fmt).28) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:92 ~ kumo_spf[8991]::record::{impl#1}::parse).93) }
[INFO src/plugin.rs:315] - analyzing BodyId { hir_id: HirId(DefId(0:93 ~ kumo_spf[8991]::record::{impl#1}::evaluate).307) }
thread 'rustc' panicked at compiler/rustc_infer/src/infer/opaque_types/mod.rs:497:9:
assertion `left == right` failed
  left: Some(?4t)
 right: None
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed::<core::option::Option<rustc_middle::ty::Ty>, core::option::Option<rustc_middle::ty::Ty>>
   4: <rustc_trait_selection::solve::eval_ctxt::EvalCtxt>::evaluate_goal_raw
   5: <rustc_trait_selection::solve::eval_ctxt::EvalCtxt>::enter_root::<core::result::Result<(bool, rustc_type_ir::solve::Certainty), rustc_type_ir::solve::NoSolution>, <rustc_infer::infer::InferCtxt as rustc_trait_selection::solve::eval_ctxt::InferCtxtEvalExt>::evaluate_root_goal::{closure#0}>
   6: <rustc_trait_selection::solve::fulfill::FulfillmentCtxt as rustc_infer::traits::engine::TraitEngine>::select_where_possible
   7: <rustc_hir_typeck::fn_ctxt::FnCtxt>::type_inference_fallback
   8: rustc_hir_typeck::typeck
      [... omitted 2 frames ...]
   9: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
  10: rustc_hir_typeck::inspect_typeck
  11: argus_lib::analysis::obligations
  12: <argus_cli::plugin::ArgusCallbacks<A,T,F> as rustc_driver_impl::Callbacks>::after_expansion::{{closure}}::{{closure}}
  13: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
  14: rustc_middle::ty::context::GlobalCtxt::enter
  15: <argus_cli::plugin::ArgusCallbacks<A,T,F> as rustc_driver_impl::Callbacks>::after_expansion
  16: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  17: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  18: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: could not compile `kumo-spf` (lib)

Full log: https://paste.rs/HCkYZ

@djc djc changed the title Assertion in ArgusCallbacks::after_expansion() Assertion during ArgusCallbacks::after_expansion() Oct 2, 2024
@gavinleroy gavinleroy added the bug Something isn't working label Oct 2, 2024
@gavinleroy
Copy link
Collaborator

Thank you for tracking that down!

I believe this is a problem with how Argus invokes some rustc APIs, I'll need to investigate further

@djc
Copy link
Author

djc commented Oct 2, 2024

It's weird because it seems very intermittent, happens seemingly randomly while switching tabs to another file. (I do have autosaving enabled so could maybe be triggered by a change? But I don't think I was making a change at the time.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants