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 panics after code refactor #92056

Closed
pmnoxx opened this issue Dec 18, 2021 · 4 comments
Closed

Compiler panics after code refactor #92056

pmnoxx opened this issue Dec 18, 2021 · 4 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

@pmnoxx
Copy link
Contributor

pmnoxx commented Dec 18, 2021

I renamed MyAllocator to ProxyAllocator and that caused cargo check to panic.

Code

See near/near-memory-tracker#72
See near/near-memory-tracker@4594e16

I used refactoring in Clion, just renamed MyAllocator to ProxyAllocator

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-unknown-linux-gnu
release: 1.57.0
LLVM version: 13.0.0

Error output

<output>
   Checking near-rust-allocator-proxy v0.4.0 (/home/pmnoxx/repos/near-memory-tracker/near-rust-allocator-proxy)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
   2: core::panicking::panic
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:50:5
   3: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
   4: 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
   5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
   6: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   8: rustc_query_system::query::plumbing::ensure_must_run
   9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_match
  10: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  11: rustc_data_structures::sync::par_for_each_in
  12: rustc_session::utils::<impl rustc_session::session::Session>::time
  13: rustc_interface::passes::analysis
  14: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  15: rustc_data_structures::stack::ensure_sufficient_stack
  16: rustc_query_system::query::plumbing::try_execute_query
  17: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  18: rustc_interface::passes::QueryContext::enter
  19: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  20: rustc_span::with_source_map
  21: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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-unknown-linux-gnu

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

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 `near-rust-allocator-proxy`

@pmnoxx pmnoxx 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 18, 2021
@pmnoxx
Copy link
Contributor Author

pmnoxx commented Dec 18, 2021

Hmm, not the issue is not happening any more.

@BGR360
Copy link
Contributor

BGR360 commented Dec 21, 2021

Looks like something related to incremental compilation.

@rustbot label +A-incr-comp

Hmm, not the issue is not happening any more.

@pmnoxx did it fail any more times after the first time? Or did it start working immediately after you tried again?

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label Dec 21, 2021
@BGR360 BGR360 mentioned this issue Dec 21, 2021
@pmnoxx
Copy link
Contributor Author

pmnoxx commented Dec 21, 2021

Looks like something related to incremental compilation.

@rustbot label +A-incr-comp

Hmm, not the issue is not happening any more.

@pmnoxx did it fail any more times after the first time? Or did it start working immediately after you tried again?

It failed a couple of times. Unfortunately, I didn't save the target dir at that time.

@BGR360
Copy link
Contributor

BGR360 commented Dec 21, 2021

I think this might get fixed by #91919

@pmnoxx pmnoxx closed this as completed Mar 7, 2022
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

3 participants