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

miri no longer builds after rust-lang/rust#101333 #101344

Closed
rust-highfive opened this issue Sep 2, 2022 · 13 comments · Fixed by #101522
Closed

miri no longer builds after rust-lang/rust#101333 #101344

rust-highfive opened this issue Sep 2, 2022 · 13 comments · Fixed by #101522
Assignees
Labels
A-miri Area: The miri tool C-bug Category: This is a bug.

Comments

@rust-highfive
Copy link
Collaborator

Hello, this is your friendly neighborhood mergebot.
After merging PR #101333, I observed that the tool miri has failing tests.
A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout.

cc @matthiaskrgr, do you think you would have time to do the follow-up work?
If so, that would be great!

@rust-highfive rust-highfive added A-miri Area: The miri tool C-bug Category: This is a bug. labels Sep 2, 2022
@RalfJung
Copy link
Member

RalfJung commented Sep 2, 2022

Ah damn it, we keep getting broken so there's still no nightly with Miri. :(

@RalfJung
Copy link
Member

RalfJung commented Sep 2, 2022

Building std now ICEs on windows...?

thread 'rustc' panicked at 'range start index 1 out of range for slice of length 0', library\core\src\slice\index.rs:52:5
stack backtrace:
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.65.0-nightly (9ba169a73 2022-09-02) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type dylib --crate-type rlib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=on -C debug-assertions=off -C overflow-checks=on -Z force-unstable-if-unmarked -Z tls-model=initial-exec

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

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `sys::windows::fs::<impl at D:\a\rust\rust\library\std\src\sys\windows\fs.rs:278:1: 278:10>::file_attr`
#1 [optimized_mir] optimizing MIR for `sys::windows::fs::<impl at D:\a\rust\rust\library\std\src\sys\windows\fs.rs:278:1: 278:10>::file_attr`
end of query stack
[RUSTC-TIMING] std test:false 5.705
error: could not compile `std`

The same target works fine on my system, so it is host-specific. Sounds like one of the PRs in that rollup is buggy...

@compiler-errors
Copy link
Member

@RalfJung do you have a stack trace for that ICE?

@RalfJung
Copy link
Member

RalfJung commented Sep 2, 2022

Nope, I cannot reproduce so all we got is the log from CI. The ICE is here.

@RalfJung
Copy link
Member

RalfJung commented Sep 2, 2022

Miri CI cannot reproduce either, not even in a Windows host. It's a 32bit host though.

Would be great if someone with an x86_64 windows host could try to clone the Miri repo and do ./rustup-toolchain HEAD && ./miri test.

@tmandry
Copy link
Member

tmandry commented Sep 2, 2022

We're seeing a related-looking issue on Fuchsia on the same commit:

