Skip to content

ICE when build serde during work on my PR #113838

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

Closed
Mingun opened this issue Jul 18, 2023 · 2 comments
Closed

ICE when build serde during work on my PR #113838

Mingun opened this issue Jul 18, 2023 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@Mingun
Copy link

Mingun commented Jul 18, 2023

Code

The bug appeared when I worked for my PR for serde, there is a commit that introduces it: Mingun/serde@5ef91dd
My serde/Cargo.lock attached.

To reproduce:

  1. Checkout https://github.com/Mingun/serde/tree/rustc-bug
  2. Maybe exact versions of some crates required, so place Cargo.lock.txt into root of working copy and remove the .txt extension (GitHub restriction)
  3. cd ./test_suite
  4. Run cargo +nightly-gnu test --features unstable

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (85bf07972 2023-07-06)
binary: rustc
commit-hash: 85bf07972a1041b9e25393b803d0e006bec3eaaf
commit-date: 2023-07-06
host: x86_64-pc-windows-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

PS D:\Projects\serde\test_suite> cargo +nightly-gnu test --features unstable
   Compiling serde_derive v1.0.171 (D:\Projects\serde\serde_derive)
   Compiling serde v1.0.171 (D:\Projects\serde\serde)
   Compiling serde_test v1.0.171 (D:\Projects\serde\serde_test)
   Compiling serde_test_suite v0.0.0 (D:\Projects\serde\test_suite)
