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

tests/run-make/dump-ice-to-disk is flakey on i686-mingw #128911

Open
jieyouxu opened this issue Aug 10, 2024 · 15 comments
Open

tests/run-make/dump-ice-to-disk is flakey on i686-mingw #128911

jieyouxu opened this issue Aug 10, 2024 · 15 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. O-windows-gnu Toolchain: GNU, Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Aug 10, 2024

I've seen multiple instances of dump-ice-to-disk failing on completely unrelated PRs, but it's completely non-obvious to me how it can fail non-deterministically.


Past investigations

Update: see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/getting.20.60Box.3Cdyn.20Any.3E.60.20as.20ICE.20message posted by @camelid:

I'm getting the following ICE message during development of a PR:

thread 'rustc' panicked at compiler/rustc_middle/src/ty/context.rs:3013:21:
Box<dyn Any>
stack backtrace:

this line in my PR is

bug!("No bound vars found for {}", self.hir().node_to_string(id))

it turns out it displays the message correctly to stderr but not to the rustc-ice file

Is it possible that the test isn't flakey, but that our ICE dump actually regressed? cc @estebank and @nnethercote for diagnostic and ICE dumping in case you guys have any ideas.

Update 2: #128956 has the Box<dyn Any> symptom as well, it might not be limited to ICE dumps to files but also to stderr? Unclear at this moment.

thread 'rustc' panicked at compiler\rustc_codegen_llvm\src\context.rs:1138:21:
Box<dyn Any>
stack backtrace:
   0:     0x7fffe0c051b0 - std::backtrace_rs::backtrace::dbghelp64::trace::h0891390128512157

Update 3: Box<dyn Any> seems to be a separate thing.

@jieyouxu jieyouxu added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 10, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 10, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 10, 2024
@jieyouxu
Copy link
Member Author

I will make it dump the ICE message later today to aid debugging.

bors added a commit to rust-lang-ci/rust that referenced this issue Aug 10, 2024
Tidy up `dump-ice-to-disk` and make assertion failures dump ICE messages

A bit of clean up to the `dump-ice-to-disk` test.

