diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs index 2f48583f0beed..a237e7610a392 100644 --- a/compiler/rustc_query_impl/src/execution.rs +++ b/compiler/rustc_query_impl/src/execution.rs @@ -14,7 +14,7 @@ use rustc_middle::query::{ use rustc_middle::ty::TyCtxt; use rustc_middle::verify_ich::incremental_verify_ich; use rustc_span::{DUMMY_SP, Span}; -use tracing::warn; +use tracing::debug; use crate::dep_graph::{DepNode, DepNodeIndex}; use crate::handle_cycle_error; @@ -100,7 +100,12 @@ fn collect_active_query_jobs_inner<'tcx, C>( for shard in query.state.active.try_lock_shards() { match shard { Some(shard) => collect_shard_jobs(&shard), - None => warn!("Failed to collect active jobs for query `{}`!", query.name), + // This collection is best-effort (it is only used to print the query + // stack on panic), so a contended shard is expected and fine to skip. + // Emitting this at `warn!` would leak nondeterministically into the + // panic output under the parallel front-end, where another thread may + // still hold a shard lock, so keep it at `debug!`. + None => debug!("Failed to collect active jobs for query `{}`!", query.name), } } } diff --git a/tests/ui/resolve/proc_macro_generated_packed.rs b/tests/ui/resolve/proc_macro_generated_packed.rs index e35f50911663c..a8175895af04b 100644 --- a/tests/ui/resolve/proc_macro_generated_packed.rs +++ b/tests/ui/resolve/proc_macro_generated_packed.rs @@ -1,6 +1,6 @@ //! This test ICEs because the `repr(packed)` attribute //! was generated by a proc macro, so `#[derive]` didn't see it. -//@ ignore-parallel-frontend failed to collect active jobs + //@proc-macro: proc_macro_generate_packed.rs //@known-bug: #120873 //@ failure-status: 101