Skip to content

Running clippy on remoc master causes an ICE #13190

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

Closed
surban opened this issue Jul 30, 2024 · 3 comments
Closed

Running clippy on remoc master causes an ICE #13190

surban opened this issue Jul 30, 2024 · 3 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@surban
Copy link

surban commented Jul 30, 2024

Summary

Running clippy on remoc master causes an ICE.

git clone https://github.com/ENQT-GmbH/remoc.git
cd remoc
cargo clippy

Version

rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-linux-gnu
release: 1.80.0
LLVM version: 18.1.7

Error output

Backtrace

  Checking remoc v0.14.0-pre1 (/data/surban/dev/remoc/remoc)
thread 'rustc' panicked at compiler/rustc_middle/src/ty/sty.rs:360:36:
called `Option::unwrap()` on a `None` value
stack backtrace:
 0:     0x7bd4be3dcf05 - std::backtrace_rs::backtrace::libunwind::trace::h58eed11393533053
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
 1:     0x7bd4be3dcf05 - std::backtrace_rs::backtrace::trace_unsynchronized::h6af9bae28ebb6388
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
 2:     0x7bd4be3dcf05 - std::sys_common::backtrace::_print_fmt::hb6748916642a4fb2
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:68:5
 3:     0x7bd4be3dcf05 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3692694645b1bb6a
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:44:22
 4:     0x7bd4be42dc4b - core::fmt::rt::Argument::fmt::h7aa93977ba74ae0f
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/fmt/rt.rs:165:63
 5:     0x7bd4be42dc4b - core::fmt::write::h5131d80b4c69b88d
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/fmt/mod.rs:1168:21
 6:     0x7bd4be3d1bdf - std::io::Write::write_fmt::h1fb327a7d8b0eb36
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/io/mod.rs:1835:15
 7:     0x7bd4be3dccde - std::sys_common::backtrace::_print::he6ebb7b9d89f4456
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:47:5
 8:     0x7bd4be3dccde - std::sys_common::backtrace::print::h998d75b840f75a73
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:34:9
 9:     0x7bd4be3df719 - std::panicking::default_hook::{{closure}}::h18ec7fe6a38b9da0
