Repository: rust
Issue: -Zthreads causes rustfix/jobserver to deadlock
Labels: T-compiler,C-bug,I-hang,WG-compiler-parallel

```bash
git clone --recursive -b rustfix_deadlock_repro https://gitlab.com/lib.rs/main.git/
cd main
cargo +nightly fix --edition-idioms --all --allow-dirty
cargo +nightly fix --edition-idioms --all --allow-dirty
```

The config in `.cargo/config.toml` has `-Zthreads=10`. I'm running it on 16-core Apple M3 Max. I can also reproduce the deadlock with `-Zthreads=2`. It doesn't deadlock without `-Zthreads`. 

The deadlock happens reliably when running `cargo fix`. It doesn't happen when running `cargo test` or `cargo check`.

Cargo is waiting in `rustfix_crate` on a TCP read, waiting for `rustc` to give signs of life. It can get stuck with even a single `rustc` process running.

Rustc process is stuck here:

```
* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010d9929c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010e296584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010da4dc6c librustc_driver-ad3c18566d12557c.dylib`<rayon_core::thread_pool::ThreadPool>::wait_until_stopped + 272
    frame #4: 0x000000010e2e9958 librustc_driver-ad3c18566d12557c.dylib`rustc_interface::util::run_in_thread_pool_with_globals::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>> + 7224
    frame #5: 0x000000010e329b2c librustc_driver-ad3c18566d12557c.dylib`rustc_driver_impl::run_compiler + 6600
    frame #6: 0x000000010e335e20 librustc_driver-ad3c18566d12557c.dylib`rustc_driver_impl::main + 824
    frame #7: 0x00000001043f2cd0 rustc`rustc_main::main + 12
    frame #8: 0x00000001043f2c84 rustc`std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> + 12
    frame #9: 0x00000001043f2c9c rustc`std::rt::lang_start::<()>::{closure#0} + 16
    frame #10: 0x000000010ff27dd4 librustc_driver-ad3c18566d12557c.dylib`std::rt::lang_start_internal::he7368dee48875b7d + 1092
    frame #11: 0x00000001043f2d04 rustc`main + 52
    frame #12: 0x000000018a8a0274 dyld`start + 2840
  thread #2, name = 'ctrl-c'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010e2eb480 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<ctrlc::set_handler_inner<rustc_driver_impl::install_ctrlc_handler::{closure#0}>::{closure#0}, ()> + 48
    frame #2: 0x000000010e2fb4b0 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<ctrlc::set_handler_inner<rustc_driver_impl::install_ctrlc_handler::{closure#0}>::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 488
    frame #3: 0x000000010ff4ecc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #4: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
```

Backtrace from another run when there was only a single `rustc` process spawned:

```
bt all
* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x000000018abe26cc libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000018ac20894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x000000010c272390 librustc_driver-ad3c18566d12557c.dylib`<rayon_core::latch::LockLatch>::wait + 136
    frame #3: 0x000000010c275c4c librustc_driver-ad3c18566d12557c.dylib`<rayon_core::thread_pool::ThreadPool>::wait_until_stopped + 240
    frame #4: 0x000000010cb11958 librustc_driver-ad3c18566d12557c.dylib`rustc_interface::util::run_in_thread_pool_with_globals::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>> + 7224
    frame #5: 0x000000010cb51b2c librustc_driver-ad3c18566d12557c.dylib`rustc_driver_impl::run_compiler + 6600
    frame #6: 0x000000010cb5de20 librustc_driver-ad3c18566d12557c.dylib`rustc_driver_impl::main + 824
    frame #7: 0x0000000102cfecd0 rustc`rustc_main::main + 12
    frame #8: 0x0000000102cfec84 rustc`std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> + 12
    frame #9: 0x0000000102cfec9c rustc`std::rt::lang_start::<()>::{closure#0} + 16
    frame #10: 0x000000010e74fdd4 librustc_driver-ad3c18566d12557c.dylib`std::rt::lang_start_internal::he7368dee48875b7d + 1092
    frame #11: 0x0000000102cfed04 rustc`main + 52
    frame #12: 0x000000018a8a0274 dyld`start + 2840
  thread #2, name = 'ctrl-c'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010cb13480 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<ctrlc::set_handler_inner<rustc_driver_impl::install_ctrlc_handler::{closure#0}>::{closure#0}, ()> + 48
    frame #2: 0x000000010cb234b0 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<ctrlc::set_handler_inner<rustc_driver_impl::install_ctrlc_handler::{closure#0}>::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 488
    frame #3: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #4: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #3, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x0000000110e54098 librustc_driver-ad3c18566d12557c.dylib`<rayon_core::sleep::Sleep>::sleep + 744
    frame #4: 0x0000000110e53d5c librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::WorkerThread>::wait_until_cold + 324
    frame #5: 0x000000010c272764 librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 344
    frame #6: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #7: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #8: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #9: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #10: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #4, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #5, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #6, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #7, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #8, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
  thread #9, name = 'rustc'
    frame #0: 0x000000018abdfab0 libsystem_kernel.dylib`read + 8
    frame #1: 0x000000010c1ba9c0 librustc_driver-ad3c18566d12557c.dylib`<jobserver::imp::Client>::acquire_allow_interrupts + 60
    frame #2: 0x000000010cabe584 librustc_driver-ad3c18566d12557c.dylib`rustc_data_structures::jobserver::acquire_thread + 60
    frame #3: 0x000000010c2726bc librustc_driver-ad3c18566d12557c.dylib`<rayon_core::registry::ThreadBuilder>::run + 176
    frame #4: 0x000000010cb24070 librustc_driver-ad3c18566d12557c.dylib`<<crossbeam_utils::thread::ScopedThreadBuilder>::spawn<<rayon_core::ThreadPoolBuilder>::build_scoped<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 192
    frame #5: 0x000000010cb13414 librustc_driver-ad3c18566d12557c.dylib`std::sys::backtrace::__rust_begin_short_backtrace::<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()> + 32
    frame #6: 0x000000010cb230c8 librustc_driver-ad3c18566d12557c.dylib`<<std::thread::Builder>::spawn_unchecked_<alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output = ()> + core::marker::Send>, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 456
    frame #7: 0x000000010e776cc8 librustc_driver-ad3c18566d12557c.dylib`std::sys::pal::unix::thread::Thread::new::thread_start::hf11e21675a82323b + 52
    frame #8: 0x000000018ac202e4 libsystem_pthread.dylib`_pthread_start + 136
```


```
rustc 1.85.0-nightly (c44b3d50f 2024-12-03)
binary: rustc
commit-hash: c44b3d50fea96a3e0417e8264c16ea21a0a3fca2
commit-date: 2024-12-03
host: aarch64-apple-darwin
release: 1.85.0-nightly
LLVM version: 19.1.4
```