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 on "computing whether GenFuture<_> is Copy" #95034

Closed
aliemjay opened this issue Mar 17, 2022 · 14 comments
Closed

ICE on "computing whether GenFuture<_> is Copy" #95034

aliemjay opened this issue Mar 17, 2022 · 14 comments
Labels
A-async-await Area: Async & Await A-coroutines Area: Coroutines AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@aliemjay
Copy link
Member

aliemjay commented Mar 17, 2022

Code

use std::{
    future::Future,
    marker::PhantomData,
    pin::Pin,
    task::{Context, Poll},
};

mod object {
    use super::*;

    pub trait Object<'a> {
        type Error;
        type Future: Future<Output = Self>;
        fn create() -> Self::Future;
    }

    impl<'a> Object<'a> for u8 {
        type Error = ();
        type Future = Pin<Box<dyn Future<Output = Self>>>;
        fn create() -> Self::Future {
            unimplemented!()
        }
    }

    impl<'a, E, A: Object<'a, Error = E>> Object<'a> for (A,) {
        type Error = ();
        type Future = CustomFut<'a, E, A>;
        fn create() -> Self::Future {
            unimplemented!()
        }
    }

    pub struct CustomFut<'f, E, A: Object<'f, Error = E>> {
        ph: PhantomData<(A::Future,)>,
    }

    impl<'f, E, A: Object<'f, Error = E>> Future for CustomFut<'f, E, A> {
        type Output = (A,);
        fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Output> {
            unimplemented!()
        }
    }
}

mod async_fn {
    use super::*;

    pub trait AsyncFn {
        type Future: Future<Output = ()>;
        fn call(&self) -> Self::Future;
    }

    impl<F, Fut> AsyncFn for F
    where
        F: Fn() -> Fut,
        Fut: Future<Output = ()>,
    {
        type Future = Fut;
        fn call(&self) -> Self::Future {
            (self)()
        }
    }
}

pub async fn test() {
    use self::{async_fn::AsyncFn, object::Object};

    async fn create<T: Object<'static>>() {
        T::create().await;
    }

    async fn call_async_fn(inner: impl AsyncFn) {
        inner.call().await;
    }

    call_async_fn(create::<(u8,)>).await;
}

Compiled with the command rustc --edition 2021 --crate-type lib repro.rs. Surprisingly, It is not reproducible with --crate-type bin!

With any of the following changes, the code compiles fine:

     impl<'a, E, A: Object<'a, Error = E>> Object<'a> for (A,) {
         type Error = ();
-        type Future = CustomFut<'a, E, A>;
+        type Future = CustomFut<'a, A::Error, A>;
         fn create() -> Self::Future {
             unimplemented!()
         }

or

     pub struct CustomFut<'f, E, A: Object<'f, Error = E>> {
-        ph: PhantomData<(A::Future,)>,
+        ph: PhantomData<(E, A::Future,)>,
     }

Meta

The code compiles fine on v1.55.0. It was reproduced on v1.56.0 up to the current nightly with a similar error output.

Last good nightly: 1.56.0-nightly (b03ccace5 2021-08-24)
Regressed nightly: 1.56.0-nightly (0afc20860 2021-08-25)

rustc --version --verbose:

rustc 1.61.0-nightly (52b34550a 2022-03-15)
binary: rustc
commit-hash: 52b34550aca5f7dd7e152f773e3ab786acb86f6f
commit-date: 2022-03-15
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

Output with backtrace

thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', /cargo/registry/src/github.com-1ecc6299db9ec823/ena-0.14.0/src/snapshot_vec.rs:199:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/52b34550aca5f7dd7e152f773e3ab786acb86f6f/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/52b34550aca5f7dd7e152f773e3ab786acb86f6f/library/core/src/panicking.rs:143:14
   2: core::panicking::panic_bounds_check
             at /rustc/52b34550aca5f7dd7e152f773e3ab786acb86f6f/library/core/src/panicking.rs:84:5
   3: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
   4: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
   5: <&rustc_middle::ty::list::List<rustc_middle::ty::Ty> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_infer::infer::canonical::canonicalizer::Canonicalizer>
   6: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_binder::<&rustc_middle::ty::list::List<rustc_middle::ty::Ty>>
   7: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
   8: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_infer::infer::canonical::canonicalizer::Canonicalizer>
   9: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
  10: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
  11: <&rustc_middle::ty::list::List<rustc_middle::ty::Ty> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_infer::infer::canonical::canonicalizer::Canonicalizer>
  12: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_binder::<&rustc_middle::ty::list::List<rustc_middle::ty::Ty>>
  13: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
  14: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_infer::infer::canonical::canonicalizer::Canonicalizer>
  15: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
  16: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
  17: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_predicate
  18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::predicate_must_hold_modulo_regions
  19: rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions
  20: <rustc_infer::infer::InferCtxtBuilder>::enter::<bool, rustc_ty_utils::common_traits::is_item_raw::{closure#0}>
  21: rustc_ty_utils::common_traits::is_copy_raw
  22: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, bool>>
  23: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::is_copy_raw
  24: <rustc_middle::ty::Ty>::is_copy_modulo_regions
  25: rustc_ty_utils::needs_drop::needs_drop_raw
  26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, bool>>
  27: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::needs_drop_raw
  28: rustc_mir_dataflow::drop_flag_effects::on_all_children_bits::on_all_children_bits::<rustc_mir_dataflow::drop_flag_effects::on_all_drop_children_bits<rustc_mir_transform::elaborate_drops::find_dead_unwinds::{closure#0}>::{closure#0}>
  29: <rustc_mir_transform::elaborate_drops::ElaborateDrops as rustc_middle::mir::MirPass>::run_pass
  30: rustc_mir_transform::pass_manager::run_passes
  31: rustc_mir_transform::mir_drops_elaborated_and_const_checked
  32: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, &rustc_data_structures::steal::Steal<rustc_middle::mir::Body>>>
  33: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_drops_elaborated_and_const_checked
  34: rustc_mir_transform::optimized_mir
  35: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  37: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
  38: rustc_metadata::rmeta::encoder::encode_metadata_impl
  39: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata::rmeta::encoder::EncodedMetadata, ()>
  40: rustc_metadata::rmeta::encoder::encode_metadata
  41: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
  42: <rustc_interface::queries::Queries>::ongoing_codegen
  43: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  44: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  45: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  46: <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.

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.61.0-nightly (52b34550a 2022-03-15) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib

query stack during panic:
#0 [is_copy_raw] computing whether `core::future::from_generator::GenFuture<[static generator@src/lib.rs:72:49: 74:6]>` is `Copy`
#1 [needs_drop_raw] computing whether `core::future::from_generator::GenFuture<[static generator@src/lib.rs:72:49: 74:6]>` needs drop
#2 [mir_drops_elaborated_and_const_checked] elaborating drops for `test::{closure#0}`
#3 [optimized_mir] optimizing MIR for `test::{closure#0}`
end of query stack

@rustbot label A-async-await A-generators regression-from-stable-to-stable

@aliemjay aliemjay 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 Mar 17, 2022
@rustbot rustbot added A-async-await Area: Async & Await A-coroutines Area: Coroutines regression-from-stable-to-stable Performance or correctness regression from one stable version to another. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 17, 2022
@aliemjay aliemjay changed the title ICE on "computing whether CustomFuture is Copy" ICE on "computing whether GenFuture<_> is Copy" Mar 17, 2022
@compiler-errors
Copy link
Member

@rustbot claim

@compiler-errors
Copy link
Member

Wow this ICE is super weird. I believe it has to do something with the Generalizer in rustc_infer, the fact that generator interiors are represented with higher-kinded types, the fact that the E parameter in the example above is bivariant, and the way that universes work.

Gonna keep working on it for a couple of hours, but I think it might be impossible to fix currently. Or at least it requires someone a lot smarter than me.

@aliemjay
Copy link
Member Author

the fact that the E parameter in the example above is bivariant

Is this a thing in current rust? 🤯

Honestly, I was surprised that rustc accepts CustomFut and not complains about unused type params.

trait Tr<A> { type B; type C; }
struct S<A, B, T: Tr<A, B = B>>(<T as Tr<A>>::C);

Does this pattern exist in practice? People would use PhantomData and this should avoid this problem (I hope).

@compiler-errors
Copy link
Member

Is this a thing in current rust?

Yep, see https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_infer/infer/combine.rs.html#506-530. This wf trick just ends up not working for higher-kinded types due to strange caveats...

@compiler-errors
Copy link
Member

Well, either a caveat or just a bug I cannot find.

@compiler-errors
Copy link
Member

I honestly don't think I understand enough about variance and the Generalizer type relation to fix this issue. I think this would technically be solved by lazy projection normalization, since this is due to a inference variable created by normalizing a projection type.

I will at least add a known-bug test for this. Sorry!

@rustbot release-assignment

@aliemjay
Copy link
Member Author

@compiler-errors have you found the exact regressed commit? It would take ages on my potato pc to bisect through commits.

And thanks again for your efforts. Very much appreciated.

@compiler-errors
Copy link
Member

I am pretty certain this is due to #85499

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 22, 2022
@jackh726
Copy link
Member

Uh this is complicated. Just trying to reduce the MCVE a bit. Here are some failed attempts:

However, I did manage to get a more reduced version: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=12b8530b4dc298dcf302f955d82fc0f1

That being said, there is a lot here that has to go perfectly (wrong).

the fact that the E parameter in the example above is bivariant

I suspect that this hints at the root of the problem here. We should not be assigning bivariant to parameters (this happens when rustc "gives up" - and should error out, sooner than where we are getting the ice probably). It's also a bit interesting though that the call through AsyncFn is critical to the repro.

I think this is probably just P-medium. Yes, it's a stable-to-stable regression, but the code here is pretty gnarly. There's a number of changes here that can "fix" the code (and a couple that result an an error - as expected).

@apiraino
Copy link
Contributor

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 24, 2022
@aliemjay
Copy link
Member Author

aliemjay commented Mar 24, 2022

I was able to minimize it further so that CustomFut no longer needs to impl Future nor to be awaited. However, The ICE now happens at codegen with the message assertion failed: !instance.substs.needs_infer(), but can still be fixed by the known workarounds and it regressed in the same nightly version.

I hope the new ICE provides further insight.

(Playgound)

pub trait Object<'a> { // <- can't remove `'a`
    type Error; // <- can't remove because then `E`s are no longer constrained below
    type Future;
}

impl Object<'static> for u8 {
    type Error = ();
    type Future = ();
}

