Skip to content

Nightly ICE: no errors encountered even though delay_span_bug issued #101546

Closed
@xd009642

Description

@xd009642

So a hello world-esque warp example now ICEs on nightly rust. I'm not sure if the error is down to the incremental compilation warning or the MIR based error output. The errors are pretty wordy... I've also included the full backtrace

Code

Cargo.toml

[package]
name = "demo"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
http = "0.2.6"
hyper = "0.14.16"
nix = "0.23.1"
test_bin = "0.4.0"
tokio = { version = "1", features = ["full"] }
warp = "0.3"
use warp::Filter;

#[tokio::main]
async fn main() {
    let hello = warp::path("hello")
        .and(warp::get())
        .map(|| String::from("Hello"));

    warp::serve(hello)
        .run(([127, 0, 0, 1], 18080))
        .await;
}

Meta

cargo +nightly --version --verbose:

cargo 1.65.0-nightly (646e9a0b9 2022-09-02)
release: 1.65.0-nightly
commit-hash: 646e9a0b9ea8354cc409d05f10e8dc752c5de78e
commit-date: 2022-09-02
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: Ubuntu 18.04 (bionic) [64-bit]

Error output

warning: Error finalizing incremental compilation session directory `/home/daniel/personal/tarpaulin/tests/data/kill_proc/target/debug/incremental/kill_proc-32bke7lab6pj9/s-gdc5hcdmu7-4e8i7i-working`: No such file or directory (os error 2)

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DropGlue(DefId(2:2767 ~ core[31aa]::ptr::drop_in_place), Some(warp::hyper::server::conn::spawn_all::State<warp::hyper::server::conn::AddrStream, futures_util::future::ready::Ready<std::result::Result<warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, std::convert::Infallible>>, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::conn::spawn_all::NoopWatcher>)) (after pass PhaseChange-Runtime(Optimized)) at bb3[0]:
                                Field projection `((*_1) as Connected).field[0]` specified type `warp::hyper::server::conn::upgrades::UpgradeableConnection<warp::hyper::server::conn::AddrStream, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec>`, but actual type is <warp::hyper::server::conn::spawn_all::NoopWatcher as warp::hyper::server::conn::spawn_all::Watcher<warp::hyper::server::conn::AddrStream, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec>>::Future
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2767 ~ core[31aa]::ptr::drop_in_place), Some(tokio::runtime::task::core::Stage<std::pin::Pin<std::boxed::Box<warp::hyper::server::conn::spawn_all::NewSvcTask<warp::hyper::server::conn::AddrStream, futures_util::future::ready::Ready<std::result::Result<warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, std::convert::Infallible>>, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::conn::spawn_all::NoopWatcher>>>>)) (after pass PhaseChange-Runtime(Optimized)) at bb3[0]:
                                Field projection `((*_1) as Finished).field[0]` specified type `std::result::Result<(), tokio::task::JoinError>`, but actual type is std::result::Result<<std::pin::Pin<std::boxed::Box<warp::hyper::server::conn::spawn_all::NewSvcTask<warp::hyper::server::conn::AddrStream, futures_util::future::ready::Ready<std::result::Result<warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, std::convert::Infallible>>, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::conn::spawn_all::NoopWatcher>>> as warp::Future>::Output, tokio::task::JoinError>
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2767 ~ core[31aa]::ptr::drop_in_place), Some(tokio::runtime::task::core::Stage<warp::hyper::server::conn::spawn_all::NewSvcTask<warp::hyper::server::conn::AddrStream, futures_util::future::ready::Ready<std::result::Result<warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, std::convert::Infallible>>, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::conn::spawn_all::NoopWatcher>>)) (after pass PhaseChange-Runtime(Optimized)) at bb3[0]:
                                Field projection `((*_1) as Finished).field[0]` specified type `std::result::Result<(), tokio::task::JoinError>`, but actual type is std::result::Result<<warp::hyper::server::conn::spawn_all::NewSvcTask<warp::hyper::server::conn::AddrStream, futures_util::future::ready::Ready<std::result::Result<warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, std::convert::Infallible>>, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::path::Exact<warp::path::internal::Opaque<&str>>, warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::get::{closure#0}]>::{closure#0}]>>, [closure@src/main.rs:7:14: 7:16]>>::bind_ephemeral<([u8; 4], u16)>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::conn::spawn_all::NoopWatcher> as warp::Future>::Output, tokio::task::JoinError>
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1494:13
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
   3: core::ptr::drop_in_place::<rustc_session::parse::ParseSess>
   4: <alloc::rc::Rc<rustc_session::session::Session> as core::ops::drop::Drop>::drop
   5: core::ptr::drop_in_place::<rustc_interface::interface::Compiler>
   6: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
   7: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.65.0-nightly (78a891d36 2022-09-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -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
warning: `kill_proc` (bin "kill_proc") generated 1 warning
error: could not compile `kill_proc`; 1 warning emitted
Backtrace

stack backtrace:
   0:     0x7febfa648210 - std::backtrace_rs::backtrace::libunwind::trace::h21646be08690cc40
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7febfa648210 - std::backtrace_rs::backtrace::trace_unsynchronized::h9f1fe42f44553716
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7febfa648210 - std::sys_common::backtrace::_print_fmt::hab0a8a42ed612520
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7febfa648210 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8335f52e54d46ccf
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7febfa6a302e - core::fmt::write::hfcbb54030acb2744
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/core/src/fmt/mod.rs:1202:17
   5:     0x7febfa638cd5 - std::io::Write::write_fmt::hed351c44331cd179
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/io/mod.rs:1679:15
   6:     0x7febfa64ae63 - std::sys_common::backtrace::_print::h40cfc30b9abc5c43
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7febfa64ae63 - std::sys_common::backtrace::print::h9d34bfe87c2cc4a0
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7febfa64ae63 - std::panicking::default_hook::{{closure}}::h7e3919c83aded8ae
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/panicking.rs:295:22
   9:     0x7febfa64ab4f - std::panicking::default_hook::h7f7edfc94586dad5
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/panicking.rs:314:9
  10:     0x7febf900b4e1 - rustc_driver[2795d98b07d801db]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7febfa64b69d - std::panicking::rust_panic_with_hook::h62ce697bbafdcf0b
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/panicking.rs:702:17
  12:     0x7febfa151041 - std[8e0d3d70c3a8d58a]::panicking::begin_panic::<rustc_errors[bdb1f8fbd8907e61]::ExplicitBug>::{closure#0}
  13:     0x7febfa150b96 - std[8e0d3d70c3a8d58a]::sys_common::backtrace::__rust_end_short_backtrace::<std[8e0d3d70c3a8d58a]::panicking::begin_panic<rustc_errors[bdb1f8fbd8907e61]::ExplicitBug>::{closure#0}, !>
  14:     0x7febfa150b56 - std[8e0d3d70c3a8d58a]::panicking::begin_panic::<rustc_errors[bdb1f8fbd8907e61]::ExplicitBug>
  15:     0x7febfa153776 - std[8e0d3d70c3a8d58a]::panic::panic_any::<rustc_errors[bdb1f8fbd8907e61]::ExplicitBug>
  16:     0x7febf8b61cd8 - <rustc_errors[bdb1f8fbd8907e61]::HandlerInner as core[31aaf346d0c050fe]::ops::drop::Drop>::drop
  17:     0x7febf7e05c68 - core[31aaf346d0c050fe]::ptr::drop_in_place::<rustc_session[e3515b6a49b6e8ce]::parse::ParseSess>
  18:     0x7febf7dc3fe8 - <alloc[812cd34b3dffb023]::rc::Rc<rustc_session[e3515b6a49b6e8ce]::session::Session> as core[31aaf346d0c050fe]::ops::drop::Drop>::drop
  19:     0x7febf7dc0f9d - core[31aaf346d0c050fe]::ptr::drop_in_place::<rustc_interface[9bc1f0c6c5e6f2d9]::interface::Compiler>
  20:     0x7febf7dbe7cf - rustc_interface[9bc1f0c6c5e6f2d9]::interface::create_compiler_and_run::<core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>, rustc_driver[2795d98b07d801db]::run_compiler::{closure#1}>
  21:     0x7febf7dbcce1 - <scoped_tls[cfe2a4079d5abda6]::ScopedKey<rustc_span[fcbe8f7b61d422ec]::SessionGlobals>>::set::<rustc_interface[9bc1f0c6c5e6f2d9]::interface::run_compiler<core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>, rustc_driver[2795d98b07d801db]::run_compiler::{closure#1}>::{closure#0}, core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>>
  22:     0x7febf7dbc9cf - std[8e0d3d70c3a8d58a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9bc1f0c6c5e6f2d9]::util::run_in_thread_pool_with_globals<rustc_interface[9bc1f0c6c5e6f2d9]::interface::run_compiler<core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>, rustc_driver[2795d98b07d801db]::run_compiler::{closure#1}>::{closure#0}, core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>>::{closure#0}, core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>>
  23:     0x7febf8e79ba9 - <<std[8e0d3d70c3a8d58a]::thread::Builder>::spawn_unchecked_<rustc_interface[9bc1f0c6c5e6f2d9]::util::run_in_thread_pool_with_globals<rustc_interface[9bc1f0c6c5e6f2d9]::interface::run_compiler<core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>, rustc_driver[2795d98b07d801db]::run_compiler::{closure#1}>::{closure#0}, core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>>::{closure#0}, core[31aaf346d0c050fe]::result::Result<(), rustc_errors[bdb1f8fbd8907e61]::ErrorGuaranteed>>::{closure#1} as core[31aaf346d0c050fe]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7febfa6554f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdf9c758750ff5822
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/alloc/src/boxed.rs:1940:9
  25:     0x7febfa6554f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0f4b4f05b38d1a00
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/alloc/src/boxed.rs:1940:9
  26:     0x7febfa6554f3 - std::sys::unix::thread::Thread::new::thread_start::hfdfaccc5f3b267e1
                               at /rustc/78a891d364a7358ed9eb9c93099ba2f3e6817ca6/library/std/src/sys/unix/thread.rs:108:17
  27:     0x7febf620a6db - start_thread
                               at /build/glibc-CVJwZb/glibc-2.27/nptl/pthread_create.c:463
  28:     0x7febf5f3361f - clone
                               at /build/glibc-CVJwZb/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  29:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions