dbt-labs/dbt-core · error
waker missing
Error message
waker missing
What it means
wake_join wakes the task blocked on a JoinHandle by invoking the waker previously registered with the task. If the waker slot is None — the join waker was never registered (task not being awaited) or was already taken — the library panics with 'waker missing' rather than silently dropping the wake. This is an internal contract: wake_join must only be called while a join waker is stored.
Source
Thrown at crates/dbt-runtime/src/task/core.rs:494
hooks,
}
}
pub(super) unsafe fn set_waker(&self, waker: Option<Waker>) {
self.waker.with_mut(|ptr| {
*ptr = waker;
});
}
pub(super) unsafe fn will_wake(&self, waker: &Waker) -> bool {
self.waker
.with(|ptr| (*ptr).as_ref().unwrap().will_wake(waker))
}
pub(super) fn wake_join(&self) {
self.waker.with(|ptr| match unsafe { &*ptr } {
Some(waker) => waker.wake_by_ref(),
None => panic!("waker missing"),
});
}
}
#[test]
fn header_lte_cache_line() {
assert!(size_of::<Header>() <= 8 * size_of::<*const ()>());
}
#[cfg(test)]
mod tests {
use super::*;
use std::sync::{Arc, Mutex};
use std::task::Waker;
use tracing::instrument::Instrumented;
View on GitHub (pinned to 0267ce9170)
Solutions
- Report to dbt-runtime maintainers with a reproducer; this indicates a scheduler/waker lifecycle bug
- Update dbt-runtime to the latest version in case the race is fixed
- Add logging around join/drop of JoinHandles to narrow the interleaving that clears the waker before wake_join runs
Defensive patterns
Strategy: try-catch
Try / catch
// Internal scheduler path; at an integration boundary: std::panic::catch_unwind(|| task.wake_join()).map_err(|_| "waker lifecycle bug")?;
Prevention
- Keep dbt-runtime updated; this is a library-internal invariant
- Reproduce races under stress tests with many join/drop interleavings
- Never drive task internals outside the runtime's scheduler
- Report occurrences with interleaving details to maintainers
When it happens
Trigger: An internal wakeup path (task completion notifying the JoinHandle's waiter) fires when no waker is registered — e.g. a race or misuse in task scheduling code that calls wake_join without a prior registration of the join waker.
Common situations: Encountered almost exclusively when debugging dbt-runtime/task scheduling internals or when reproducing scheduler races; end users normally never trigger it through public APIs.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- {e} {:?}
- {e}
- inconsistent park_timeout state: {n}
- inconsistent state in unpark
- failed to generate unique thread ID: bitspace exhausted
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/93aeaccea3590214.
Report an issue: GitHub.