Skip to content

Deadlock after cargo clean / cargo build with "-Z threads=8" #117775

Closed
@mcskware

Description

@mcskware

Code

Somewhere in compiling winit, but atm I don't believe it's a problem with winit itself, as the backtrace indicated a deadlock.

Meta

This was after cargo clean / cargo build. Not 100% repro, but attaching the error log generated by the new multi-threaded compiler output.

rustc --version --verbose:

rustc 1.75.0-nightly (0f44eb32f 2023-11-09)
binary: rustc
commit-hash: 0f44eb32f1123ac93ab404d74c295263ce468343
commit-date: 2023-11-09
host: x86_64-pc-windows-msvc
release: 1.75.0-nightly
LLVM version: 17.0.4

Error output

[rustc-ice-2023-11-10T08_37_24-4604.txt](https://github.com/rust-lang/rust/files/13317340/rustc-ice-2023-11-10T08_37_24-4604.txt)
Backtrace

thread '<unnamed>' panicked at compiler\rustc_query_system\src\query\job.rs:543:9:
deadlock detected
stack backtrace:
   0:     0x7ffb6e26dc8f - std::backtrace::Backtrace::force_capture::h6aede448aae39e29
   1:     0x7ffb6e26dbf4 - std::backtrace::Backtrace::force_capture::h6aede448aae39e29
   2:     0x7ffb4fcd58c9 - <tracing_subscriber[de94de57bf501850]::fmt::format::Writer>::write_fmt
   3:     0x7ffb6e286793 - std::panicking::rust_panic_with_hook::hcb987b1ecc5fa88c
   4:     0x7ffb6e2865fb - <std::panicking::begin_panic_handler::StaticStrPayload as core::panic::PanicPayload>::take_box::hbc634cae263d72ff
   5:     0x7ffb6e2837d9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he80476ffca7049f1
   6:     0x7ffb6e286344 - rust_begin_unwind
   7:     0x7ffb6e2da847 - core::panicking::panic_fmt::hfa027a7b393787ab
   8:     0x7ffb51110582 - rustc_query_system[33dd738688d1d0a0]::query::job::deadlock
   9:     0x7ffb4fc7a3a3 - rustc_driver_impl[4b7af9b0a721c687]::init_env_logger
  10:     0x7ffb4fcb0d64 - <rustc_data_structures[1d787abe22cd578d]::hashes::Hash128 as core[501979ae5256a6aa]::fmt::Debug>::fmt
  11:     0x7ffb4fc7aad8 - rustc_driver_impl[4b7af9b0a721c687]::init_env_logger
  12:     0x7ffb6e2989fc - std::sys::windows::thread::Thread::new::h33d6c5598eae0caf
  13:     0x7ffbe4b0257d - BaseThreadInitThunk
  14:     0x7ffbe5a2aa78 - RtlUserThreadStart

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parallel-compilerArea: parallel compilerC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions