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: Broken MIR in DropGlue + no errors even though delay_span_bug issued #101597

Closed
saethlin opened this issue Sep 9, 2022 · 2 comments
Closed
Labels
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

@saethlin
Copy link
Member

saethlin commented Sep 9, 2022

Code

https://crates.io/crates/vujio version 0.1.3
(yes the error says it's from compiling wgpu, but I can't get just that crate to ICE)

Meta

rustc --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: Arch Linux Rolling Release [64-bit]

Error output

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[178b]::ptr::drop_in_place), Some(futures::stream::FuturesOrdered<futures::future::Inspect<backend::native_gpu_future::GpuFuture<std::result::Result<(), BufferAsyncError>>, [closure@/home/ben/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/wgpu-0.6.2/src/util/belt.rs:143:26: 143:34]>>)) (after pass PhaseChange-Runtime(Optimized)) at bb3[0]:
                                Field projection `(*_1).field[1]` specified type `std::collections::BinaryHeap<futures::stream::futures_ordered::OrderWrapper<std::result::Result<(), BufferAsyncError>>>`, but actual type is std::collections::BinaryHeap<futures::stream::futures_ordered::OrderWrapper<<futures::future::Inspect<backend::native_gpu_future::GpuFuture<std::result::Result<(), BufferAsyncError>>, [closure@/home/ben/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/wgpu-0.6.2/src/util/belt.rs:143:26: 143:34]> as futures::Future>::Output>>
   --> /home/ben/.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:128:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2767 ~ core[178b]::ptr::drop_in_place), Some(futures::stream::FuturesOrdered<futures::future::Inspect<backend::native_gpu_future::GpuFuture<std::result::Result<(), BufferAsyncError>>, [closure@/home/ben/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/wgpu-0.6.2/src/util/belt.rs:143:26: 143:34]>>)) (after pass PhaseChange-Runtime(Optimized)) at bb4[0]:
                                Field projection `(*_1).field[1]` specified type `std::collections::BinaryHeap<futures::stream::futures_ordered::OrderWrapper<std::result::Result<(), BufferAsyncError>>>`, but actual type is std::collections::BinaryHeap<futures::stream::futures_ordered::OrderWrapper<<futures::future::Inspect<backend::native_gpu_future::GpuFuture<std::result::Result<(), BufferAsyncError>>, [closure@/home/ben/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/wgpu-0.6.2/src/util/belt.rs:143:26: 143:34]> as futures::Future>::Output>>
   --> /home/ben/.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:128:36

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1494:13
Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1494:13
stack backtrace:
   0:     0x7f0a5439f210 - std::backtrace_rs::backtrace::libunwind::trace::hddd5e6b1b5e0cf84
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f0a5439f210 - std::backtrace_rs::backtrace::trace_unsynchronized::h1e30619f2b1dfc7e
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f0a5439f210 - std::sys_common::backtrace::_print_fmt::h1c57dbed6b9e39aa
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f0a5439f210 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h81e97128ef1d32f9
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f0a543fa02e - core::fmt::write::h05bb200d128bd301
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/core/src/fmt/mod.rs:1202:17
   5:     0x7f0a5438fcd5 - std::io::Write::write_fmt::hc8d8769ac02ad98c
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/io/mod.rs:1679:15
   6:     0x7f0a543a1e63 - std::sys_common::backtrace::_print::h7f10095fdc95f046
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f0a543a1e63 - std::sys_common::backtrace::print::hff7966088cd7ef66
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f0a543a1e63 - std::panicking::default_hook::{{closure}}::h5cfa206e6d48c088
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/panicking.rs:295:22
   9:     0x7f0a543a1b4f - std::panicking::default_hook::h75a6d8252dff2ced
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/panicking.rs:314:9
  10:     0x7f0a52dec9d1 - rustc_driver[4dbe72ff95e91a37]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f0a543a269d - std::panicking::rust_panic_with_hook::h119231c709fbe31a
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/panicking.rs:702:17
  12:     0x7f0a53f33221 - std[229541c32b9def22]::panicking::begin_panic::<rustc_errors[5d6420c66e5c3514]::ExplicitBug>::{closure#0}
  13:     0x7f0a53f32d76 - std[229541c32b9def22]::sys_common::backtrace::__rust_end_short_backtrace::<std[229541c32b9def22]::panicking::begin_panic<rustc_errors[5d6420c66e5c3514]::ExplicitBug>::{closure#0}, !>
  14:     0x7f0a53f32d36 - std[229541c32b9def22]::panicking::begin_panic::<rustc_errors[5d6420c66e5c3514]::ExplicitBug>
  15:     0x7f0a53f358d6 - std[229541c32b9def22]::panic::panic_any::<rustc_errors[5d6420c66e5c3514]::ExplicitBug>
  16:     0x7f0a52945f68 - <rustc_errors[5d6420c66e5c3514]::HandlerInner as core[178bf54443111ecd]::ops::drop::Drop>::drop
  17:     0x7f0a51bf4bd8 - core[178bf54443111ecd]::ptr::drop_in_place::<rustc_session[54b7ccc2eea64ffd]::parse::ParseSess>
  18:     0x7f0a51bb2f58 - <alloc[aa703239628d5152]::rc::Rc<rustc_session[54b7ccc2eea64ffd]::session::Session> as core[178bf54443111ecd]::ops::drop::Drop>::drop
  19:     0x7f0a51baff0d - core[178bf54443111ecd]::ptr::drop_in_place::<rustc_interface[14c34b33c6f785f8]::interface::Compiler>
  20:     0x7f0a51bad73f - rustc_interface[14c34b33c6f785f8]::interface::create_compiler_and_run::<core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>, rustc_driver[4dbe72ff95e91a37]::run_compiler::{closure#1}>
  21:     0x7f0a51babc51 - <scoped_tls[c74ddbab68ad7cb1]::ScopedKey<rustc_span[ddb8e6977b977c82]::SessionGlobals>>::set::<rustc_interface[14c34b33c6f785f8]::interface::run_compiler<core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>, rustc_driver[4dbe72ff95e91a37]::run_compiler::{closure#1}>::{closure#0}, core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>>
  22:     0x7f0a51bab93f - std[229541c32b9def22]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[14c34b33c6f785f8]::util::run_in_thread_pool_with_globals<rustc_interface[14c34b33c6f785f8]::interface::run_compiler<core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>, rustc_driver[4dbe72ff95e91a37]::run_compiler::{closure#1}>::{closure#0}, core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>>::{closure#0}, core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>>
  23:     0x7f0a52c613b9 - <<std[229541c32b9def22]::thread::Builder>::spawn_unchecked_<rustc_interface[14c34b33c6f785f8]::util::run_in_thread_pool_with_globals<rustc_interface[14c34b33c6f785f8]::interface::run_compiler<core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>, rustc_driver[4dbe72ff95e91a37]::run_compiler::{closure#1}>::{closure#0}, core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>>::{closure#0}, core[178bf54443111ecd]::result::Result<(), rustc_errors[5d6420c66e5c3514]::ErrorGuaranteed>>::{closure#1} as core[178bf54443111ecd]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7f0a543ac4f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h36c6bf5e47e96783
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/alloc/src/boxed.rs:1940:9
  25:     0x7f0a543ac4f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h145bc1ef077d35d5
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/alloc/src/boxed.rs:1940:9
  26:     0x7f0a543ac4f3 - std::sys::unix::thread::Thread::new::thread_start::h9922d7fa7807ef1d
                               at /rustc/c2804e6ec2c29a5c7368600ea173b890e2655c3d/library/std/src/sys/unix/thread.rs:108:17
  27:     0x7f0a5048478d - <unknown>
  28:     0x7f0a505058e4 - clone
  29:                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 (c2804e6ec 2022-09-07) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C link-arg=-fuse-ld=mold

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

query stack during panic:
end of query stack
error: could not compile `wgpu`

@saethlin saethlin 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 9, 2022
@saethlin
Copy link
Member Author

saethlin commented Sep 9, 2022

Oops this might be a duplicate of #101548, I'll keep an eye out to see if it is fixed by #101437

@saethlin
Copy link
Member Author

saethlin commented Sep 9, 2022

Yes, this is fixed.

@saethlin saethlin closed this as completed Sep 9, 2022
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. 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

1 participant