https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8804097715115352817/+/u/build/failure_summary

 RUST_BACKTRACE=1 ../../../recipe_cleanup/rust9fky53v8/bin/rustc --color=always --crate-name fuchsia_hyper_test_support ../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs --crate-type rlib --emit=dep-info=obj/src/lib/testing/fuchsia-hyper-test-support/libfuchsia_hyper_test_support.rlib.d,link -Zdep-info-omit-d-target --cfg=__rust_toolchain=\"nkWzzIr653CqEaEbcmzgxh10WYbCeZIvyr4NGPe9ZJgC\" -L gen/zircon/public/sysroot/cpp/lib -Clinker=../../prebuilt/third_party/clang/linux-x64/bin/lld -Clink-arg=--sysroot=gen/zircon/public/sysroot/cpp -Clink-arg=-L../../prebuilt/third_party/clang/linux-x64/bin/../lib/x86_64-unknown-fuchsia -Clink-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/clang/16.0.0/lib/x86_64-unknown-fuchsia -Clink-arg=--pack-dyn-relocs=relr -Clink-arg=-dynamic-linker=ld.so.1 -Clink-arg=--icf=all -Clink-arg=-zrel -Zremap-cwd-prefix=. -Cforce-frame-pointers -Copt-level=0 -Cdebuginfo=2 -Zallow-features= --target x86_64-fuchsia --cap-lints=warn -Wrust-2018-idioms -Dwarnings -Cdebug-assertions=yes -Clink-args=-zstack-size=0x200000 -Cpanic=abort -Cforce-unwind-tables=yes -Zpanic_abort_tests -Dunused_crate_dependencies -Dunused_results -Aunused_results --edition=2021 -o obj/src/lib/testing/fuchsia-hyper-test-support/libfuchsia_hyper_test_support.rlib -Ldependency=obj/src/lib/fuchsia-async -Ldependency=host_x64/obj/src/lib/fuchsia-async-macro -Ldependency=obj/third_party/rust_crates -Ldependency=host_x64/obj/third_party/rust_crates -Ldependency=obj/src/lib/zerocopy -Ldependency=host_x64/obj/src/lib/zerocopy/zerocopy-derive -Ldependency=obj/src/lib/zircon/rust -Ldependency=obj/src/lib/fuchsia-hyper -Ldependency=obj/sdk/fidl/fuchsia.net.name/fuchsia.net.name_rust -Ldependency=obj/src/lib/fidl/rust/fidl -Ldependency=obj/sdk/fidl/fuchsia.net/fuchsia.net_rust -Ldependency=obj/zircon/vdso/zx/zx_rust -Ldependency=obj/sdk/fidl/fuchsia.posix.socket/fuchsia.posix.socket_rust -Ldependency=obj/sdk/fidl/fuchsia.io/fuchsia.io_rust -Ldependency=obj/sdk/fidl/fuchsia.unknown/fuchsia.unknown_rust -Ldependency=obj/sdk/fidl/fuchsia.net.interfaces/fuchsia.net.interfaces_rust -Ldependency=obj/sdk/fidl/fuchsia.hardware.network/fuchsia.hardware.network_rust -Ldependency=obj/sdk/fidl/fuchsia.posix/fuchsia.posix_rust -Ldependency=obj/src/lib/network/fidl_fuchsia_net_ext -Ldependency=obj/src/connectivity/lib/net-types -Ldependency=obj/src/lib/webpki-roots-fuchsia -Ldependency=obj/src/sys/lib/fidl-connector -Ldependency=obj/src/lib/fuchsia-component -Ldependency=obj/sdk/fidl/fuchsia.component/fuchsia.component_rust -Ldependency=obj/sdk/fidl/fuchsia.component.decl/fuchsia.component.decl_rust -Ldependency=obj/sdk/fidl/fuchsia.data/fuchsia.data_rust -Ldependency=obj/sdk/fidl/fuchsia.url/fuchsia.url_rust -Ldependency=obj/sdk/fidl/fuchsia.process/fuchsia.process_rust -Ldependency=obj/sdk/fidl/fuchsia.ldsvc/fuchsia.ldsvc_rust -Ldependency=obj/sdk/fidl/fuchsia.sys/fuchsia.sys_rust -Ldependency=obj/sdk/fidl/fuchsia.mem/fuchsia.mem_rust -Ldependency=obj/src/lib/fdio/rust -Ldependency=obj/sdk/fidl/fuchsia.device/fuchsia.device_rust -Ldependency=obj/src/lib/fuchsia-runtime -Ldependency=obj/src/lib/fuchsia-fs -Ldependency=obj/src/lib/storage/vfs/rust -Ldependency=host_x64/obj/src/lib/storage/vfs/rust/macros -Ldependency=obj/src/lib/trace/rust -Ldependency=obj/src/lib/cstr -Lnative=obj/third_party/rust_crates/compat/ring -Lnative=x64-shared/link_stub -Clink-arg=-Bdynamic -Clink-arg=obj/third_party/rust_crates/compat/ring/libring-core.a -Clink-arg=x64-shared/link_stub/libtrace-engine.so --extern fuchsia_async=obj/src/lib/fuchsia-async/libfuchsia_async.rlib --extern futures=obj/third_party/rust_crates/libfutures-e6516813fcd2ea59.rlib --extern fuchsia_hyper=obj/src/lib/fuchsia-hyper/libfuchsia_hyper.rlib --extern hyper=obj/third_party/rust_crates/libhyper-cc7cc936a1c0e0fb.rlib --extern tokio=obj/third_party/rust_crates/libtokio-93e9171240b81c17.rlib --extern rustls=obj/third_party/rust_crates/librustls-72f8bc3d6c17ed51.rlib --extern tokio_rustls=obj/third_party/rust_crates/libtokio_rustls-16584d9dad632eb3.rlib --extern anyhow=obj/third_party/rust_crates/libanyhow-6015da1b46818404.rlib --extern chrono=obj/third_party/rust_crates/libchrono-5f4599162f3bf073.rlib && ../../prebuilt/third_party/python3/linux-x64/bin/python3.8 -S ../../build/gn/verify_depfile.py -t "//src/lib/testing/fuchsia-hyper-test-support:fuchsia-hyper-test-support.actual" -d obj/src/lib/testing/fuchsia-hyper-test-support/libfuchsia_hyper_test_support.rlib.d ../../src/lib/testing/fuchsia-hyper-test-support/src/fault_injection.rs ../../src/lib/testing/fuchsia-hyper-test-support/src/handler.rs ../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DropGlue(DefId(2:2764 ~ core[496b]::ptr::drop_in_place), Some(hyper::proto::h1::dispatch::Server<hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, hyper::Body>)) (after pass PhaseChange-Runtime(Optimized)) at bb0[0]:
                                Field projection `(*_1).field[0]` specified type `std::pin::Pin<std::boxed::Box<std::option::Option<futures::future::Map<futures::future::Inspect<std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:98:25: 105:6]>, [closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:199:34: 199:42]>, fn(hyper::Response<hyper::Body>) -> std::result::Result<hyper::Response<hyper::Body>, std::convert::Infallible> {std::result::Result::<hyper::Response<hyper::Body>, std::convert::Infallible>::Ok}>>>>`, but actual type is std::pin::Pin<std::boxed::Box<std::option::Option<<hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body> as hyper::service::http::HttpService<hyper::Body>>::Future>>>
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2764 ~ core[496b]::ptr::drop_in_place), Some(hyper::server::server::new_svc::State<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:192:24: 210:14]>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor, hyper::server::shutdown::GracefulWatcher>)) (after pass PhaseChange-Runtime(Optimized)) at bb4[0]:
                                Field projection `((*_1) as Connected).field[0]` specified type `hyper::common::drain::Watching<hyper::server::conn::upgrades::UpgradeableConnection<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>, for<'r> fn(std::pin::Pin<&'r mut hyper::server::conn::upgrades::UpgradeableConnection<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>>)>`, but actual type is <hyper::server::shutdown::GracefulWatcher as hyper::server::server::Watcher<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>>::Future
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2764 ~ core[496b]::ptr::drop_in_place), Some(hyper::server::conn::Connection<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>)) (after pass PhaseChange-Runtime(Optimized)) at bb0[0]:
                                Field projection `(*_1).field[0]` specified type `std::option::Option<hyper::server::conn::ProtoServer<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, hyper::Body, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>>`, but actual type is std::option::Option<hyper::server::conn::ProtoServer<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, <hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body> as hyper::service::http::HttpService<hyper::Body>>::ResBody, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor>>
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2764 ~ core[496b]::ptr::drop_in_place), Some(futures::future::Remote<futures::future::Fuse<futures::future::Map<hyper::server::server::new_svc::NewSvcTask<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:192:24: 210:14]>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor, hyper::server::shutdown::GracefulWatcher>, [closure@<fuchsia_hyper::Executor as hyper::rt::Executor<hyper::server::server::new_svc::NewSvcTask<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:192:24: 210:14]>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor, hyper::server::shutdown::GracefulWatcher>>>::execute::{closure#0}]>>>)) (after pass PhaseChange-Runtime(Optimized)) at bb0[0]:
                                Field projection `(*_1).field[0]` specified type `std::option::Option<futures::futures_channel::oneshot::Sender<std::result::Result<(), std::boxed::Box<dyn std::any::Any + std::marker::Send>>>>`, but actual type is std::option::Option<futures::futures_channel::oneshot::Sender<std::result::Result<<futures::future::Fuse<futures::future::Map<hyper::server::server::new_svc::NewSvcTask<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:192:24: 210:14]>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor, hyper::server::shutdown::GracefulWatcher>, [closure@<fuchsia_hyper::Executor as hyper::rt::Executor<hyper::server::server::new_svc::NewSvcTask<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, std::future::from_generator::GenFuture<[static generator@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:192:24: 210:14]>, hyper::service::util::ServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:193:48: 193:58], hyper::Body>, fuchsia_hyper::Executor, hyper::server::shutdown::GracefulWatcher>>>::execute::{closure#0}]>> as futures::Future>::Output, std::boxed::Box<(dyn std::any::Any + std::marker::Send + 'static)>>>>
  |
  = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:127:36

error: internal compiler error: broken MIR in DropGlue(DefId(2:2764 ~ core[496b]::ptr::drop_in_place), Some(futures::future::Remote<futures::future::Fuse<futures::future::UnwrapOrElse<hyper::server::shutdown::Graceful<hyper::server::accept::from_stream::FromStream<std::pin::Pin<std::boxed::Box<dyn futures::Stream<Item = std::result::Result<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, anyhow::Error>> + std::marker::Send>>>, hyper::service::make::MakeServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:187:40: 187:54]>, futures::future::Map<futures::futures_channel::oneshot::Receiver<()>, [closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:219:29: 219:34]>, fuchsia_hyper::Executor>, [closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:221:29: 221:32]>>>)) (after pass PhaseChange-Runtime(Optimized)) at bb0[0]:
                                Field projection `(*_1).field[0]` specified type `std::option::Option<futures::futures_channel::oneshot::Sender<std::result::Result<(), std::boxed::Box<dyn std::any::Any + std::marker::Send>>>>`, but actual type is std::option::Option<futures::futures_channel::oneshot::Sender<std::result::Result<<futures::future::Fuse<futures::future::UnwrapOrElse<hyper::server::shutdown::Graceful<hyper::server::accept::from_stream::FromStream<std::pin::Pin<std::boxed::Box<dyn futures::Stream<Item = std::result::Result<std::pin::Pin<std::boxed::Box<dyn AsyncReadWrite>>, anyhow::Error>> + std::marker::Send>>>, hyper::service::make::MakeServiceFn<[closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:187:40: 187:54]>, futures::future::Map<futures::futures_channel::oneshot::Receiver<()>, [closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:219:29: 219:34]>, fuchsia_hyper::Executor>, [closure@../../src/lib/testing/fuchsia-hyper-test-support/src/lib.rs:221:29: 221:32]>> as futures::Future>::Output, std::boxed::Box<(dyn std::any::Any + std::marker::Send + 'static)>>>>
  |
  = 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: 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_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}>
   7: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
   8: <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 (9ba169a73 2022-09-02) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type rlib -Z dep-info-omit-d-target -C linker=../../prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=gen/zircon/public/sysroot/cpp -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/bin/../lib/x86_64-unknown-fuchsia -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/clang/16.0.0/lib/x86_64-unknown-fuchsia -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C link-arg=-zrel -Z remap-cwd-prefix=. -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -Z allow-features= -C debug-assertions=yes -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -Z panic_abort_tests -C link-arg=-Bdynamic -C link-arg=obj/third_party/rust_crates/compat/ring/libring-core.a -C link-arg=x64-shared/link_stub/libtrace-engine.so

