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

Nightly compiler error compiling wayland protocols on linux #119126

Closed
andrewdavidmackenzie opened this issue Dec 19, 2023 · 7 comments · Fixed by #119168
Closed

Nightly compiler error compiling wayland protocols on linux #119126

andrewdavidmackenzie opened this issue Dec 19, 2023 · 7 comments · Fixed by #119168
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@andrewdavidmackenzie
Copy link

andrewdavidmackenzie commented Dec 19, 2023

I have a nightly CI job that has started to fail running clippy, due to a compiler error compiling wayland-protocols.

The dependency chain is down from iced thru "clipboard_wayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5

"clipboard_wayland" 0.2.0 is the latest version on crates.io, but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on crates.io.

Code

wayland-protocols 0.29.5

Meta

rustc --version --verbose:

rustc 1.76.0-nightly (3f28fe133 2023-12-18)
binary: rustc
commit-hash: 3f28fe133475ec5faf3413b556bf3cfb0d51336c
commit-date: 2023-12-18
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.6

Error output

See also: https://github.com/andrewdavidmackenzie/flow/actions/runs/7260567426/job/19779973687

error: internal compiler error: no errors encountered even though `span_delayed_bug` issued
| 
| error: internal compiler error: Trying to feed an already recorded value for query visibility key=DefId(0:6977 ~ wayland_protocols[6542]::unstable::xdg_decoration::v1::generated::client::{use#18}):
|                                 old value: Restricted(DefId(0:0 ~ wayland_protocols[6542]))
|                                 new value: Restricted(DefId(0:6958 ~ wayland_protocols[6542]::unstable::xdg_decoration::v1::generated::client))
|   |
|   = note: delayed at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/compiler/rustc_middle/src/query/mod.rs:2206:1
|              0: <rustc_errors::DiagCtxtInner>::emit_diagnostic_without_consuming
|              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
|              2: <rustc_session::session::Session>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
|              3: <rustc_resolve::Resolver>::feed_visibility
|              4: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              5: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              6: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              7: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|              8: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              9: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|             10: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|             11: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
|             12: <rustc_expand::expand::MacroExpander>::collect_invocations
|             13: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
|             14: <rustc_expand::expand::MacroExpander>::expand_crate
|             15: rustc_interface::passes::resolver_for_lowering
|             16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
|             17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|             18: rustc_query_impl::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
|             19: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
|             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<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#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|             21: <<std::thread::Builder>::spawn_unchecked_<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#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
|             22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             23: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             24: std::sys::unix::thread::Thread::new::thread_start
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/std/src/sys/unix/thread.rs:108:17
|             25: <unknown>
|             26: __clone
|           
| 
| error: internal compiler error: Trying to feed an already recorded value for query visibility key=DefId(0:12939 ~ wayland_protocols[6542]::wlr::unstable::input_inhibitor::v1::generated::client::{use#18}):
|                                 old value: Restricted(DefId(0:0 ~ wayland_protocols[6542]))
|                                 new value: Restricted(DefId(0:12920 ~ wayland_protocols[6542]::wlr::unstable::input_inhibitor::v1::generated::client))
|   |
|   = note: delayed at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/compiler/rustc_middle/src/query/mod.rs:2206:1
|              0: <rustc_errors::DiagCtxtInner>::emit_diagnostic_without_consuming
|              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
|              2: <rustc_session::session::Session>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
|              3: <rustc_resolve::Resolver>::feed_visibility
|              4: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              5: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              6: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              7: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|              8: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              9: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|             10: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|             11: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
|             12: <rustc_expand::expand::MacroExpander>::collect_invocations
|             13: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
|             14: <rustc_expand::expand::MacroExpander>::expand_crate
|             15: rustc_interface::passes::resolver_for_lowering
|             16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
|             17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|             18: rustc_query_impl::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
|             19: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
|             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<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#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|             21: <<std::thread::Builder>::spawn_unchecked_<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#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
|             22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             23: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             24: std::sys::unix::thread::Thread::new::thread_start
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/std/src/sys/unix/thread.rs:108:17
|             25: <unknown>
|             26: __clone
|           
| 
| 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: please attach the file at `/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-protocols-0.29.5/rustc-ice-2023-12-19T17_29_19-7729.txt` to your bug report
| 
| note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C instrument-coverage
| 
| note: some of the compiler flags provided by cargo are hidden
| 
| query stack during panic:
| end of query stack
| error: could not compile `wayland-protocols` (lib)
| warning: build failed, waiting for other jobs to finish...

@andrewdavidmackenzie andrewdavidmackenzie 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 19, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 19, 2023
@danielhjacobs
Copy link

Ruffle is running into this same ICE with wayland-protocols: https://github.com/ruffle-rs/ruffle/actions/runs/7257406349/job/19773470499

@lukas-code
Copy link
Member

minimized:

mod outer {
    mod inner {}
    pub(crate) use inner::{};
}

@sjwang05
Copy link
Contributor

searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19
regressed nightly: nightly-2023-12-19
searched commit range: 6a62871...3f28fe1
regressed commit: 321b656

bisected with cargo-bisect-rustc v0.6.7

Host triple: x86_64-pc-windows-msvc
Reproduce with:

cargo bisect-rustc

#118657

@saethlin saethlin added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 19, 2023
@saethlin saethlin pinned this issue Dec 19, 2023
@lqd
Copy link
Member

lqd commented Dec 19, 2023

cc @petrochenkov for the bisection

@petrochenkov
Copy link
Contributor

petrochenkov commented Dec 20, 2023

@lukas-code
This snippet #119126 (comment) doesn't reproduce the ICE.

Upd: sorry, it does, on 2018+ edition.

@petrochenkov
Copy link
Contributor

Fixed in #119168.

@bors bors closed this as completed in c36bb5d Dec 21, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 21, 2023
Rollup merge of rust-lang#119168 - petrochenkov:feedvis4, r=compiler-errors

resolve: Stop feeding visibilities for import list stems

Fixes rust-lang#119126
@andrewdavidmackenzie
Copy link
Author

After being released to nightly yesterday, things are back to normal and building.
Thanks!

@Noratrieb Noratrieb unpinned this issue Dec 25, 2023
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-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants