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

rustc nightly(289279de1 2022-09-04) ICE for tokio+warp #101430

Closed
kurikomoe opened this issue Sep 5, 2022 · 2 comments
Closed

rustc nightly(289279de1 2022-09-04) ICE for tokio+warp #101430

kurikomoe opened this issue Sep 5, 2022 · 2 comments
Assignees
Labels
-Zvalidate-mir Unstable option: MIR validation 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.

Comments

@kurikomoe
Copy link

kurikomoe commented Sep 5, 2022

Code

use std::{net::SocketAddr, str::FromStr};
use warp::Filter;

#[tokio::main(flavor="current_thread")]
async fn main() {
    let routes = warp::any().and(warp::method()).map(|_| "Bad!");

    warp::serve(routes)
        .run(SocketAddr::from_str("0.0.0.0:1235").unwrap())
        .await;
}

Meta

rustc --version --verbose:

rustc 1.65.0-nightly (289279de1 2022-09-04)
binary: rustc
commit-hash: 289279de116707f28cf9c18e4bbb8c6ec84ad75b
commit-date: 2022-09-04
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0

Error output

warning: Error finalizing incremental compilation session directory `/tmp/tt/target/debug/incremental/tt-1sm7b9is0mgyd/s-gd96hsttt7-8esluo-working`: No such file or directory (os error 2)

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

[Too long omitted]

More output in details.

Backtrace

 ➜  tt (master) ✗ rm target -rf                                                                                                  
 ➜  tt (master) ✗ cargo clean                                                                                                   
 ➜  tt (master) ✗ RUST_BACKTRACE=full cargo build                                                           
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling libc v0.2.132
   Compiling proc-macro2 v1.0.43
   Compiling autocfg v1.1.0
   Compiling unicode-ident v1.0.3
   Compiling quote v1.0.21
   Compiling syn v1.0.99
   Compiling log v0.4.17
   Compiling typenum v1.15.0
   Compiling bytes v1.2.1
   Compiling memchr v2.5.0
   Compiling futures-core v0.3.24
   Compiling pin-project-lite v0.2.9
   Compiling itoa v1.0.3
   Compiling once_cell v1.14.0
   Compiling fnv v1.0.7
   Compiling futures-sink v0.3.24
   Compiling tinyvec_macros v0.1.0
   Compiling futures-task v0.3.24
   Compiling matches v0.1.9
   Compiling httparse v1.8.0
   Compiling futures-util v0.3.24
   Compiling ppv-lite86 v0.2.16
   Compiling cpufeatures v0.2.5
   Compiling percent-encoding v2.1.0
   Compiling pin-utils v0.1.0
   Compiling serde v1.0.144
   Compiling unicode-bidi v0.3.8
   Compiling mime v0.3.16
   Compiling futures-channel v0.3.24
   Compiling base64 v0.13.0
   Compiling hashbrown v0.12.3
   Compiling opaque-debug v0.3.0
   Compiling fastrand v1.8.0
   Compiling httpdate v1.0.2
   Compiling remove_dir_all v0.5.3
   Compiling try-lock v0.2.3
   Compiling safemem v0.3.3
   Compiling ryu v1.0.11
   Compiling byteorder v1.4.3
   Compiling serde_json v1.0.85
   Compiling utf-8 v0.7.6
   Compiling bitflags v1.3.2
   Compiling quick-error v1.2.3
   Compiling tower-service v0.3.2
   Compiling scoped-tls v1.0.0
   Compiling tinyvec v1.6.0
   Compiling form_urlencoded v1.0.1
   Compiling tracing-core v0.1.29
   Compiling http v0.2.8
   Compiling generic-array v0.14.6
   Compiling unicase v2.6.0
   Compiling tokio v1.21.0
   Compiling slab v0.4.7
   Compiling indexmap v1.9.1
   Compiling want v0.3.0
   Compiling tracing v0.1.36
   Compiling twoway v0.1.8
   Compiling buf_redux v0.8.4
   Compiling mime_guess v2.0.4
   Compiling mio v0.8.4
   Compiling socket2 v0.4.7
   Compiling getrandom v0.2.7
   Compiling tempfile v3.3.0
   Compiling unicode-normalization v0.1.21
   Compiling headers-core v0.2.0
   Compiling http-body v0.4.5
   Compiling rand_core v0.6.3
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling idna v0.2.3
   Compiling block-buffer v0.9.0
   Compiling block-buffer v0.10.3
   Compiling crypto-common v0.1.6
   Compiling digest v0.9.0
   Compiling digest v0.10.3
   Compiling sha-1 v0.9.8
   Compiling url v2.2.2
   Compiling sha1 v0.10.4
   Compiling headers v0.3.8
   Compiling multipart v0.18.0
   Compiling serde_urlencoded v0.7.1
   Compiling tokio-macros v1.8.0
   Compiling thiserror-impl v1.0.34
   Compiling pin-project-internal v1.0.12
   Compiling pin-project v1.0.12
   Compiling thiserror v1.0.34
   Compiling tungstenite v0.14.0
   Compiling tokio-util v0.7.3
   Compiling tokio-stream v0.1.9
   Compiling tokio-util v0.6.10
   Compiling tokio-tungstenite v0.15.0
   Compiling h2 v0.3.14
   Compiling hyper v0.14.20
   Compiling warp v0.3.2
   Compiling tt v0.1.0 (/tmp/tt)
warning: Error finalizing incremental compilation session directory `/tmp/tt/target/debug/incremental/tt-1sm7b9is0mgyd/s-gd96hsttt7-8esluo-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:2776 ~ core[78f6]::ptr::drop_in_place), Some(warp::hyper::server::server::new_svc::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::server::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec>`, but actual type is <warp::hyper::server::server::NoopWatcher as warp::hyper::server::server::Watcher<warp::hyper::server::conn::AddrStream, warp::hyper::service::util::ServiceFn<[closure@warp::Server<warp::filter::map::Map<warp::filter::and::And<warp::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec>>::Future
   --> /home/kuriko/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:487:1
    |
487 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2776 ~ core[78f6]::ptr::drop_in_place), Some(tokio::runtime::task::core::Stage<std::pin::Pin<std::boxed::Box<warp::hyper::server::server::new_svc::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::server::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::server::new_svc::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::server::NoopWatcher>>> as warp::Future>::Output, tokio::task::JoinError>
   --> /home/kuriko/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:487:1
    |
487 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2776 ~ core[78f6]::ptr::drop_in_place), Some(tokio::runtime::task::core::Stage<warp::hyper::server::server::new_svc::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::server::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::server::new_svc::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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{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::filters::any::Any, warp::filter::FilterFn<[closure@warp::filter::filter_fn_one<[closure@warp::method::{closure#0}], futures_util::future::ready::Ready<std::result::Result<warp::http::Method, std::convert::Infallible>>>::{closure#0}]>>, [closure@src/main.rs:6:54: 6:57]>>::bind_ephemeral<std::net::SocketAddr>::{closure#1}::{closure#0}::{closure#0}], warp::hyper::Body>, warp::hyper::common::exec::Exec, warp::hyper::server::server::NoopWatcher> as warp::Future>::Output, tokio::task::JoinError>
   --> /home/kuriko/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:487:1
    |
487 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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:1499:13
stack backtrace:
   0:     0x7f9dca36e550 - std::backtrace_rs::backtrace::libunwind::trace::h45c0d8f2a3efd3fc
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f9dca36e550 - std::backtrace_rs::backtrace::trace_unsynchronized::h1af898a7be122d7c
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9dca36e550 - std::sys_common::backtrace::_print_fmt::h12b8e189b53007a3
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f9dca36e550 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h19fdde6125f880f1
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f9dca3c93ae - core::fmt::write::h87d76462b828a5e9
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/core/src/fmt/mod.rs:1202:17
   5:     0x7f9dca35f025 - std::io::Write::write_fmt::h79f438822fd229a7
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/io/mod.rs:1679:15
   6:     0x7f9dca3711e3 - std::sys_common::backtrace::_print::hcf51bd38c78b3489
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f9dca3711e3 - std::sys_common::backtrace::print::h7a7876706a338e2d
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f9dca3711e3 - std::panicking::default_hook::{{closure}}::hf0aac8164135f1e4
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/panicking.rs:295:22
   9:     0x7f9dca370ecf - std::panicking::default_hook::h091bc9fde9243abc
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/panicking.rs:314:9
  10:     0x7f9dccc114f1 - rustc_driver[ba0efae8ac9b0cb4]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f9dca371a1d - std::panicking::rust_panic_with_hook::h41b91ebde4ccdd6b
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/panicking.rs:702:17
  12:     0x7f9dcdd07621 - std[d0f8dfc92007bd40]::panicking::begin_panic::<rustc_errors[7a3a423a600a9a62]::ExplicitBug>::{closure#0}
  13:     0x7f9dcdd06226 - std[d0f8dfc92007bd40]::sys_common::backtrace::__rust_end_short_backtrace::<std[d0f8dfc92007bd40]::panicking::begin_panic<rustc_errors[7a3a423a600a9a62]::ExplicitBug>::{closure#0}, !>
  14:     0x7f9dcdd00dc6 - std[d0f8dfc92007bd40]::panicking::begin_panic::<rustc_errors[7a3a423a600a9a62]::ExplicitBug>
  15:     0x7f9dcdd03806 - std[d0f8dfc92007bd40]::panic::panic_any::<rustc_errors[7a3a423a600a9a62]::ExplicitBug>
  16:     0x7f9dcc713788 - <rustc_errors[7a3a423a600a9a62]::HandlerInner as core[78f6cf7786ffa570]::ops::drop::Drop>::drop
  17:     0x7f9dcba58128 - core[78f6cf7786ffa570]::ptr::drop_in_place::<rustc_session[8778dd42c9811aa]::parse::ParseSess>
  18:     0x7f9dcba12228 - <alloc[aee8757f0a292e1e]::rc::Rc<rustc_session[8778dd42c9811aa]::session::Session> as core[78f6cf7786ffa570]::ops::drop::Drop>::drop
  19:     0x7f9dcba115dd - core[78f6cf7786ffa570]::ptr::drop_in_place::<rustc_interface[474016745a1528b5]::interface::Compiler>
  20:     0x7f9dcba10d59 - rustc_span[34c928a1a80ed6f2]::with_source_map::<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_interface[474016745a1528b5]::interface::create_compiler_and_run<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_driver[ba0efae8ac9b0cb4]::run_compiler::{closure#1}>::{closure#1}>
  21:     0x7f9dcba10592 - rustc_interface[474016745a1528b5]::interface::create_compiler_and_run::<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_driver[ba0efae8ac9b0cb4]::run_compiler::{closure#1}>
  22:     0x7f9dcba0f1e1 - <scoped_tls[77b2f8af8fdae259]::ScopedKey<rustc_span[34c928a1a80ed6f2]::SessionGlobals>>::set::<rustc_interface[474016745a1528b5]::interface::run_compiler<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_driver[ba0efae8ac9b0cb4]::run_compiler::{closure#1}>::{closure#0}, core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>>
  23:     0x7f9dcba0eecf - std[d0f8dfc92007bd40]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[474016745a1528b5]::util::run_in_thread_pool_with_globals<rustc_interface[474016745a1528b5]::interface::run_compiler<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_driver[ba0efae8ac9b0cb4]::run_compiler::{closure#1}>::{closure#0}, core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>>::{closure#0}, core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>>
  24:     0x7f9dcca28609 - <<std[d0f8dfc92007bd40]::thread::Builder>::spawn_unchecked_<rustc_interface[474016745a1528b5]::util::run_in_thread_pool_with_globals<rustc_interface[474016745a1528b5]::interface::run_compiler<core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>, rustc_driver[ba0efae8ac9b0cb4]::run_compiler::{closure#1}>::{closure#0}, core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>>::{closure#0}, core[78f6cf7786ffa570]::result::Result<(), rustc_errors[7a3a423a600a9a62]::ErrorGuaranteed>>::{closure#1} as core[78f6cf7786ffa570]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7f9dca37b873 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::heb3010a7b6c46c17
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/alloc/src/boxed.rs:1940:9
  26:     0x7f9dca37b873 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3026e81a22e09adb
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/alloc/src/boxed.rs:1940:9
  27:     0x7f9dca37b873 - std::sys::unix::thread::Thread::new::thread_start::h411b8aa6ee1c0765
                               at /rustc/289279de116707f28cf9c18e4bbb8c6ec84ad75b/library/std/src/sys/unix/thread.rs:108:17
  28:     0x7f9dca11d78d - <unknown>
  29:     0x7f9dca19e8e4 - clone
  30:                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.65.0-nightly (289279de1 2022-09-04) 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: `tt` (bin "tt") generated 1 warning
error: could not compile `tt`; 1 warning emitted

Cargo.toml

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

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

[dependencies]
tokio = { version = "1.21.0", features = ["macros"] }
warp = "0.3.2"

I reproduced this on my Manjaro Amd 5900x PC as well as centos 7 Intel(R) Xeon(R) Gold 6230 CPU server

stable rustc is ok

rustc 1.63.0 (4b91a6ea7 2022-08-08)
binary: rustc
commit-hash: 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f
commit-date: 2022-08-08
host: x86_64-unknown-linux-gnu
release: 1.63.0
LLVM version: 14.0.5
@kurikomoe kurikomoe 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 Sep 5, 2022
@compiler-errors compiler-errors self-assigned this Sep 5, 2022
@steffahn
Copy link
Member

steffahn commented Sep 5, 2022

@rustbot label A-incr-comp

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label Sep 5, 2022
@cjgillot cjgillot added -Zvalidate-mir Unstable option: MIR validation and removed A-incr-comp Area: Incremental compilation labels Sep 5, 2022
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 8, 2022
…ring, r=tmandry

Normalize before erasing late-bound regions in `equal_up_to_regions`

Normalize erasing regions **first**, before passing the type through a `BottomUpFolder` which erases late-bound regions too.

The root cause of this issue is due to 96d4137, which removes a `normalize_erasing_regions` that happens before this call to `equal_up_to_regions`. While reverting that commit might be a fix, I think it was suspicious to be erasing late-bound regions first _then_ normalizing types in the first place in `equal_up_to_regions`.

-----

I am tempted to ask the reviewer to review and `r+` this without a UI test, since the existing issues that I think this fixes are all incredibly difficult to minimize (anything hyper/warp related, given the nature of those libraries 😓) or impossible to reproduce locally (the miri test), namely:
* This recently reported issue with tokio + warp: rust-lang#101430
* This issue from `@RalfJung` about Miri being broken: rust-lang#101344
* This additional issue reported in a comment by `@tmandry` (issue with fuchsia + hyper): rust-lang#101344 (comment)

I have locally verified that the repro in rust-lang#101430 is fixed with this PR, but after a couple of hours of attempting to minimize this error and either failing to actually repro the ICE, or being overwhelmed with the number of traits and functions I need to inline into a UI test, I have basically given up. Thoughts are appreciated on how best to handle this.

r? `@oli-obk` who is at the intersection of MIR and types-related stuff who may be able to give advice 😅
@kurikomoe
Copy link
Author

The issue is fixed.

rustc 1.65.0-nightly (1d37ed661 2022-09-09)
binary: rustc
commit-hash: 1d37ed661a6922e7a167609b8cd7eb31e972b19b
commit-date: 2022-09-09
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zvalidate-mir Unstable option: MIR validation 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.
Projects
None yet
Development

No branches or pull requests

5 participants