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 with cargo-miri: vtable not supported on type std::pin::Pin<&mut dyn futures::Future<Output = std::result::Result<... #78820

Closed
MikailBag opened this issue Nov 6, 2020 · 2 comments
Labels
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

@MikailBag
Copy link
Contributor

MikailBag commented Nov 6, 2020

Source

I partially reduced the codebase: I was able to delete all not tokio::sync::mpsc-related staff.
https://github.com/MikailBag/tokio/tree/ice

Command

cargo miri test -p tokio-util

Full error text

error: internal compiler error: /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/compiler/rustc_mir/src/interpret/place.rs:224:18: vtable not supported on type std::pin::Pin<&mut dyn futures::Future<Output = std::result::Result<tokio::sync::mpsc::Permit<std::string::String>, tokio::sync::mpsc::error::SendError<()>>>>

Backtrace

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:945:9
stack backtrace:
   0:     0x7f1df5c40a20 - std::backtrace_rs::backtrace::libunwind::trace::h303a626d53553a64
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
   1:     0x7f1df5c40a20 - std::backtrace_rs::backtrace::trace_unsynchronized::h6abb882733c3f18c
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1df5c40a20 - std::sys_common::backtrace::_print_fmt::h57829321f1d9217a
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f1df5c40a20 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h400b66a054640aac
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f1df5cafe9c - core::fmt::write::h1857a60b204f1b6a
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/core/src/fmt/mod.rs:1076:17
   5:     0x7f1df5c32642 - std::io::Write::write_fmt::h6453b28c8b27c6ea
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/io/mod.rs:1516:15
   6:     0x7f1df5c459d5 - std::sys_common::backtrace::_print::h15cc4b3923cc9bc0
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f1df5c459d5 - std::sys_common::backtrace::print::h953c7be178c0674d
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f1df5c459d5 - std::panicking::default_hook::{{closure}}::h635d667f571198f0
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/panicking.rs:208:50
   9:     0x7f1df5c45678 - std::panicking::default_hook::h3bc2efb48060abaa
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/panicking.rs:227:9
  10:     0x7f1df650e618 - rustc_driver::report_ice::hbf1325c7565687ba
  11:     0x7f1df5c46216 - std::panicking::rust_panic_with_hook::h887eb0c89f46b8b2
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/panicking.rs:581:17
  12:     0x7f1df94baa2d - std::panicking::begin_panic::{{closure}}::hc1d905d2374ce0cc
  13:     0x7f1df94ba936 - std::sys_common::backtrace::__rust_end_short_backtrace::ha1feaa73cb1e05ce
  14:     0x7f1df94ba99f - std::panicking::begin_panic::h09616460625efa25
  15:     0x7f1df94f1380 - rustc_errors::HandlerInner::bug::hbb6554bd4fbc8852
  16:     0x7f1df94efe60 - rustc_errors::Handler::bug::h4feefeec7bb726ca
  17:     0x7f1df8f61bc4 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h22b92ed7b73b8340
  18:     0x7f1df8f5ae0b - rustc_middle::ty::context::tls::with_opt::{{closure}}::h32bfd9cf0b0a9393
  19:     0x7f1df8f5adb2 - rustc_middle::ty::context::tls::with_opt::h762464f893de2d96
  20:     0x7f1df8f61ae9 - rustc_middle::util::bug::opt_span_bug_fmt::h05648c19bbf99518
  21:     0x7f1df8f61a5e - rustc_middle::util::bug::bug_fmt::h5d4f7ed12a8f1d0d
  22:     0x560054028180 - rustc_mir::interpret::terminator::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_fn_call::hc90b4c2ac00f799c
  23:     0x56005403c2d5 - rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::terminator::h502bf9e09df16a8c
  24:     0x560053f378b7 - miri::eval::eval_main::h49029ec68dde781d
  25:     0x560053e65169 - rustc_interface::passes::QueryContext::enter::h9abc318ed7891ffc
  26:     0x560053e5ec33 - <miri::MiriCompilerCalls as rustc_driver::Callbacks>::after_analysis::h61bd73feff3da747
  27:     0x7f1df65294d7 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h6eb07f11eba80bd6
  28:     0x7f1df64f02a2 - rustc_span::with_source_map::h3820d41b3a036910
  29:     0x7f1df652a9c2 - rustc_interface::interface::create_compiler_and_run::h08ad396f4e7721e0
  30:     0x7f1df6512d5a - scoped_tls::ScopedKey<T>::set::hd425a36fbe06985e
  31:     0x7f1df652f9b5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h23925571219dbc63
  32:     0x7f1df64ad3ce - core::ops::function::FnOnce::call_once{{vtable.shim}}::h43b61b9af30b3669
  33:     0x7f1df5c5521a - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h88864ee659ddb161
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/alloc/src/boxed.rs:1042:9
  34:     0x7f1df5c5521a - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9f03cbdc7ab33431
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/alloc/src/boxed.rs:1042:9
  35:     0x7f1df5c5521a - std::sys::unix::thread::Thread::new::thread_start::h5979dd5560a11418
                               at /rustc/ffa2e7ae8fbf9badc035740db949b9dae271c29f/library/std/src/sys/unix/thread.rs:89:17
  36:     0x7f1df5b4a609 - start_thread
  37:     0x7f1df5920293 - clone
  38:                0x0 - <unknown>

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.49.0-nightly (ffa2e7ae8 2020-10-24) 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:
end of query stack
@MikailBag MikailBag changed the title ICE: vtable not supported on type std::pin::Pin<&mut dyn futures::Future<Output = std::result::Result<... ICE with cargo-miri: vtable not supported on type std::pin::Pin<&mut dyn futures::Future<Output = std::result::Result<... Nov 6, 2020
@taiki-e
Copy link
Member

taiki-e commented Nov 6, 2020

I think this is a duplicate of rust-lang/miri#1038.

@jyn514 jyn514 added 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 Nov 6, 2020
@RalfJung
Copy link
Member

I think this is a duplicate of rust-lang/miri#1038

Indeed. And that issue is, at least according to @eddyb, blocked on #56166. I do not have a good understanding of what it takes to fix this, more research is needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

4 participants