thread 'copy LTO artifacts for {} 7mbkz1vk1shmxg6' panicked at 'no saved object file in work product', /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:896:45
stack backtrace:
   0:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::dbghelp::trace::he2a89117e20d327a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:98:5
   1:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::trace_unsynchronized::hb104240a5a3b5d1a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fed7bfdd0e - std::sys_common::backtrace::_print_fmt::he5cc8cafa09de7d4
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:65:5
   3:      0x7fed7bfdd0e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9fb622ee91faf7f0
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fed7c6965b - core::fmt::rt::Argument::fmt::h72fc842253f6eb5e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/rt.rs:138:9
   5:      0x7fed7c6965b - core::fmt::write::h65c12c9a0a157b3a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/mod.rs:1094:21
   6:      0x7fed7bf2b07 - std::io::Write::write_fmt::h69708df43bedf29e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\io/mod.rs:1714:15
   7:      0x7fed7bfdab4 - std::sys_common::backtrace::_print::ha29b3745d848b036
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fed7bfdab4 - std::sys_common::backtrace::print::hb5155bdd80db38be
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fed7c00e66 - std::panicking::default_hook::{{closure}}::hc3c82da4c6a02bbb
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:269:22
  10:      0x7fed7c00b61 - std::panicking::default_hook::hcf0d8dd640dd731f
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:288:9
  11:      0x7fec6fa04cf - rustc_driver_impl[823a096ea1ebc4ce]::install_ice_hook::{closure#0}
  12:      0x7fed7c017a3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he455faa031470aba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2024:9
  13:      0x7fed7c017a3 - std::panicking::rust_panic_with_hook::h3da42084fababdc2
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:709:13
  14:      0x7fed7c01525 - std::panicking::begin_panic_handler::{{closure}}::hdb3966b243e5ebd7
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:597:13
  15:      0x7fed7bfe9f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h2f07cf7c18ca3c23
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:151:18
  16:      0x7fed7c01270 - rust_begin_unwind
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:593:5
  17:      0x7fed7c65785 - core::panicking::panic_fmt::hf7a25ae9b4b0770e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:67:14
  18:      0x7fed7c654d2 - core::panicking::panic_display::h2de9d566002507ef
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:150:5
  19:      0x7fed7c654d2 - core::panicking::panic_str::hd4e47d9fa39dd038
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:134:5
  20:      0x7fed7c654d2 - core::option::expect_failed::h49605977c1129d7d
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/option.rs:1952:5
  21:      0x7fec73704d1 - rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>
  22:      0x7fec72bbd41 - std[5ca6d13a2e16cde4]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend as rustc_codegen_ssa[d6e4b6918c5b41d4]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::spawn_work<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>
  23:      0x7fec72bec6e - <<std[5ca6d13a2e16cde4]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend as rustc_codegen_ssa[d6e4b6918c5b41d4]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::spawn_work<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>::{closure#1} as core[ea84f0dae92247e9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6c2ab1cc5d647f44
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  25:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd9b4975f0fe6e7cd
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  26:      0x7fed7c149f7 - std::sys::windows::thread::Thread::new::thread_start::h984dee15c8020eba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys\windows/thread.rs:57:17
  27:         0x774c556d - <unknown>
  28:         0x7772372d - <unknown>

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread '<unnamed>' panicked at '/rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:1555:29: worker thread panicked', compiler\rustc_middle\src\util\bug.rs:36:26
stack backtrace:
   0:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::dbghelp::trace::he2a89117e20d327a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:98:5
   1:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::trace_unsynchronized::hb104240a5a3b5d1a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fed7bfdd0e - std::sys_common::backtrace::_print_fmt::he5cc8cafa09de7d4
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:65:5
   3:      0x7fed7bfdd0e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9fb622ee91faf7f0
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fed7c6965b - core::fmt::rt::Argument::fmt::h72fc842253f6eb5e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/rt.rs:138:9
   5:      0x7fed7c6965b - core::fmt::write::h65c12c9a0a157b3a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/mod.rs:1094:21
   6:      0x7fed7bf2b07 - std::io::Write::write_fmt::h69708df43bedf29e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\io/mod.rs:1714:15
   7:      0x7fed7bfdab4 - std::sys_common::backtrace::_print::ha29b3745d848b036
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fed7bfdab4 - std::sys_common::backtrace::print::hb5155bdd80db38be
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fed7c00e66 - std::panicking::default_hook::{{closure}}::hc3c82da4c6a02bbb
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:269:22
  10:      0x7fed7c00b61 - std::panicking::default_hook::hcf0d8dd640dd731f
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:288:9
  11:      0x7fec6fa04cf - rustc_driver_impl[823a096ea1ebc4ce]::install_ice_hook::{closure#0}
  12:      0x7fed7c017a3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he455faa031470aba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2024:9
  13:      0x7fed7c017a3 - std::panicking::rust_panic_with_hook::h3da42084fababdc2
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:709:13
  14:      0x7fec9717fb3 - std[5ca6d13a2e16cde4]::panicking::begin_panic::<alloc[ad00d3bd6f390798]::string::String>::{closure#0}
  15:      0x7fec9717d79 - std[5ca6d13a2e16cde4]::sys_common::backtrace::__rust_end_short_backtrace::<std[5ca6d13a2e16cde4]::panicking::begin_panic<alloc[ad00d3bd6f390798]::string::String>::{closure#0}, !>
  16:      0x7fec967d634 - std[5ca6d13a2e16cde4]::panicking::begin_panic::<alloc[ad00d3bd6f390798]::string::String>
  17:      0x7fec9635f02 - rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt::<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}
  18:      0x7fec9631a81 - rustc_middle[32fab316af9e74d9]::ty::context::tls::with_opt::<rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:      0x7fec96319f9 - rustc_middle[32fab316af9e74d9]::ty::context::tls::with_context_opt::<rustc_middle[32fab316af9e74d9]::ty::context::tls::with_opt<rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:      0x7fec9635e15 - rustc_middle[32fab316af9e74d9]::util::bug::bug_fmt
  21:      0x7fec72bb0c5 - std[5ca6d13a2e16cde4]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend as rustc_codegen_ssa[d6e4b6918c5b41d4]::traits::backend::ExtraBackendMethods>::spawn_thread<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::start_executing_work<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>::{closure#5}, core[ea84f0dae92247e9]::result::Result<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::CompiledModules, ()>>::{closure#0}, core[ea84f0dae92247e9]::result::Result<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::CompiledModules, ()>>
  22:      0x7fec72be8cc - <<std[5ca6d13a2e16cde4]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend as rustc_codegen_ssa[d6e4b6918c5b41d4]::traits::backend::ExtraBackendMethods>::spawn_thread<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::start_executing_work<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>::{closure#5}, core[ea84f0dae92247e9]::result::Result<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::CompiledModules, ()>>::{closure#0}, core[ea84f0dae92247e9]::result::Result<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::CompiledModules, ()>>::{closure#1} as core[ea84f0dae92247e9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6c2ab1cc5d647f44
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  24:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd9b4975f0fe6e7cd
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  25:      0x7fed7c149f7 - std::sys::windows::thread::Thread::new::thread_start::h984dee15c8020eba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys\windows/thread.rs:57:17
  26:         0x774c556d - <unknown>
  27:         0x7772372d - <unknown>

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread 'rustc' panicked at '/rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:1930:17: panic during codegen/LLVM phase', compiler\rustc_middle\src\util\bug.rs:36:26
stack backtrace:
   0:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::dbghelp::trace::he2a89117e20d327a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:98:5
   1:      0x7fed7bfdd0e - std::backtrace_rs::backtrace::trace_unsynchronized::hb104240a5a3b5d1a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fed7bfdd0e - std::sys_common::backtrace::_print_fmt::he5cc8cafa09de7d4
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:65:5
   3:      0x7fed7bfdd0e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9fb622ee91faf7f0
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fed7c6965b - core::fmt::rt::Argument::fmt::h72fc842253f6eb5e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/rt.rs:138:9
   5:      0x7fed7c6965b - core::fmt::write::h65c12c9a0a157b3a
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src\fmt/mod.rs:1094:21
   6:      0x7fed7bf2b07 - std::io::Write::write_fmt::h69708df43bedf29e
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\io/mod.rs:1714:15
   7:      0x7fed7bfdab4 - std::sys_common::backtrace::_print::ha29b3745d848b036
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fed7bfdab4 - std::sys_common::backtrace::print::hb5155bdd80db38be
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fed7c00e66 - std::panicking::default_hook::{{closure}}::hc3c82da4c6a02bbb
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:269:22
  10:      0x7fed7c00b61 - std::panicking::default_hook::hcf0d8dd640dd731f
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:288:9
  11:      0x7fec6fa04cf - rustc_driver_impl[823a096ea1ebc4ce]::install_ice_hook::{closure#0}
  12:      0x7fed7c017a3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he455faa031470aba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2024:9
  13:      0x7fed7c017a3 - std::panicking::rust_panic_with_hook::h3da42084fababdc2
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:709:13
  14:      0x7fec9717fb3 - std[5ca6d13a2e16cde4]::panicking::begin_panic::<alloc[ad00d3bd6f390798]::string::String>::{closure#0}
  15:      0x7fec9717d79 - std[5ca6d13a2e16cde4]::sys_common::backtrace::__rust_end_short_backtrace::<std[5ca6d13a2e16cde4]::panicking::begin_panic<alloc[ad00d3bd6f390798]::string::String>::{closure#0}, !>
  16:      0x7fec967d634 - std[5ca6d13a2e16cde4]::panicking::begin_panic::<alloc[ad00d3bd6f390798]::string::String>
  17:      0x7fec9635f02 - rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt::<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}
  18:      0x7fec9631a81 - rustc_middle[32fab316af9e74d9]::ty::context::tls::with_opt::<rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:      0x7fec96319f9 - rustc_middle[32fab316af9e74d9]::ty::context::tls::with_context_opt::<rustc_middle[32fab316af9e74d9]::ty::context::tls::with_opt<rustc_middle[32fab316af9e74d9]::util::bug::opt_span_bug_fmt<rustc_span[bd3a8a53b302ced2]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:      0x7fec9635e15 - rustc_middle[32fab316af9e74d9]::util::bug::bug_fmt
  21:      0x7fec72484c5 - <rustc_session[ffd00ff2d751a46c]::session::Session>::time::<rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::CompiledModules, <rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::OngoingCodegen<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>>::join::{closure#0}>
  22:      0x7fec73712ed - <rustc_codegen_ssa[d6e4b6918c5b41d4]::back::write::OngoingCodegen<rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend>>::join
  23:      0x7fec72642cc - <rustc_codegen_llvm[d0a7e83d5746afd9]::LlvmCodegenBackend as rustc_codegen_ssa[d6e4b6918c5b41d4]::traits::backend::CodegenBackend>::join_codegen
  24:      0x7fec7152f32 - <rustc_interface[439fe77b23729ed9]::queries::Linker>::link
  25:      0x7fec6ff8107 - rustc_span[bd3a8a53b302ced2]::set_source_map::<core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>, rustc_interface[439fe77b23729ed9]::interface::run_compiler<core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>, rustc_driver_impl[823a096ea1ebc4ce]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  26:      0x7fec6ff4415 - std[5ca6d13a2e16cde4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[439fe77b23729ed9]::util::run_in_thread_pool_with_globals<rustc_interface[439fe77b23729ed9]::interface::run_compiler<core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>, rustc_driver_impl[823a096ea1ebc4ce]::run_compiler::{closure#1}>::{closure#0}, core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>>
  27:      0x7fec6fda3d4 - <<std[5ca6d13a2e16cde4]::thread::Builder>::spawn_unchecked_<rustc_interface[439fe77b23729ed9]::util::run_in_thread_pool_with_globals<rustc_interface[439fe77b23729ed9]::interface::run_compiler<core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>, rustc_driver_impl[823a096ea1ebc4ce]::run_compiler::{closure#1}>::{closure#0}, core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ea84f0dae92247e9]::result::Result<(), rustc_span[bd3a8a53b302ced2]::ErrorGuaranteed>>::{closure#1} as core[ea84f0dae92247e9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6c2ab1cc5d647f44
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  29:      0x7fed7c149f7 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd9b4975f0fe6e7cd
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\alloc\src/boxed.rs:2010:9
  30:      0x7fed7c149f7 - std::sys::windows::thread::Thread::new::thread_start::h984dee15c8020eba
                               at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src\sys\windows/thread.rs:57:17
  31:         0x774c556d - <unknown>
  32:         0x7772372d - <unknown>

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `serde_test_suite` (test "test_serde_path")
warning: build failed, waiting for other jobs to finish...
PS D:\Projects\serde\test_suite>
Backtrace

PS D:\Projects\serde\test_suite> $env:RUST_BACKTRACE=1;
PS D:\Projects\serde\test_suite> cargo +nightly-gnu test --features unstable
   Compiling serde_derive v1.0.171 (D:\Projects\serde\serde_derive)
   Compiling serde v1.0.171 (D:\Projects\serde\serde)
   Compiling serde_test v1.0.171 (D:\Projects\serde\serde_test)
   Compiling serde_test_suite v0.0.0 (D:\Projects\serde\test_suite)
warning: failed to garbage collect finalized incremental compilation session directory `\\?\H:\Projects\serde\target\debug\incremental\test_annotations-3o8s0dfjgfbyw\s-gmy6b72kqp-d6tycx-cwcw31epz2ld7ah3w60neo0t4`: Невозможно открыть файл, поскольку это происходит в удаляемом процессе. (os error 303)

warning: `serde_test_suite` (test "test_annotations") generated 1 warning
thread 'copy LTO artifacts for {} 7mbkz1vk1shmxg6' panicked at 'no saved object file in work product', /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:896:45
stack backtrace:
   0: rust_begin_unwind
             at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\std\src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:67:14
   2: core::panicking::panic_display
             at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:150:5
   3: core::panicking::panic_str
             at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/panicking.rs:134:5
   4: core::option::expect_failed
             at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library\core\src/option.rs:1952:5
   5: rustc_codegen_ssa::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm::LlvmCodegenBackend>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread '<unnamed>' panicked at '/rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:1555:29: worker thread panicked', compiler\rustc_middle\src\util\bug.rs:36:26
stack backtrace:
   0: std::panicking::begin_panic::<alloc::string::String>
   1: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   2: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   3: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   4: rustc_middle::util::bug::bug_fmt
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread 'rustc' panicked at '/rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf\compiler\rustc_codegen_ssa\src\back\write.rs:1930:17: panic during codegen/LLVM phase', compiler\rustc_middle\src\util\bug.rs:36:26
stack backtrace:
   0: std::panicking::begin_panic::<alloc::string::String>
   1: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   2: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   3: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   4: rustc_middle::util::bug::bug_fmt
   5: <rustc_session::session::Session>::time::<rustc_codegen_ssa::back::write::CompiledModules, <rustc_codegen_ssa::back::write::OngoingCodegen<rustc_codegen_llvm::LlvmCodegenBackend>>::join::{closure#0}>
   6: <rustc_codegen_ssa::back::write::OngoingCodegen<rustc_codegen_llvm::LlvmCodegenBackend>>::join
   7: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::join_codegen
   8: <rustc_interface::queries::Linker>::link
   9: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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.72.0-nightly (85bf07972 2023-07-06) running on x86_64-pc-windows-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `serde_test_suite` (test "test_serde_path")
warning: build failed, waiting for other jobs to finish...
PS D:\Projects\serde\test_suite>

@Mingun Mingun 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 Jul 18, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 18, 2023
@Mingun
Copy link
Author

Mingun commented Jul 18, 2023

The bug disappeared when I ran cargo clean in D:\Projects\serde\test_suite, so it is probably related to intermediate artifacts. I've also tried to switch to another branch before cleanup and got the same ICE.

@Noratrieb Noratrieb added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 29, 2023
@Noratrieb
Copy link
Member

You're not the first person having this issue. Closing this as a duplicate of #109879.

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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

3 participants