impl<'a, E, A: Object<'a, Error = E>> Object<'a> for (A,) {
    type Error = ();
    type Future = CustomFut<'a, E, A>; // <- Replacing `E` with `A::Error` compiles
}

pub struct CustomFut<'a, E, A: Object<'a, Error = E>> {
    ph: std::marker::PhantomData<(A::Future,)>, // <- adding `E` to the tuple compiles
}

pub trait AsyncFn {
    fn call_async(&self);
}

impl<F: Fn() -> Fut, Fut> AsyncFn for F {
    fn call_async(&self) {}
}

async fn create<T: Object<'static>>() {
    let _fut: T::Future = unimplemented!();
    std::future::ready(()).await; // <- any await point should work
}

pub fn test() {
    let _ = create::<(u8,)>.call_async(); // <- .call_async() is important (can't remove or replace with `(...)()`; so is `(u8,)` (`u8` doesn't work)
}

Error output

Output with backtrace

thread 'rustc' panicked at 'assertion failed: !instance.substs.needs_infer()', compiler/rustc_codegen_llvm/src/mono_item.rs:53:9
stack backtrace:
   0:     0x7f711a89ba9c - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f711a89ba9c - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f711a89ba9c - std::sys_common::backtrace::_print_fmt::hb16700db31584325
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f711a89ba9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f711a8f8fdc - core::fmt::write::h2a1462b5f8eea807
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
   5:     0x7f711a88bc05 - std::io::Write::write_fmt::h71ddfebc68685972
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
   6:     0x7f711a89ef60 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f711a89ef60 - std::sys_common::backtrace::print::h335a66af06738c7c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f711a89ef60 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
   9:     0x7f711a89eb15 - std::panicking::default_hook::h341c1030c6a1161b
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
  10:     0x7f711b11b2b1 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h932547f60770f26a
  11:     0x7f711a89f779 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:628:17
  12:     0x7f711a89f202 - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:519:13
  13:     0x7f711a89bf44 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
  14:     0x7f711a89f199 - rust_begin_unwind
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
  15:     0x7f711a863441 - core::panicking::panic_fmt::h23b9203e89cc61cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
  16:     0x7f711a86338d - core::panicking::panic::h0ba7146865b2f9d6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:50:5
  17:     0x7f711c3655a2 - rustc_codegen_llvm::mono_item::<impl rustc_codegen_ssa::traits::declare::PreDefineMethods for rustc_codegen_llvm::context::CodegenCx>::predefine_fn::h1c521c4ac07b4fbd
  18:     0x7f711c36cf31 - rustc_codegen_llvm::base::compile_codegen_unit::module_codegen::h16153c4046d114f1
  19:     0x7f711cd826a5 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::h789e443a348261c1
  20:     0x7f711cdc67f3 - rustc_codegen_llvm::base::compile_codegen_unit::hab1bf03723596068
  21:     0x7f711cd8dccb - rustc_codegen_ssa::base::codegen_crate::h7a10ba1a5bbbde6f
  22:     0x7f711cdbae7a - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::ha56c5fc04fb5674a
  23:     0x7f711cd2bf7d - rustc_interface::queries::Queries::ongoing_codegen::h11dabf965b22130b
  24:     0x7f711cd009aa - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hf84cd18c24bd5171
  25:     0x7f711ccee0ee - rustc_span::with_source_map::h6ab8a240e103b5b9
  26:     0x7f711cd002ac - scoped_tls::ScopedKey<T>::set::hd1fbd64c6f645895
  27:     0x7f711cceeef5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0a1328c9fa7f7448
  28:     0x7f711cd1a962 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4ea1ced06d6b3e97
  29:     0x7f711a8aa933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7bd677a5dc988be6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691:9
  30:     0x7f711a8aa933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7b1c1ba11c4db785
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691:9
  31:     0x7f711a8aa933 - std::sys::unix::thread::Thread::new::thread_start::h9c58c0d12d84e854
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys/unix/thread.rs:106:17
  32:     0x7f711a6835c2 - start_thread
  33:     0x7f711a708584 - __clone
  34:                0x0 - <unknown>

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.57.0 (f1edd0429 2021-11-29) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib

query stack during panic:
end of query stack

@jackh726
Copy link
Member

Yes, I saw that error in one of my repros above. This is smaller though.

@eholk
Copy link
Contributor

eholk commented Mar 28, 2022

@rustbot label +AsyncAwait-Triaged

@rustbot rustbot added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Mar 28, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 7, 2022
…jackh726

Add known-bug for rust-lang#95034

Couldn't fix the issue, since I am no type theorist and inference variables in universes above U0 scare me. But I at least wanted to add a known-bug test for it.

cc rust-lang#95034 (does not fix)
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 8, 2022
…jackh726

Add known-bug for rust-lang#95034

Couldn't fix the issue, since I am no type theorist and inference variables in universes above U0 scare me. But I at least wanted to add a known-bug test for it.

cc rust-lang#95034 (does not fix)
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 8, 2022
…jackh726

Add known-bug for rust-lang#95034

Couldn't fix the issue, since I am no type theorist and inference variables in universes above U0 scare me. But I at least wanted to add a known-bug test for it.

cc rust-lang#95034 (does not fix)
bors added a commit to rust-lang-ci/rust that referenced this issue Apr 8, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#95102 (Add known-bug for rust-lang#95034)
 - rust-lang#95579 (Add `<[[T; N]]>::flatten{_mut}`)
 - rust-lang#95634 (Mailmap update)
 - rust-lang#95705 (Promote x86_64-unknown-none target to Tier 2 and distribute build artifacts)
 - rust-lang#95761 (Kickstart the inner usage of `macro_metavar_expr`)
 - rust-lang#95782 (Windows: Increase a pipe's buffer capacity to 64kb)
 - rust-lang#95791 (hide an #[allow] directive from the Arc::new_cyclic doc example)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@Alexendoo
Copy link
Member

Fixed by #100980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-coroutines Area: Coroutines AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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

8 participants