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

ICE: no entry found for key #122478

Closed
nazar-pc opened this issue Mar 14, 2024 · 4 comments
Closed

ICE: no entry found for key #122478

nazar-pc opened this issue Mar 14, 2024 · 4 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.

Comments

@nazar-pc
Copy link

Summary

I was working on code and caught this ICE, so I though I'd report it in case it is useful, but I made no attempts to minimize it.

Reproduction steps:

Version

rustc 1.78.0-nightly (c475e2303 2024-02-28)
binary: rustc
commit-hash: c475e2303b551d726307c646181e0677af1e0069
commit-date: 2024-02-28
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0

Error output

Backtrace

thread 'rustc' panicked at /rustc/c475e2303b551d726307c646181e0677af1e0069/compiler/rustc_middle/src/hir/mod.rs:145:21:
no entry found for key
stack backtrace:
 0:     0x7cbfc5dd716f - std::backtrace_rs::backtrace::libunwind::trace::h341f79bffd736d88
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
 1:     0x7cbfc5dd716f - std::backtrace_rs::backtrace::trace_unsynchronized::hcb28176336d7c562
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
 2:     0x7cbfc5dd716f - std::backtrace::Backtrace::create::h0b6cf3f206ab391e
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/backtrace.rs:331:13
 3:     0x7cbfc5dd70b0 - std::backtrace::Backtrace::force_capture::h9fc1710890c4f483
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/backtrace.rs:312:9
 4:     0x7cbfc289c588 - std[aeaa4a650f96ca4f]::panicking::update_hook::<alloc[4c4126b71025da3b]::boxed::Box<rustc_driver_impl[2ad8c6e0ef02d37]::install_ice_hook::{closure#0}>>::{closure#0}
 5:     0x7cbfc5df2010 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he192bb5ab07c6e66
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/alloc/src/boxed.rs:2030:9
 6:     0x7cbfc5df2010 - std::panicking::rust_panic_with_hook::h46c6fddd63cff830
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/panicking.rs:783:13
 7:     0x7cbfc5df1d52 - std::panicking::begin_panic_handler::{{closure}}::h8abc72b89d98e75c
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/panicking.rs:657:13
 8:     0x7cbfc5def296 - std::sys_common::backtrace::__rust_end_short_backtrace::h1eafc870bd031abe
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/sys_common/backtrace.rs:171:18
 9:     0x7cbfc5df1a84 - rust_begin_unwind
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/panicking.rs:645:5
10:     0x7cbfc5e3c255 - core::panicking::panic_fmt::hd079a8afc216673e
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/core/src/panicking.rs:72:14
11:     0x7cbfc5e3c421 - core::panicking::panic_display::h56feb7e4c7586108
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/core/src/panicking.rs:196:5
12:     0x7cbfc5e3c00b - core::panicking::panic_str::ha2be24c4de062bdb
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/core/src/panicking.rs:171:5
13:     0x7cbfc5e3c00b - core::option::expect_failed::h7c20858b2db31049
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/core/src/option.rs:1995:5
14:     0x7cbfc3efe53a - rustc_query_impl[1558aaa1aaeebfd3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1558aaa1aaeebfd3]::query_impl::hir_owner_parent::dynamic_query::{closure#2}::{closure#0}, rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 8usize]>>
15:     0x7cbfc4411c71 - rustc_query_system[d16d62496b73d155]::query::plumbing::try_execute_query::<rustc_query_impl[1558aaa1aaeebfd3]::DynamicConfig<rustc_query_system[d16d62496b73d155]::query::caches::VecCache<rustc_hir[f2d4ca1366cc66cb]::hir_id::OwnerId, rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1558aaa1aaeebfd3]::plumbing::QueryCtxt, true>
16:     0x7cbfc4411286 - rustc_query_impl[1558aaa1aaeebfd3]::query_impl::hir_owner_parent::get_query_incr::__rust_end_short_backtrace
17:     0x7cbfc3ef95d0 - <rustc_middle[84e56f5cb67b62e2]::lint::ShallowLintLevelMap>::lint_level_id_at_node
18:     0x7cbfc3ef8cbf - <rustc_middle[84e56f5cb67b62e2]::ty::context::TyCtxt>::lint_level_at_node
19:     0x7cbfc3dd51e6 - rustc_hir_analysis[83d0fabe73f51b37]::check_unused::check_unused_traits
20:     0x7cbfc3dd4b33 - rustc_query_impl[1558aaa1aaeebfd3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1558aaa1aaeebfd3]::query_impl::check_unused_traits::dynamic_query::{closure#2}::{closure#0}, rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 0usize]>>
21:     0x7cbfc49b28b9 - rustc_query_system[d16d62496b73d155]::query::plumbing::try_execute_query::<rustc_query_impl[1558aaa1aaeebfd3]::DynamicConfig<rustc_query_system[d16d62496b73d155]::query::caches::SingleCache<rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[1558aaa1aaeebfd3]::plumbing::QueryCtxt, true>
22:     0x7cbfc49b1e5a - rustc_query_impl[1558aaa1aaeebfd3]::query_impl::check_unused_traits::get_query_incr::__rust_end_short_backtrace
23:     0x7cbfc45a7118 - rustc_hir_analysis[83d0fabe73f51b37]::check_crate
24:     0x7cbfc4760faf - rustc_interface[91b806f92bb77cda]::passes::analysis
25:     0x7cbfc4760c19 - rustc_query_impl[1558aaa1aaeebfd3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1558aaa1aaeebfd3]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 1usize]>>
26:     0x7cbfc49356a2 - rustc_query_system[d16d62496b73d155]::query::plumbing::try_execute_query::<rustc_query_impl[1558aaa1aaeebfd3]::DynamicConfig<rustc_query_system[d16d62496b73d155]::query::caches::SingleCache<rustc_middle[84e56f5cb67b62e2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1558aaa1aaeebfd3]::plumbing::QueryCtxt, true>
27:     0x7cbfc493529c - rustc_query_impl[1558aaa1aaeebfd3]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
28:     0x7cbfc493e17c - rustc_interface[91b806f92bb77cda]::interface::run_compiler::<core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>, rustc_driver_impl[2ad8c6e0ef02d37]::run_compiler::{closure#0}>::{closure#0}
29:     0x7cbfc4bddd05 - std[aeaa4a650f96ca4f]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[91b806f92bb77cda]::util::run_in_thread_with_globals<rustc_interface[91b806f92bb77cda]::util::run_in_thread_pool_with_globals<rustc_interface[91b806f92bb77cda]::interface::run_compiler<core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>, rustc_driver_impl[2ad8c6e0ef02d37]::run_compiler::{closure#0}>::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>
30:     0x7cbfc4bddb32 - <<std[aeaa4a650f96ca4f]::thread::Builder>::spawn_unchecked_<rustc_interface[91b806f92bb77cda]::util::run_in_thread_with_globals<rustc_interface[91b806f92bb77cda]::util::run_in_thread_pool_with_globals<rustc_interface[91b806f92bb77cda]::interface::run_compiler<core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>, rustc_driver_impl[2ad8c6e0ef02d37]::run_compiler::{closure#0}>::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ceaa87f59aeb8bba]::result::Result<(), rustc_span[ac3b12a2af12cb0d]::ErrorGuaranteed>>::{closure#1} as core[ceaa87f59aeb8bba]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
31:     0x7cbfc5dfb9e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4c4227d670230628
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/alloc/src/boxed.rs:2016:9
32:     0x7cbfc5dfb9e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4bc52f0323c8ae82
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/alloc/src/boxed.rs:2016:9
33:     0x7cbfc5dfb9e5 - std::sys::pal::unix::thread::Thread::new::thread_start::hd34fbf5607308b31
                             at /rustc/c475e2303b551d726307c646181e0677af1e0069/library/std/src/sys/pal/unix/thread.rs:108:17
34:     0x7cbfbf694ac3 - start_thread
                             at ./nptl/pthread_create.c:442:8
35:     0x7cbfbf726850 - __GI___clone3
                             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
36:                0x0 - <unknown>


rustc version: 1.78.0-nightly (c475e2303 2024-02-28)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [hir_owner_parent] getting HIR parent of `commands::farm::farm::{closure#0}::{closure#11}::{closure#1}::{closure#0}::{use#0}`
rust-lang/rust-clippy#1 [check_unused_traits] checking unused trait imports in crate
rust-lang/rust-clippy#2 [analysis] running analysis passes on this crate
end of query stack

@nazar-pc nazar-pc added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Mar 14, 2024
@y21
Copy link
Member

y21 commented Mar 14, 2024

Moving to the rust-lang/rust issue tracker, since there aren't any clippy frames in the backtrace and the backtrace also suggests it happens while checking for unused traits, so most likely a bug in the compiler

@y21 y21 transferred this issue from rust-lang/rust-clippy Mar 14, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 14, 2024
@jieyouxu jieyouxu added the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label Mar 14, 2024
@workingjubilee
Copy link
Contributor

No repro, @nazar-pc. Try using the latest Rust toolchain instead of a pinned nightly.

@matthiaskrgr
Copy link
Member

could be #121096

@nazar-pc
Copy link
Author

Indeed, I should have checked latest nightly

@nazar-pc nazar-pc closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 14, 2024
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) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.
Projects
None yet
Development

No branches or pull requests

6 participants