rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.41k stars 12.73k forks source link

Internal compiler error when testing zellij #84383

Closed asg0451 closed 3 years ago

asg0451 commented 3 years ago

Code

a fresh clone of https://github.com/zellij-org/zellij/ @ 74cc48fc500f7f81a867394e8d6550562500d14f (sorry)

Error:

on nightly

$ RUST_BACKTRACE=1 cargo t
   Compiling zellij v0.5.0 (/home/miles/git/zellij)
warning: unused import: `utils::consts::ZELLIJ_IPC_PIPE`
  --> src/common/mod.rs:41:5
   |
41 | use utils::consts::ZELLIJ_IPC_PIPE;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(10903399953071403120, 8382375610928995544))`,
 right: `Some(Fingerprint(6856130218266413975, 8643032956190736824))`: found unstable fingerprints for predicates_of(core[ec89]::fmt::Debug): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::fmt::Debug>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:552:1: 552:16 (#0))] }', /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/core/src/panicking.rs:92:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: rustc_query_system::query::plumbing::incremental_verify_ich
   5: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   6: rustc_query_system::query::plumbing::get_query_impl
   7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   8: rustc_trait_selection::traits::wf::WfPredicates::nominal_obligations
   9: rustc_trait_selection::traits::wf::WfPredicates::compute_trait_ref
  10: rustc_trait_selection::traits::wf::trait_obligations
  11: rustc_infer::infer::InferCtxtBuilder::enter
  12: rustc_typeck::check::wfcheck::check_item_well_formed
  13: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  14: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  15: rustc_query_system::query::plumbing::force_query_with_job
  16: rustc_query_system::query::plumbing::get_query_impl
  17: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_item_well_formed
  18: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_item
  19: rustc_data_structures::sync::par_for_each_in
  20: rustc_hir::hir::Crate::par_visit_all_item_likes
  21: rustc_session::session::Session::track_errors
  22: rustc_typeck::check_crate
  23: rustc_interface::passes::analysis
  24: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  25: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  26: rustc_data_structures::stack::ensure_sufficient_stack
  27: rustc_query_system::query::plumbing::force_query_with_job
  28: rustc_query_system::query::plumbing::get_query_impl
  29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  30: rustc_interface::passes::QueryContext::enter
  31: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  32: rustc_span::with_source_map
  33: rustc_interface::interface::create_compiler_and_run
  34: 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.53.0-nightly (6df26f897 2021-04-20) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [predicates_of] computing predicates of `std::fmt::Debug`
#1 [check_item_well_formed] checking that `client::layout::<impl at src/client/layout.rs:170:10: 170:15>` is well-formed
#2 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(2727097316613672502, 1351600337527818324))`,
 right: `Some(Fingerprint(17924628540112108216, 17421394458642266263))`: found unstable fingerprints for predicates_of(core[ec89]::clone::Clone): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::marker::Sized>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/clone.rs:108:18: 108:23 (#0)), (Binder(TraitPredicate(<Self as std::clone::Clone>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/clone.rs:108:1: 108:23 (#0))] }', /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/core/src/panicking.rs:92:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: rustc_query_system::query::plumbing::incremental_verify_ich
   5: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   6: rustc_query_system::query::plumbing::get_query_impl
   7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   8: rustc_trait_selection::traits::wf::WfPredicates::nominal_obligations
   9: rustc_trait_selection::traits::wf::WfPredicates::compute_trait_ref
  10: rustc_trait_selection::traits::wf::trait_obligations
  11: rustc_infer::infer::InferCtxtBuilder::enter
  12: rustc_typeck::check::wfcheck::check_item_well_formed
  13: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  14: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  15: rustc_query_system::query::plumbing::force_query_with_job
  16: rustc_query_system::query::plumbing::get_query_impl
  17: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_item_well_formed
  18: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_item
  19: rustc_data_structures::sync::par_for_each_in
  20: rustc_hir::hir::Crate::par_visit_all_item_likes
  21: rustc_session::session::Session::track_errors
  22: rustc_typeck::check_crate
  23: rustc_interface::passes::analysis
  24: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  25: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  26: rustc_data_structures::stack::ensure_sufficient_stack
  27: rustc_query_system::query::plumbing::force_query_with_job
  28: rustc_query_system::query::plumbing::get_query_impl
  29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  30: rustc_interface::passes::QueryContext::enter
  31: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  32: rustc_span::with_source_map
  33: rustc_interface::interface::create_compiler_and_run
  34: 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.53.0-nightly (6df26f897 2021-04-20) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [predicates_of] computing predicates of `std::clone::Clone`
#1 [check_item_well_formed] checking that `client::layout::<impl at src/client/layout.rs:170:41: 170:46>` is well-formed
#2 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(18061562776985225006, 13058492786662080139))`,
 right: `Some(Fingerprint(12218552171221209013, 11987305896230786357))`: found unstable fingerprints for predicates_of(core[ec89]::marker::Sized): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::marker::Sized>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:92:1: 92:16 (#0))] }', /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/library/core/src/panicking.rs:92:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: rustc_query_system::query::plumbing::incremental_verify_ich
   5: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   6: rustc_query_system::query::plumbing::get_query_impl
   7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   8: rustc_trait_selection::traits::wf::WfPredicates::nominal_obligations
   9: rustc_trait_selection::traits::wf::WfPredicates::compute_trait_ref
  10: rustc_trait_selection::traits::wf::predicate_obligations
  11: rustc_typeck::check::wfcheck::check_where_clauses
  12: rustc_typeck::check::wfcheck::check_fn_or_method
  13: rustc_infer::infer::InferCtxtBuilder::enter
  14: rustc_typeck::check::wfcheck::check_associated_item
  15: rustc_typeck::check::check::check_impl_item_well_formed
  16: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  18: rustc_query_system::query::plumbing::force_query_with_job
  19: rustc_query_system::query::plumbing::get_query_impl
  20: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_impl_item_well_formed
  21: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item
  22: rustc_data_structures::sync::par_for_each_in
  23: rustc_hir::hir::Crate::par_visit_all_item_likes
  24: rustc_session::session::Session::track_errors
  25: rustc_typeck::check_crate
  26: rustc_interface::passes::analysis
  27: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  29: rustc_data_structures::stack::ensure_sufficient_stack
  30: rustc_query_system::query::plumbing::force_query_with_job
  31: rustc_query_system::query::plumbing::get_query_impl
  32: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  33: rustc_interface::passes::QueryContext::enter
  34: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  35: rustc_span::with_source_map
  36: rustc_interface::interface::create_compiler_and_run
  37: 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.53.0-nightly (6df26f897 2021-04-20) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [predicates_of] computing predicates of `std::marker::Sized`
#1 [check_impl_item_well_formed] checking that `client::layout::_::<impl at src/client/layout.rs:170:17: 170:26>::serialize` is well-formed
#2 [analysis] running analysis passes on this crate
end of query stack
warning: 1 warning emitted

error: could not compile `zellij`

To learn more, run the command again with --verbose.

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.53.0-nightly (6df26f897 2021-04-20)
binary: rustc
commit-hash: 6df26f897cffb2d86880544bb451c6b5f8509b2d
commit-date: 2021-04-20
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
<version>

it works on stable:

$ rustc --version --verbose
rustc 1.51.0 (2fd73fabe 2021-03-23)
binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-unknown-linux-gnu
release: 1.51.0
LLVM version: 11.0.1

Ubuntu 20.04

hellow554 commented 3 years ago

Can show your git diff? Because it doesn't panic for me.

asg0451 commented 3 years ago

yeah it was odd... it worked at first, then i added a piece of code, and then it panic'd. then i removed that code, so a clean diff, and then it panic'd every time i ran cargo t thereafter

[frankelbot3:miles|zellij](main)$ git s
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
[frankelbot3:miles|zellij](main)$ cargo t
   Compiling zellij v0.5.0 (/home/miles/git/zellij)
warning: unused import: `utils::consts::ZELLIJ_IPC_PIPE`
  --> src/common/mod.rs:41:5
   |
41 | use utils::consts::ZELLIJ_IPC_PIPE;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: variant is never constructed: `IpcServer`
   --> src/common/errors.rs:144:5
    |
144 |     IpcServer,
    |     ^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: variant is never constructed: `IoPath`
  --> src/common/input/config.rs:35:5
   |
35 |     IoPath(io::Error, PathBuf),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: associated function is never used: `from_yaml`
  --> src/common/input/config.rs:47:12
   |
47 |     pub fn from_yaml(yaml_config: &str) -> ConfigResult {
   |            ^^^^^^^^^

warning: associated function is never used: `new`
  --> src/common/input/config.rs:54:12
   |
54 |     pub fn new(path: &Path) -> ConfigResult {
   |            ^^^

warning: associated function is never used: `from_default_path`
  --> src/common/input/config.rs:68:8
   |
68 |     fn from_default_path() -> ConfigResult {
   |        ^^^^^^^^^^^^^^^^^

warning: function is never used: `no_unbind_unbinds_none`
   --> src/common/input/./unit/keybinds_test.rs:139:4
    |
139 | fn no_unbind_unbinds_none() {
    |    ^^^^^^^^^^^^^^^^^^^^^^

warning: variant is never constructed: `ClosePane`
  --> src/common/screen.rs:47:5
   |
47 |     ClosePane(PaneId),
   |     ^^^^^^^^^^^^^^^^^

warning: variant is never constructed: `Error`
   --> src/common/mod.rs:118:5
    |
118 |     Error(String),
    |     ^^^^^^^^^^^^^

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(2727097316613672502, 1351600337527818324))`,
 right: `Some(Fingerprint(17924628540112108216, 17421394458642266263))`: found unstable fingerprints for predicates_of(core[ec89]::clone::Clone): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::marker::Sized>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/clone.rs:108:18: 108:23 (#0)), (Binder(TraitPredicate(<Self as std::clone::Clone>), []), /home/miles/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/clone.rs:108:1: 108:23 (#0))] }', /rustc/6df26f897cffb2d86880544bb451c6b5f8509b2d/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.53.0-nightly (6df26f897 2021-04-20) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [predicates_of] computing predicates of `std::clone::Clone`
#1 [param_env] computing normalized predicates of `std::clone::Clone`
end of query stack
warning: 9 warnings emitted

error: could not compile `zellij`

To learn more, run the command again with --verbose.
hellow554 commented 3 years ago

That part that you changed is crucial to the panic, so do you remember what you've done? It was my hope that we could see it in the diff.

asg0451 commented 3 years ago

i believe it was just this:

modified   src/client/layout.rs
@@ -176,6 +176,8 @@ pub struct Layout {
     pub split_size: Option<SplitSize>,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub plugin: Option<PathBuf>,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub run: Option<String>,
 }
hellow554 commented 3 years ago

Unfortunately not :/ If you remember what you've done, please post it here... Else there is little chance that this will be solved, but there is a general issue with incremental compiling at this time, so the hope is that this will be addressed soon. In the meantime, you can run cargo clean and you should be able to work normally.

asg0451 commented 3 years ago

Ran cargo clean, and I can run cargo t just fine. I'll file another issue if it happens again, thanks for the help.