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

Compiling -> "thread 'coordinator' panicked" #135075

Open
Andy-anyware opened this issue Jan 3, 2025 · 9 comments
Open

Compiling -> "thread 'coordinator' panicked" #135075

Andy-anyware opened this issue Jan 3, 2025 · 9 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Andy-anyware
Copy link

Code

Just the whole project. if needed i can share but no idea where the bug is.

Meta

rustc --version --verbose:

rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-pc-windows-msvc
release: 1.79.0
LLVM version: 18.1.7

Error output

thread 'coordinator' panicked at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\compiler\rustc_codegen_ssa\src\back\write.rs:1638:29:
/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\compiler\rustc_codegen_ssa\src\back\write.rs:1638:29: worker thread panicked     
stack backtrace:
   0:     0x7ffb57ea3c48 - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1:     0x7ffb57ea3c48 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ffb57ea3c48 - std::sys_common::backtrace::_print_fmt
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:68     
   3:     0x7ffb57ea3c48 - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:44     
   4:     0x7ffb57ed4f09 - core::fmt::rt::Argument::fmt
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\fmt\rt.rs:165
   5:     0x7ffb57ed4f09 - core::fmt::write
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\fmt\mod.rs:1157
   6:     0x7ffb57e9a3e1 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\io\mod.rs:1832
   7:     0x7ffb57ea3a26 - std::sys_common::backtrace::print
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:34     
   8:     0x7ffb57ea6b88 - std::panicking::default_hook::closure$1
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:271
   9:     0x7ffb57ea67f7 - std::panicking::default_hook
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:298
  10:     0x7ffb49f9fdfe - __longjmp_internal
  11:     0x7ffb57ea71b7 - alloc::boxed::impl$50::call
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\alloc\src\boxed.rs:2036
  12:     0x7ffb57ea71b7 - std::panicking::rust_panic_with_hook
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:799
  13:     0x7ffb4b100734 - ar_archive_writer[96f46fe156109c5a]::archive_writer::write_symbols
  14:     0x7ffb4b0f6029 - ar_archive_writer[96f46fe156109c5a]::archive_writer::write_symbols
  15:     0x7ffb4b0e3c13 - ar_archive_writer[96f46fe156109c5a]::archive_writer::write_symbols
  16:     0x7ffb4b195c6d - rustc_middle[9a5583d0f984d223]::util::bug::bug_fmt
  17:     0x7ffb4b1767bd - rustc_middle[9a5583d0f984d223]::ty::consts::const_param_default
  18:     0x7ffb4b1765fd - rustc_middle[9a5583d0f984d223]::ty::consts::const_param_default
  19:     0x7ffb4b195ba2 - rustc_middle[9a5583d0f984d223]::util::bug::bug_fmt
  20:     0x7ffb48d153a6 - <rustc_interface[5039fedd6fed528e]::passes::LintStoreExpandImpl as rustc_expand[8a362ccb6e11b5d0]::base::LintStoreExpand>::pre_expansion_lint
  21:     0x7ffb45d79bfb - llvm::DenseMap<llvm::StructType * __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyInfo,llvm::detail::DenseSetPair<llvm::StructType * __ptr64> >::~DenseMap<llvm::StructType * __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyI
  22:     0x7ffb45d8568d - llvm::DenseMap<llvm::StructType * __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyInfo,llvm::detail::DenseSetPair<llvm::StructType * __ptr64> >::~DenseMap<llvm::StructType * __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyI
  23:     0x7ffb57eb822d - alloc::boxed::impl$48::call_once
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\alloc\src\boxed.rs:2022
  24:     0x7ffb57eb822d - alloc::boxed::impl$48::call_once
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\alloc\src\boxed.rs:2022
  25:     0x7ffb57eb822d - std::sys::pal::windows::thread::impl$0::new::thread_start
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys\pal\windows\thread.rs:52   
  26:     0x7ffbb8b07374 - BaseThreadInitThunk
  27:     0x7ffbb965cc91 - RtlUserThreadStart

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.79.0 (129f3b996 2024-06-10) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type bin -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: cached cgu 58qpz0sqetpnq1gt should have an object file, but doesn't

error: could not compile `test-arca-ws` (bin "test-arca-ws") due to 1 previous error
Backtrace

running it with "RUST_BACKTRACE=1" gives exactly the same msg

@Andy-anyware Andy-anyware 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 Jan 3, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 3, 2025
@ChrisDenton
Copy link
Member

Do you get the same error with rust 1.82?

@Andy-anyware
Copy link
Author

Yes, but... as soon as i deleted target/ and re run cargo build (with 1.82) it worked. it seems to be my pc. not an error on rust. how can i remove this bug?

@jieyouxu
Copy link
Member

jieyouxu commented Jan 3, 2025

Two questions:

  1. How much disk space do you have left?
  2. Is your system under additional load at the time of compilation?

@jieyouxu
Copy link
Member

jieyouxu commented Jan 3, 2025

Oh right... The panic message is a bit unfortunate due to #132245 I think.

@Andy-anyware
Copy link
Author

Two questions:

1. How much disk space do you have left?

2. Is your system under additional load at the time of compilation?
  1. Less than 4gb... didn't realize that till you mention it!! SSD Western Black
  2. Not really, i3-12100 and 16gb ram running just youtube and vscodium.

@ChrisDenton
Copy link
Member

Running out of disk space would explain it. Though it would be better to have a proper error message.

@jieyouxu jieyouxu added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 3, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 3, 2025

Yeah, the ICE message could be better, but this is unfortunately resource exhaustion.

@saethlin
Copy link
Member

saethlin commented Jan 3, 2025

The error is at the bottom:

error: cached cgu 58qpz0sqetpnq1gt should have an object file, but doesn't

The reason we have a garbled diagnostic is that rustc implements fatal errors with unwinding, and cg_ssa has a highly custom thread pool implementation that thinks any thread unwinding is a panic. But in this case, it's not.

Now as to how a cached CGU ends up missing its object file, I have no idea.

See also
#120865
#132240

@saethlin
Copy link
Member

saethlin commented Jan 3, 2025

Note I don't think this counts as generalized resource exhaustion, the incr comp system should not have finalized an incomplete session directory. It's designed to not do that. But I think this diagnostic means it did. Yeah resource exhaustion is unfixable, but we're supposed to report it, not emit an incoherent ICE or SIGBUS/SIGSEGV like LLVM does.

@jieyouxu jieyouxu added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. and removed C-discussion Category: Discussion or questions that doesn't represent real issues. labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants