From e8f1918b17d06bcbfc62309031a7311444154c97 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 28 Feb 2025 18:43:06 +0800 Subject: [PATCH] resume one waiter at once --- compiler/rustc_query_system/src/query/job.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index a8c2aa98cd083..3290227f9b145 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -488,6 +488,11 @@ pub fn break_query_cycles(query_map: QueryMap, registry: &rayon_core::Registry) while jobs.len() > 0 { if remove_cycle(&query_map, &mut jobs, &mut wakelist) { found_cycle = true; + + // FIXME: Resume all the waiters at once may cause deadlocks, + // so we resume one waiter at a call for now. + // Remove this when we figure out the real reason. + break; } }