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: Encountered error Unimplemented selecting Binder(...) during codegen #69121

Closed
LegNeato opened this issue Feb 13, 2020 · 3 comments · Fixed by #96806
Closed

ICE: Encountered error Unimplemented selecting Binder(...) during codegen #69121

LegNeato opened this issue Feb 13, 2020 · 3 comments · Fixed by #96806
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@LegNeato
Copy link
Contributor

We are newly hitting this with Juniper across all channels and platforms. While there are other issues with similar errors, they either say it only happens with nightly or requires GATs, neither of which are in use here.

mac stable, linux stable

error: internal compiler error: src/librustc/traits/codegen/mod.rs:53: Encountered error `Unimplemented` selecting `Binder(<&dyn tests::model::Human as types::async_await::GraphQLTypeAsync<value::scalar::DefaultScalarValue>>)` during codegen

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:905:9

Code

https://github.com/graphql-rust/juniper/

(sorry, CI passed previously and juniper is big)

Meta

rustc --version --verbose:

  rustc 1.41.0 (5e1a79984 2020-01-27)
  /usr/share/rust/.cargo/bin/cargo -V
  cargo 1.41.0 (626f0f40e 2019-12-03)
  /usr/share/rust/.cargo/bin/rustup -V
  rustup 1.21.1 (7832b2ebe 2019-12-20)

Error output

error: internal compiler error: src/librustc/traits/codegen/mod.rs:53: Encountered error `Unimplemented` selecting `Binder(<&dyn tests::model::Human as types::async_await::GraphQLTypeAsync<value::scalar::DefaultScalarValue>>)` during codegen

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:905:9
Backtrace

stack backtrace:
   0:     0x7fa7c46d8334 - backtrace::backtrace::libunwind::trace::heb43798aede8bd30
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x7fa7c46d8334 - backtrace::backtrace::trace_unsynchronized::had2ba7dec4bd2732
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x7fa7c46d8334 - std::sys_common::backtrace::_print_fmt::hda61f46e822731b2
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x7fa7c46d8334 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfe37fa5de6572965
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x7fa7c471082c - core::fmt::write::h74887d18db27282c
                               at src/libcore/fmt/mod.rs:1025
   5:     0x7fa7c46cc767 - std::io::Write::write_fmt::h6808f3d5eceed5e5
                               at src/libstd/io/mod.rs:1426
   6:     0x7fa7c46dc7de - std::sys_common::backtrace::_print::hcc0fd4b3552039ef
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x7fa7c46dc7de - std::sys_common::backtrace::print::h1c9c5c1c0505592d
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x7fa7c46dc7de - std::panicking::default_hook::{{closure}}::hefb6085c1ab83a59
                               at src/libstd/panicking.rs:193
   9:     0x7fa7c46dc4d1 - std::panicking::default_hook::h1b037d2bf0657ab3
                               at src/libstd/panicking.rs:210
  10:     0x7fa7c4c63da3 - rustc_driver::report_ice::h291d96c9e2421fed
  11:     0x7fa7b2e97108 - <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call::h323099d2a73c6add
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1036
  12:     0x7fa7b2e936d4 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::ha24ac19a9c49fc3e
                              at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libproc_macro/bridge/client.rs:305
  13:     0x7fa7c46dcf90 - std::panicking::rust_panic_with_hook::h787d7f532b084b9a
                               at src/libstd/panicking.rs:475
  14:     0x7fa7c6e4131d - std::panicking::begin_panic::hbf07588df5a435d8
  15:     0x7fa7c6e741b0 - rustc_errors::HandlerInner::bug::h9106a4a32c6aebca
  16:     0x7fa7c6e72eda - rustc_errors::Handler::bug::ha3adcf0d1e898354
  17:     0x7fa7c698aeb2 - rustc::util::bug::opt_span_bug_fmt::{{closure}}::hf2dbb94e1caf11e0
  18:     0x7fa7c6981a93 - rustc::ty::context::tls::with_opt::{{closure}}::h77e81d332b116391
  19:     0x7fa7c69819e8 - rustc::ty::context::tls::with_opt::h98b7d9ea71ef2628
  20:     0x7fa7c698adc8 - rustc::util::bug::opt_span_bug_fmt::h449b5ab685e489af
  21:     0x7fa7c698ad32 - rustc::util::bug::bug_fmt::hd7a0e92aae8f0503
  22:     0x7fa7c6c60f06 - rustc::ty::context::GlobalCtxt::enter_local::h75320721e8f15611
  23:     0x7fa7c689f71d - rustc::traits::codegen::codegen_fulfill_obligation::h7e56543cac918269
  24:     0x7fa7c69ce000 - rustc::ty::query::__query_compute::codegen_fulfill_obligation::h40ad8b8fc83c3c53
  25:     0x7fa7c6c70e1e - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::codegen_fulfill_obligation>::compute::hd0c46bddecfba3dd
  26:     0x7fa7c66b224d - rustc::dep_graph::graph::DepGraph::with_task_impl::h30d17681588a80d6
  27:     0x7fa7c6acfc6b - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h0e85b7fd8a2b75a4
  28:     0x7fa7c6a54c4e - rustc::ty::instance::Instance::resolve::h1c6a3aeadebe47bb
  29:     0x7fa7c5a8c2ce - <rustc_mir::monomorphize::collector::RootCollector as rustc::hir::itemlikevisit::ItemLikeVisitor>::visit_item::h9eb541f6b1282f10
  30:     0x7fa7c5bc0249 - rustc::hir::Crate::visit_all_item_likes::hfca9e4baee1d1fb1
  31:     0x7fa7c5a881d1 - rustc_mir::monomorphize::collector::collect_roots::h5f8832dee1a3b1c8
  32:     0x7fa7c5900604 - rustc::util::common::time::h85cf9eca271e2861
  33:     0x7fa7c5a87b85 - rustc_mir::monomorphize::collector::collect_crate_mono_items::h33d17dfee48a53ab
  34:     0x7fa7c5900391 - rustc::util::common::time::h739d5f2bfd0ef463
35:     0x7fa7c5cb8804 - rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items::h88345ea2cc4b4f83
  36:     0x7fa7c4f74565 - rustc::ty::query::__query_compute::collect_and_partition_mono_items::ha86c5a894568cba4
  37:     0x7fa7c4e61541 - rustc::dep_graph::graph::DepGraph::with_task_impl::h78de7a22e46ee7ee
  38:     0x7fa7c4ecf8b8 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h6a461d7278b0e8aa
  39:     0x7fa7c4f31c24 - rustc_codegen_ssa::base::codegen_crate::ha11b1401122ea73e
  40:     0x7fa7c4f11cee - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate::h4ca5f427c5f93a31
  41:     0x7fa7c4dcca79 - rustc_interface::passes::start_codegen::{{closure}}::hfe69aed584f648ee
  42:     0x7fa7c4dcbf86 - rustc_interface::passes::start_codegen::hec06952a4f85ed2b
  43:     0x7fa7c4d7aeef - rustc::ty::context::tls::enter_global::h606fda582fe5bd72
  44:     0x7fa7c4d299b3 - rustc_interface::queries::Queries::ongoing_codegen::h811aa1430bd7532f
  45:     0x7fa7c4c2a853 - rustc_interface::interface::run_compiler_in_existing_thread_pool::h748d5742f0ee0ec0
  46:     0x7fa7c4bfa922 - std::thread::local::LocalKey<T>::with::h5202d593397bad8e
  47:     0x7fa7c4bf432e - scoped_tls::ScopedKey<T>::set::hd6209c5e8c3d3105
  48:     0x7fa7c4c70344 - syntax::with_globals::hbceb6aa4bd8a40fb
  49:     0x7fa7c4bf4b10 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8147e020da4fdb28
  50:     0x7fa7c46edb2a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  51:     0x7fa7c4c0b359 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h280c79ac2e107446
  52:     0x7fa7c46be76f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7bfd6e98bcf6c67e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  53:     0x7fa7c46ec550 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9979661149bbc525
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  54:     0x7fa7c46ec550 - std::sys_common::thread::start_thread::had0bb4166c065276
                               at src/libstd/sys_common/thread.rs:13
                             at src/libstd/sys_common/thread.rs:13
  55:     0x7fa7c46ec550 - std::sys::unix::thread::Thread::new::thread_start::hbc75223688f972da
                               at src/libstd/sys/unix/thread.rs:80
  56:     0x7fa7c44596db - start_thread
  57:     0x7fa7c3d7688f - __clone
  58:                0x0 - <unknown>

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.0 (5e1a79984 2020-01-27) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -C link-dead-code

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

query stack during panic:
#0 [codegen_fulfill_obligation] checking if `types::async_await::GraphQLTypeAsync` fulfills its obligations
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

@LegNeato LegNeato 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 Feb 13, 2020
@LegNeato LegNeato changed the title Encountered error Unimplemented selecting Binder(...) during codegen ICE: Encountered error Unimplemented selecting Binder(...) during codegen Feb 13, 2020
@jonas-schievink jonas-schievink added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Feb 13, 2020
@KamilaBorowska
Copy link
Contributor

KamilaBorowska commented Feb 17, 2020

I cannot reproduce this (when running tests I get "error[E0432]: unresolved import futures" error), however I want to note that the error message mentions &dyn Human which means it's tests that are failing to compile.

@LegNeato
Copy link
Contributor Author

Weirdly, the same rev is passing on Azure but failing on GitHub Actions

@tesuji
Copy link
Contributor

tesuji commented Aug 27, 2020

Duplicate of #73021 because that issue has MCVE.

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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

Successfully merging a pull request may close this issue.

4 participants