- Fixes/updates the top-level comment.
- Add a FIXME pointing to rust-lang#128911 for flakiness.
- Instead of trying to manually cleanup `rustc-ice*.txt` dumps, run each test instance in a separate temp directory.
- Explicitly make `RUSTC_ICE` unavailable in one of the `-Zmetrics-dir` test case to not have interference from environment.
- Make assertion failures (on ICE dump line count mismatch) extremely verbose to help debug why this test is flakey in CI (rust-lang#128911).

Contains a fix by `@saethlin` in rust-lang#128909, should wait until that is merged then rebase on top.

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
@jieyouxu

This comment has been minimized.

@jieyouxu jieyouxu changed the title run-make: dump-ice-to-disk is sometimes flakey run-make: dump-ice-to-disk: flakey, or did our ICE dump regress? Aug 11, 2024
@jieyouxu jieyouxu changed the title run-make: dump-ice-to-disk: flakey, or did our ICE dump regress? tests/run-make/dump-ice-to-disk: flakey, or did our ICE dump regress? Aug 11, 2024
@jieyouxu jieyouxu added A-diagnostics Area: Messages for errors, warnings, and lints D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. labels Aug 11, 2024
@jieyouxu

This comment was marked as outdated.

@jieyouxu

This comment was marked as outdated.

jieyouxu added a commit to jieyouxu/rust that referenced this issue Aug 11, 2024
…iler-errors

Tidy up `dump-ice-to-disk` and make assertion failures dump ICE messages

For the future traveler: **if you did a `git blame` and found this PR that last modified `dump-ice-to-disk` because the test failed in a completely unrelated PR, then I'm afraid our ICE dump may have regressed or somehow behaves differently on `i686-mingw`.**

A bit of clean up to the `dump-ice-to-disk` test.

- Fixes/updates the top-level comment.
- Add a FIXME pointing to rust-lang#128911 for flakiness.
- Instead of trying to manually cleanup `rustc-ice*.txt` dumps, run each test instance in a separate temp directory.
- Explicitly make `RUSTC_ICE` unavailable in one of the `-Zmetrics-dir` test case to not have interference from environment.
- Make assertion failures (on ICE dump line count mismatch) extremely verbose to help debug why this test is flakey in CI (rust-lang#128911).

Contains a fix by `@saethlin` in rust-lang#128909, should wait until that is merged then rebase on top.

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
@jieyouxu jieyouxu self-assigned this Aug 11, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 11, 2024

Apparently dump-ice-to-disk was always ignore-windows, but we enabled it in the rmake.rs version because it passed multiple try jobs and in full CI. I have a quick patch which disables this test on Windows so I can investigate on the side and not block full CI.

jieyouxu added a commit to jieyouxu/rust that referenced this issue Aug 11, 2024
…iler-errors

Tidy up `dump-ice-to-disk` and make assertion failures dump ICE messages

For the future traveler: **if you did a `git blame` and found this PR that last modified `dump-ice-to-disk` because the test failed in a completely unrelated PR, then I'm afraid our ICE dump may have regressed or somehow behaves differently on `i686-mingw`.**

A bit of clean up to the `dump-ice-to-disk` test.

- Fixes/updates the top-level comment.
- Add a FIXME pointing to rust-lang#128911 for flakiness.
- Instead of trying to manually cleanup `rustc-ice*.txt` dumps, run each test instance in a separate temp directory.
- Explicitly make `RUSTC_ICE` unavailable in one of the `-Zmetrics-dir` test case to not have interference from environment.
- Make assertion failures (on ICE dump line count mismatch) extremely verbose to help debug why this test is flakey in CI (rust-lang#128911).

Contains a fix by `@saethlin` in rust-lang#128909, should wait until that is merged then rebase on top.

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
@jieyouxu
Copy link
Member Author

I ran this test locally 50 times under msys2 msys, zero failures. Can't repro. Painge.

bors added a commit to rust-lang-ci/rust that referenced this issue Aug 11, 2024
…er-errors

Tidy up `dump-ice-to-disk` and make assertion failures dump ICE messages

For the future traveler: **if you did a `git blame` and found this PR that last modified `dump-ice-to-disk` because the test failed in a completely unrelated PR, then I'm afraid our ICE dump may have regressed or somehow behaves differently on `i686-mingw`.**

A bit of clean up to the `dump-ice-to-disk` test.

- Fixes/updates the top-level comment.
- Add a FIXME pointing to rust-lang#128911 for flakiness.
- Instead of trying to manually cleanup `rustc-ice*.txt` dumps, run each test instance in a separate temp directory.
- Explicitly make `RUSTC_ICE` unavailable in one of the `-Zmetrics-dir` test case to not have interference from environment.
- Make assertion failures (on ICE dump line count mismatch) extremely verbose to help debug why this test is flakey in CI (rust-lang#128911).

Contains a fix by `@saethlin` in rust-lang#128909, should wait until that is merged then rebase on top.

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
@mati865
Copy link
Contributor

mati865 commented Aug 11, 2024

Maybe your system is too fast or too stable?
Pipes shouldn't break out of the blue, so it could be due to an old mingw-w64 or CI flakiness.

@jieyouxu

This comment was marked as outdated.

@jieyouxu jieyouxu added the O-windows-gnu Toolchain: GNU, Operating system: Windows label Aug 11, 2024
@jieyouxu
Copy link
Member Author

I can't get it to fail on #128958 running a bunch of try-jobs (in #128958) since modifying it to:

  • Quarantine ICE tests in separate temp dirs.
  • Explicitly add/remove RUSTC_ICE env vars where suitable.

Therefore, in #129115 I'm going to try re-enable this test (now with extremely verbose assertion failures) on Windows, and see if it is still flakey. If this turns out to be still flakey on i686-mingw, we can revert the removal of ignore-windows but this time we'll have way more context for why the test failed.

@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 18, 2024

Still flakey (failed in #127679 (comment))! But at least we got some more info this time:

ICE diff
2024-08-18T08:59:57.6255462Z ---- [run-make] tests\run-make\dump-ice-to-disk stdout ----
2024-08-18T08:59:57.6256030Z 
2024-08-18T08:59:57.6259252Z error: rmake recipe failed to complete
2024-08-18T08:59:57.6260001Z status: exit code: 101
2024-08-18T08:59:57.6261318Z command: "C:\\a\\rust\\rust\\build\\i686-pc-windows-gnu\\test\\run-make\\dump-ice-to-disk\\rmake.exe"
2024-08-18T08:59:57.6262420Z stdout: none
2024-08-18T08:59:57.6262968Z --- stderr -------------------------------
2024-08-18T08:59:57.6263603Z === baseline ICE MESSAGE (60 lines) ====
2024-08-18T08:59:57.6264422Z thread 'rustc' panicked at compiler\rustc_errors\src\lib.rs:1803:17:
2024-08-18T08:59:57.6265396Z aborting due to `-Z treat-err-as-bug=1`
2024-08-18T08:59:57.6265974Z stack backtrace:
2024-08-18T08:59:57.6267004Z    0: 0x684d0543 - std::backtrace::Backtrace::force_capture::hae9d42b545b7971d
2024-08-18T08:59:57.6268863Z    1: 0x68eabc9d - std[7780da4fec05afca]::panicking::update_hook::<alloc[398f1435b9edbefa]::boxed::Box<rustc_driver_impl[a54a6b6fb09d9ce9]::install_ice_hook::{closure#0}>>::{closure#0}
2024-08-18T08:59:57.6270018Z    2: 0x684e9d94 - std::panicking::rust_panic_with_hook::hb3610d19f352ec3e
2024-08-18T08:59:57.6270857Z    3: 0x684e9ad2 - std::panicking::begin_panic_handler::{{closure}}::h996dc5bfcd9bcfa5
2024-08-18T08:59:57.6271856Z    4: 0x684e7008 - std::sys::backtrace::__rust_end_short_backtrace::h6fb56d310cba52b3
2024-08-18T08:59:57.6272450Z    5: 0x684e97e7 - _rust_begin_unwind
2024-08-18T08:59:57.6272983Z    6: 0x68538d0b - core::panicking::panic_fmt::hbf309d16c60726f0
2024-08-18T08:59:57.6273759Z    7: 0x6cb6f6e9 - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::panic_if_treat_err_as_bug
2024-08-18T08:59:57.6274753Z    8: 0x6cb6e7be - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::emit_diagnostic::{closure#3}
2024-08-18T08:59:57.6276009Z    9: 0x6923a273 - rustc_interface[ed93aee2b78bdd07]::callbacks::track_diagnostic::<core[d8271f2e89a0b990]::option::Option<rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6277139Z   10: 0x6cb6d79a - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::emit_diagnostic
2024-08-18T08:59:57.6277948Z   11: 0x6cb6bc35 - <rustc_errors[ac9565cc01da3055]::DiagCtxtHandle>::emit_diagnostic
2024-08-18T08:59:57.6278850Z   12: 0x6cbce270 - <rustc_errors[ac9565cc01da3055]::diagnostic::Diag>::emit_producing_error_guaranteed
2024-08-18T08:59:57.6279750Z   13: 0x69538110 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::report_arg_errors
2024-08-18T08:59:57.6280646Z   14: 0x695321df - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_argument_types
2024-08-18T08:59:57.6281524Z   15: 0x694f3f3d - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::confirm_builtin_call
2024-08-18T08:59:57.6282365Z   16: 0x6958fe11 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_kind
2024-08-18T08:59:57.6283288Z   17: 0x69510afa - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
2024-08-18T08:59:57.6284271Z   18: 0x69589c2c - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
2024-08-18T08:59:57.6285197Z   19: 0x6953b2ef - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_block_with_expected
2024-08-18T08:59:57.6286134Z   20: 0x6958b61d - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_kind
2024-08-18T08:59:57.6287055Z   21: 0x69510afa - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
2024-08-18T08:59:57.6288016Z   22: 0x69589c2c - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
2024-08-18T08:59:57.6288896Z   23: 0x69511d07 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_return_expr
2024-08-18T08:59:57.6289652Z   24: 0x69831145 - rustc_hir_typeck[cd400a00513ed32a]::check::check_fn
2024-08-18T08:59:57.6302616Z   25: 0x6982ab1f - rustc_hir_typeck[cd400a00513ed32a]::typeck
2024-08-18T08:59:57.6304200Z   26: 0x6af2b9ba - rustc_query_impl[58ac2eca0d7f9315]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 4usize]>>
2024-08-18T08:59:57.6306584Z   27: 0x6b1e5037 - <rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::dynamic_query::{closure#2} as core[d8271f2e89a0b990]::ops::function::FnOnce<(rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::TyCtxt, rustc_span[cf94d864f25536f9]::def_id::LocalDefId)>>::call_once
2024-08-18T08:59:57.6309690Z   28: 0x6b38f9ec - rustc_query_system[26104f4cc87fd4c5]::query::plumbing::try_execute_query::<rustc_query_impl[58ac2eca0d7f9315]::DynamicConfig<rustc_query_system[26104f4cc87fd4c5]::query::caches::VecCache<rustc_span[cf94d864f25536f9]::def_id::LocalDefId, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 4usize]>>, false, false, false>, rustc_query_impl[58ac2eca0d7f9315]::plumbing::QueryCtxt, false>
2024-08-18T08:59:57.6312018Z   29: 0x6b1eb53a - rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
2024-08-18T08:59:57.6313314Z   30: 0x6994910c - <rustc_middle[e5cdc9ba5ba4dc5d]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[f07f5ed58e096a41]::check_crate::{closure#4}>::{closure#0}
2024-08-18T08:59:57.6316178Z   31: 0x6990b382 - <rustc_data_structures[3c1131be53797bcd]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[3c1131be53797bcd]::sync::parallel::enabled::par_for_each_in<&rustc_span[cf94d864f25536f9]::def_id::LocalDefId, &[rustc_span[cf94d864f25536f9]::def_id::LocalDefId], <rustc_middle[e5cdc9ba5ba4dc5d]::hir::map::Map>::par_body_owners<rustc_hir_analysis[f07f5ed58e096a41]::check_crate::{closure#4}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
2024-08-18T08:59:57.6318360Z   32: 0x6997b07c - rustc_hir_analysis[f07f5ed58e096a41]::check_crate
2024-08-18T08:59:57.6319060Z   33: 0x69185ffc - rustc_interface[ed93aee2b78bdd07]::passes::analysis
2024-08-18T08:59:57.6320582Z   34: 0x6af2bed5 - rustc_query_impl[58ac2eca0d7f9315]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 1usize]>>
2024-08-18T08:59:57.6322673Z   35: 0x6b14bee2 - <rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::dynamic_query::{closure#2} as core[d8271f2e89a0b990]::ops::function::FnOnce<(rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::TyCtxt, ())>>::call_once
2024-08-18T08:59:57.6325240Z   36: 0x6b2e1797 - rustc_query_system[26104f4cc87fd4c5]::query::plumbing::try_execute_query::<rustc_query_impl[58ac2eca0d7f9315]::DynamicConfig<rustc_query_system[26104f4cc87fd4c5]::query::caches::SingleCache<rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[58ac2eca0d7f9315]::plumbing::QueryCtxt, false>
2024-08-18T08:59:57.6327439Z   37: 0x6b24d1a1 - rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
2024-08-18T08:59:57.6329209Z   38: 0x68ef3449 - <rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}::{closure#5}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6331877Z   39: 0x68e6a475 - <rustc_interface[ed93aee2b78bdd07]::queries::QueryResult<&rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::GlobalCtxt>>::enter::<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}::{closure#5}>
2024-08-18T08:59:57.6341040Z   40: 0x68e3d5f7 - <rustc_interface[ed93aee2b78bdd07]::interface::Compiler>::enter::<rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}, core[d8271f2e89a0b990]::result::Result<core[d8271f2e89a0b990]::option::Option<rustc_interface[ed93aee2b78bdd07]::queries::Linker>, rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6346032Z   41: 0x68e7dd91 - rustc_span[cf94d864f25536f9]::create_session_globals_then::<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
2024-08-18T08:59:57.6352479Z   42: 0x68ea80b7 - std[7780da4fec05afca]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6359101Z   43: 0x68e79bc1 - <<std[7780da4fec05afca]::thread::Builder>::spawn_unchecked_<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#1} as core[d8271f2e89a0b990]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
2024-08-18T08:59:57.6362839Z   44: 0x684faf86 - __ZN3std3sys3pal7windows6thread6Thread3new12thread_start17hfc410c27eb869335E@4
2024-08-18T08:59:57.6363499Z   45: 0x762d67f9 - <unknown>
2024-08-18T08:59:57.6363847Z   46: 0x77ba800d - <unknown>
2024-08-18T08:59:57.6364187Z   47: 0x77ba7fdb - <unknown>
2024-08-18T08:59:57.6364386Z 
2024-08-18T08:59:57.6364394Z 
2024-08-18T08:59:57.6364625Z rustc version: 1.82.0-nightly (fc677a778 2024-08-18)
2024-08-18T08:59:57.6365088Z platform: i686-pc-windows-gnu
2024-08-18T08:59:57.6365309Z 
2024-08-18T08:59:57.6365422Z query stack during panic:
2024-08-18T08:59:57.6365777Z #0 [typeck] type-checking `main`
2024-08-18T08:59:57.6366186Z #1 [analysis] running analysis passes on this crate
2024-08-18T08:59:57.6366589Z end of query stack
2024-08-18T08:59:57.6366831Z 
2024-08-18T08:59:57.6367048Z === -Zmetrics-dir only ICE MESSAGE (61 lines) ====
2024-08-18T08:59:57.6367666Z thread 'rustc' panicked at compiler\rustc_errors\src\lib.rs:1803:17:
2024-08-18T08:59:57.6368230Z aborting due to `-Z treat-err-as-bug=1`
2024-08-18T08:59:57.6368605Z stack backtrace:
2024-08-18T08:59:57.6369134Z    0: 0x684d0543 - std::backtrace::Backtrace::force_capture::hae9d42b545b7971d
2024-08-18T08:59:57.6370382Z    1: 0x68eabc9d - std[7780da4fec05afca]::panicking::update_hook::<alloc[398f1435b9edbefa]::boxed::Box<rustc_driver_impl[a54a6b6fb09d9ce9]::install_ice_hook::{closure#0}>>::{closure#0}
2024-08-18T08:59:57.6371520Z    2: 0x684e9d94 - std::panicking::rust_panic_with_hook::hb3610d19f352ec3e
2024-08-18T08:59:57.6372308Z    3: 0x684e9ad2 - std::panicking::begin_panic_handler::{{closure}}::h996dc5bfcd9bcfa5
2024-08-18T08:59:57.6373108Z    4: 0x684e7008 - std::sys::backtrace::__rust_end_short_backtrace::h6fb56d310cba52b3
2024-08-18T08:59:57.6373711Z    5: 0x684e97e7 - _rust_begin_unwind
2024-08-18T08:59:57.6374248Z    6: 0x68538d0b - core::panicking::panic_fmt::hbf309d16c60726f0
2024-08-18T08:59:57.6375031Z    7: 0x6cb6f6e9 - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::panic_if_treat_err_as_bug
2024-08-18T08:59:57.6375932Z    8: 0x6cb6e7be - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::emit_diagnostic::{closure#3}
2024-08-18T08:59:57.6377301Z    9: 0x6923a273 - rustc_interface[ed93aee2b78bdd07]::callbacks::track_diagnostic::<core[d8271f2e89a0b990]::option::Option<rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6378513Z   10: 0x6cb6d79a - <rustc_errors[ac9565cc01da3055]::DiagCtxtInner>::emit_diagnostic
2024-08-18T08:59:57.6379319Z   11: 0x6cb6bc35 - <rustc_errors[ac9565cc01da3055]::DiagCtxtHandle>::emit_diagnostic
2024-08-18T08:59:57.6380224Z   12: 0x6cbce270 - <rustc_errors[ac9565cc01da3055]::diagnostic::Diag>::emit_producing_error_guaranteed
2024-08-18T08:59:57.6381142Z   13: 0x69538110 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::report_arg_errors
2024-08-18T08:59:57.6382018Z   14: 0x695321df - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_argument_types
2024-08-18T08:59:57.6382906Z   15: 0x694f3f3d - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::confirm_builtin_call
2024-08-18T08:59:57.6383757Z   16: 0x6958fe11 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_kind
2024-08-18T08:59:57.6384769Z   17: 0x69510afa - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
2024-08-18T08:59:57.6385773Z   18: 0x69589c2c - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
2024-08-18T08:59:57.6386712Z   19: 0x6953b2ef - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_block_with_expected
2024-08-18T08:59:57.6387771Z   20: 0x6958b61d - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_kind
2024-08-18T08:59:57.6388817Z   21: 0x69510afa - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
2024-08-18T08:59:57.6389790Z   22: 0x69589c2c - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
2024-08-18T08:59:57.6390697Z   23: 0x69511d07 - <rustc_hir_typeck[cd400a00513ed32a]::fn_ctxt::FnCtxt>::check_return_expr
2024-08-18T08:59:57.6391702Z   24: 0x69831145 - rustc_hir_typeck[cd400a00513ed32a]::check::check_fn
2024-08-18T08:59:57.6392362Z   25: 0x6982ab1f - rustc_hir_typeck[cd400a00513ed32a]::typeck
2024-08-18T08:59:57.6393847Z   26: 0x6af2b9ba - rustc_query_impl[58ac2eca0d7f9315]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 4usize]>>
2024-08-18T08:59:57.6396128Z   27: 0x6b1e5037 - <rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::dynamic_query::{closure#2} as core[d8271f2e89a0b990]::ops::function::FnOnce<(rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::TyCtxt, rustc_span[cf94d864f25536f9]::def_id::LocalDefId)>>::call_once
2024-08-18T08:59:57.6399147Z   28: 0x6b38f9ec - rustc_query_system[26104f4cc87fd4c5]::query::plumbing::try_execute_query::<rustc_query_impl[58ac2eca0d7f9315]::DynamicConfig<rustc_query_system[26104f4cc87fd4c5]::query::caches::VecCache<rustc_span[cf94d864f25536f9]::def_id::LocalDefId, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 4usize]>>, false, false, false>, rustc_query_impl[58ac2eca0d7f9315]::plumbing::QueryCtxt, false>
2024-08-18T08:59:57.6401360Z   29: 0x6b1eb53a - rustc_query_impl[58ac2eca0d7f9315]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
2024-08-18T08:59:57.6402657Z   30: 0x6994910c - <rustc_middle[e5cdc9ba5ba4dc5d]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[f07f5ed58e096a41]::check_crate::{closure#4}>::{closure#0}
2024-08-18T08:59:57.6405483Z   31: 0x6990b382 - <rustc_data_structures[3c1131be53797bcd]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[3c1131be53797bcd]::sync::parallel::enabled::par_for_each_in<&rustc_span[cf94d864f25536f9]::def_id::LocalDefId, &[rustc_span[cf94d864f25536f9]::def_id::LocalDefId], <rustc_middle[e5cdc9ba5ba4dc5d]::hir::map::Map>::par_body_owners<rustc_hir_analysis[f07f5ed58e096a41]::check_crate::{closure#4}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
2024-08-18T08:59:57.6407780Z   32: 0x6997b07c - rustc_hir_analysis[f07f5ed58e096a41]::check_crate
2024-08-18T08:59:57.6408560Z   33: 0x69185ffc - rustc_interface[ed93aee2b78bdd07]::passes::analysis
2024-08-18T08:59:57.6410141Z   34: 0x6af2bed5 - rustc_query_impl[58ac2eca0d7f9315]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 1usize]>>
2024-08-18T08:59:57.6412228Z   35: 0x6b14bee2 - <rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::dynamic_query::{closure#2} as core[d8271f2e89a0b990]::ops::function::FnOnce<(rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::TyCtxt, ())>>::call_once
2024-08-18T08:59:57.6414766Z   36: 0x6b2e1797 - rustc_query_system[26104f4cc87fd4c5]::query::plumbing::try_execute_query::<rustc_query_impl[58ac2eca0d7f9315]::DynamicConfig<rustc_query_system[26104f4cc87fd4c5]::query::caches::SingleCache<rustc_middle[e5cdc9ba5ba4dc5d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[58ac2eca0d7f9315]::plumbing::QueryCtxt, false>
2024-08-18T08:59:57.6416865Z   37: 0x6b24d1a1 - rustc_query_impl[58ac2eca0d7f9315]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
2024-08-18T08:59:57.6418577Z   38: 0x68ef3449 - <rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}::{closure#5}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6421088Z   39: 0x68e6a475 - <rustc_interface[ed93aee2b78bdd07]::queries::QueryResult<&rustc_middle[e5cdc9ba5ba4dc5d]::ty::context::GlobalCtxt>>::enter::<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}::{closure#5}>
2024-08-18T08:59:57.6424097Z   40: 0x68e3d5f7 - <rustc_interface[ed93aee2b78bdd07]::interface::Compiler>::enter::<rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}::{closure#1}, core[d8271f2e89a0b990]::result::Result<core[d8271f2e89a0b990]::option::Option<rustc_interface[ed93aee2b78bdd07]::queries::Linker>, rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6429169Z   41: 0x68e7dd91 - rustc_span[cf94d864f25536f9]::create_session_globals_then::<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
2024-08-18T08:59:57.6435835Z   42: 0x68ea80b7 - std[7780da4fec05afca]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>
2024-08-18T08:59:57.6442586Z   43: 0x68e79bc1 - <<std[7780da4fec05afca]::thread::Builder>::spawn_unchecked_<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_with_globals<rustc_interface[ed93aee2b78bdd07]::util::run_in_thread_pool_with_globals<rustc_interface[ed93aee2b78bdd07]::interface::run_compiler<core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>, rustc_driver_impl[a54a6b6fb09d9ce9]::run_compiler::{closure#0}>::{closure#1}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d8271f2e89a0b990]::result::Result<(), rustc_span[cf94d864f25536f9]::ErrorGuaranteed>>::{closure#1} as core[d8271f2e89a0b990]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
2024-08-18T08:59:57.6446367Z   44: 0x684faf86 - __ZN3std3sys3pal7windows6thread6Thread3new12thread_start17hfc410c27eb869335E@4
2024-08-18T08:59:57.6447035Z   45: 0x762d67f9 - <unknown>
2024-08-18T08:59:57.6447391Z   46: 0x77ba800d - <unknown>
2024-08-18T08:59:57.6447738Z   47: 0x77ba7fdb - <unknown>
2024-08-18T08:59:57.6448076Z   48:  0xa602020 - <unknown>
2024-08-18T08:59:57.6448284Z 
2024-08-18T08:59:57.6448290Z 
2024-08-18T08:59:57.6448569Z rustc version: 1.82.0-nightly (fc677a778 2024-08-18)
2024-08-18T08:59:57.6449042Z platform: i686-pc-windows-gnu
2024-08-18T08:59:57.6449259Z 
2024-08-18T08:59:57.6449377Z query stack during panic:
2024-08-18T08:59:57.6449743Z #0 [typeck] type-checking `main`
2024-08-18T08:59:57.6450146Z #1 [analysis] running analysis passes on this crate
2024-08-18T08:59:57.6450560Z end of query stack
2024-08-18T08:59:57.6450726Z 
2024-08-18T08:59:57.6450840Z ====================================
2024-08-18T08:59:57.6451495Z thread 'main' panicked at C:\a\rust\rust\tests\run-make\dump-ice-to-disk\rmake.rs:177:9:
2024-08-18T08:59:57.6452372Z ICE message length mismatch: baseline has 60 lines but -Zmetrics-dir only has 61 lines
2024-08-18T08:59:57.6453136Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-08-18T08:59:57.6453721Z ------------------------------------------

@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 18, 2024

I'll send a revert real quick to stop blocking full CI and try jobs.
EDIT: #129227.

@jieyouxu
Copy link
Member Author

Still flakey (failed in #127679 (comment))! But at least we got some more info this time:

Ok ok apparently on i686-mingw our ICE backtraces sometimes have an extra line of <unknown> whose address is super far away from the functions involved in the rest of the backtrace.

e.g. in the baseline ICE:

2024-08-18T08:59:57.6363499Z   45: 0x762d67f9 - <unknown>
2024-08-18T08:59:57.6363847Z   46: 0x77ba800d - <unknown>
2024-08-18T08:59:57.6364187Z   47: 0x77ba7fdb - <unknown>

but in the ICE ran again:

2024-08-18T08:59:57.6447035Z   45: 0x762d67f9 - <unknown>
2024-08-18T08:59:57.6447391Z   46: 0x77ba800d - <unknown>
2024-08-18T08:59:57.6447738Z   47: 0x77ba7fdb - <unknown>
2024-08-18T08:59:57.6448076Z   48:  0xa602020 - <unknown>     // <- wat

@jieyouxu jieyouxu changed the title tests/run-make/dump-ice-to-disk: flakey, or did our ICE dump regress? tests/run-make/dump-ice-to-disk is flakey on i686-mingw Aug 18, 2024
@jieyouxu
Copy link
Member Author

I'm not super interested in finding out exactly why, I think it's okay to remain ignore-windows for now.

@jieyouxu jieyouxu removed their assignment Aug 18, 2024
@mati865
Copy link
Contributor

mati865 commented Aug 20, 2024

I686 and x86_64 use different unwind mechanism and different debuginfo format. Maybe it'd be enough to ignore i686?

@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 20, 2024

I686 and x86_64 use different unwind mechanism and different debuginfo format. Maybe it'd be enough to ignore i686?

tbh, I feel like the test might need a bit more adjustments. Because the way it checks that environment variables XXX should not affect ICE backtrace is quite fragile (to say the least) by comparing line counts. When I eventually come back to revisit this test, then I think it's better to fix the test logic to make it less fragile and more robust, which would account for "i686 has a different unwind mechanism and different debuginfo format" (which is a completely reasonable implementation and should not require ignoring i686 at all).

i.e. ignore-i686 is just papering over the fact that the test logic itself is fragile.

But yeah, thank you very much for that context, I think it is quite possibly why the line counts are non-deterministic on i686-mingw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. O-windows-gnu Toolchain: GNU, Operating system: Windows 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

3 participants