query stack during panic:
end of query stack

@saethlin
Copy link
Member

saethlin commented Sep 3, 2022

I'm unable to reproduce the ICE with ./miri test on

Default host: x86_64-pc-windows-msvc

miri (directory override for 'C:\Users\kimoc\miri')
rustc 1.65.0-nightly (9ba169a73 2022-09-02)

Btw the advice of ./rustup-toolchain HEAD results in a build error, because Miri was broken again by another PR.

@Noratrieb
Copy link
Member

This does look like my PR causes this.

@RalfJung
Copy link
Member

RalfJung commented Sep 3, 2022

Btw the advice of ./rustup-toolchain HEAD results in a build error, because Miri was broken again by another PR.

Yeah when I wrote that, the other PR had not landed yet. ;)

@RalfJung
Copy link
Member

RalfJung commented Sep 3, 2022

I'm unable to reproduce the ICE with ./miri test on

Hm, that is odd. Not sure what the tools builder does differently, maybe it has debug assertions enabled?

The line number in the ICE is so bad due to #100696.

@RalfJung
Copy link
Member

RalfJung commented Sep 6, 2022

We're seeing a related-looking issue on Fuchsia on the same commit:

Not sure how related they really are, the original ICE is some kind of out-of-bounds slice access within rustc itself...
Could someone try upgrading Miri to current git master? Miri CI passes with latest rustc, after all... even if it fails again, we'll at least get better line numbers since #100696 was fixed. Maybe there is a way to run the windows tools runner without using up a full bors slot?

@oli-obk
Copy link
Contributor

oli-obk commented Sep 7, 2022

Could someone try upgrading Miri to current git master?

on it

@RalfJung
Copy link
Member

RalfJung commented Sep 7, 2022

Turns out the strange Windows-only ICE was caused by a buggy debug assertion:

https://github.com/rust-lang/rust/blob/58286b8f310c4884e250ed622e8678c5f2dff666/compiler/rustc_middle/src/mir/mod.rs#L1481

@bors bors closed this as completed in f91ca28 Sep 7, 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 😅
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
…mandry

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 96d4137deed6c52c6db2dd19568c37d1c160f1e7, 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: #101430
* This issue from `@RalfJung` about Miri being broken: #101344
* This additional issue reported in a comment by `@tmandry` (issue with fuchsia + hyper): rust-lang/rust#101344 (comment)

I have locally verified that the repro in #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 😅
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
…mandry

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 96d4137deed6c52c6db2dd19568c37d1c160f1e7, 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: #101430
* This issue from `@RalfJung` about Miri being broken: #101344
* This additional issue reported in a comment by `@tmandry` (issue with fuchsia + hyper): rust-lang/rust#101344 (comment)

I have locally verified that the repro in #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 😅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-miri Area: The miri tool C-bug Category: This is a bug.
Projects
None yet
7 participants