10:     0x7bd4be3df4ba - std::panicking::default_hook::hfb3f22c2e4075a6a
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:298:9
11:     0x7bd4bae1e731 - std[dece285a2424a0b]::panicking::update_hook::<alloc[1cfb511ed242f20]::boxed::Box<rustc_driver_impl[aab422d80b3fe9fb]::install_ice_hook::{closure#0}>>::{closure#0}
12:     0x7bd4be3dfe4b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb8210adad49183e7
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2077:9
13:     0x7bd4be3dfe4b - std::panicking::rust_panic_with_hook::h51af00bcb4660c4e
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:799:13
14:     0x7bd4be3dfb8b - std::panicking::begin_panic_handler::{{closure}}::h39f76aa863fbe8ce
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:656:13
15:     0x7bd4be3dd3c9 - std::sys_common::backtrace::__rust_end_short_backtrace::h4d10fc2251b89840
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:171:18
16:     0x7bd4be3df8f7 - rust_begin_unwind
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:652:5
17:     0x7bd4be42a1e3 - core::panicking::panic_fmt::h319840fcbcd912ef
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:72:14
18:     0x7bd4be42a28c - core::panicking::panic::h19def44c80243eda
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:146:5
19:     0x7bd4be429f29 - core::option::unwrap_failed::h9b45086d3ec3e03c
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:1985:5
20:     0x7bd4bd97fa66 - <rustc_middle[806dc37a95cc1433]::ty::sty::ParamConst>::find_ty_from_env.cold
21:     0x7bd4b8f875f6 - <rustc_trait_selection[cda064f81387dfd5]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#1}
22:     0x7bd4bc5cd2f4 - <rustc_trait_selection[cda064f81387dfd5]::traits::select::SelectionContext>::evaluate_predicate_recursively::{closure#0}::{closure#0}
23:     0x7bd4bc5ca127 - rustc_traits[66c1877d4751bfbe]::evaluate_obligation::evaluate_obligation
24:     0x7bd4bc5c9931 - rustc_query_impl[e1fdd24b038f677d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e1fdd24b038f677d]::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle[806dc37a95cc1433]::query::erase::Erased<[u8; 2usize]>>
25:     0x7bd4bc5c6f2f - rustc_query_system[181e9214754b2580]::query::plumbing::try_execute_query::<rustc_query_impl[e1fdd24b038f677d]::DynamicConfig<rustc_query_system[181e9214754b2580]::query::caches::DefaultCache<rustc_type_ir[36ccb15e4f0157a5]::canonical::Canonical<rustc_middle[806dc37a95cc1433]::ty::context::TyCtxt, rustc_middle[806dc37a95cc1433]::ty::ParamEnvAnd<rustc_middle[806dc37a95cc1433]::ty::predicate::Predicate>>, rustc_middle[806dc37a95cc1433]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[e1fdd24b038f677d]::plumbing::QueryCtxt, true>
26:     0x7bd4bc5c6225 - rustc_query_impl[e1fdd24b038f677d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
27:     0x7bd4b8fafa37 - <rustc_infer[e55612a998a1f7da]::infer::InferCtxt as rustc_trait_selection[cda064f81387dfd5]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
28:     0x56339489adb3 - clippy_utils[ace30f5cb087adc8]::ty::implements_trait
29:     0x563394639d62 - clippy_lints[8252afea1b446f3f]::doc::missing_headers::check
30:     0x56339463ab0d - <clippy_lints[8252afea1b446f3f]::doc::Documentation as rustc_lint[b2e651ff57335b0f]::passes::LateLintPass>::check_attributes
31:     0x7bd4bb1d2b6c - <rustc_lint[b2e651ff57335b0f]::late::LateContextAndPass<rustc_lint[b2e651ff57335b0f]::late::RuntimeCombinedLateLintPass> as rustc_hir[2759933e01316c52]::intravisit::Visitor>::visit_nested_item
32:     0x7bd4bb1d1e98 - <rustc_lint[b2e651ff57335b0f]::late::LateContextAndPass<rustc_lint[b2e651ff57335b0f]::late::RuntimeCombinedLateLintPass> as rustc_hir[2759933e01316c52]::intravisit::Visitor>::visit_nested_item
33:     0x7bd4bb1d1e98 - <rustc_lint[b2e651ff57335b0f]::late::LateContextAndPass<rustc_lint[b2e651ff57335b0f]::late::RuntimeCombinedLateLintPass> as rustc_hir[2759933e01316c52]::intravisit::Visitor>::visit_nested_item
34:     0x7bd4bb1d1e98 - <rustc_lint[b2e651ff57335b0f]::late::LateContextAndPass<rustc_lint[b2e651ff57335b0f]::late::RuntimeCombinedLateLintPass> as rustc_hir[2759933e01316c52]::intravisit::Visitor>::visit_nested_item
35:     0x7bd4bcc0658d - rustc_lint[b2e651ff57335b0f]::late::check_crate
36:     0x7bd4bcc0a974 - rustc_interface[e93a829871290abb]::passes::analysis
37:     0x7bd4bcc09ae5 - rustc_query_impl[e1fdd24b038f677d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e1fdd24b038f677d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[806dc37a95cc1433]::query::erase::Erased<[u8; 1usize]>>
38:     0x7bd4bd128b75 - rustc_query_system[181e9214754b2580]::query::plumbing::try_execute_query::<rustc_query_impl[e1fdd24b038f677d]::DynamicConfig<rustc_query_system[181e9214754b2580]::query::caches::SingleCache<rustc_middle[806dc37a95cc1433]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[e1fdd24b038f677d]::plumbing::QueryCtxt, true>
39:     0x7bd4bd1287b8 - rustc_query_impl[e1fdd24b038f677d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
40:     0x7bd4bce2b7cd - rustc_interface[e93a829871290abb]::interface::run_compiler::<core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>, rustc_driver_impl[aab422d80b3fe9fb]::run_compiler::{closure#0}>::{closure#1}
41:     0x7bd4bcf3cc69 - std[dece285a2424a0b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e93a829871290abb]::util::run_in_thread_with_globals<rustc_interface[e93a829871290abb]::interface::run_compiler<core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>, rustc_driver_impl[aab422d80b3fe9fb]::run_compiler::{closure#0}>::{closure#1}, core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>>
42:     0x7bd4bcf3ca6a - <<std[dece285a2424a0b]::thread::Builder>::spawn_unchecked_<rustc_interface[e93a829871290abb]::util::run_in_thread_with_globals<rustc_interface[e93a829871290abb]::interface::run_compiler<core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>, rustc_driver_impl[aab422d80b3fe9fb]::run_compiler::{closure#0}>::{closure#1}, core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8d9e01cfbf9cd659]::result::Result<(), rustc_span[6fd0e9f3c9cf86ed]::ErrorGuaranteed>>::{closure#2} as core[8d9e01cfbf9cd659]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
43:     0x7bd4be3e9e3b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3af90da315d4b185
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2063:9
44:     0x7bd4be3e9e3b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4e7f3b3405b4b88b
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2063:9
45:     0x7bd4be3e9e3b - std::sys::pal::unix::thread::Thread::new::thread_start::h3b8e81128811868f
                             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys/pal/unix/thread.rs:108:17
46:     0x7bd4b7a94ac3 - start_thread
                             at ./nptl/pthread_create.c:442:8
47:     0x7bd4b7b26850 - __GI___clone3
                             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
48:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: rustc 1.80.0 (051478957 2024-07-21) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `rch::oneshot::receiver::Receiver<T, Codec, NEW_MAX_ITEM_SIZE>: core::future::future::Future`
#1 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.80 (0514789 2024-07-21)

error: could not compile `remoc` (lib)

@surban surban added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Jul 30, 2024
@flip1995
Copy link
Member

Backtrace looks similar to #10374, but that doesn't mean that they're necessarily are related.

@matthiaskrgr
Copy link
Member

This is / was known rustc bug :)
https://github.com/rust-lang/rust/issues?q=is%3Aissue+%22compiler%2Frustc_middle%2Fsrc%2Fty%2Fsty.rs%22+%22Option%3A%3ANone%22

I think this should be fixed in latest nightly?

@samueltardieu
Copy link
Contributor

This seems fixed in Rust 1.86 (beta), but not in 1.85.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants