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

  1. Report to dbt-runtime maintainers with a reproducer; this indicates a scheduler/waker lifecycle bug
  2. Update dbt-runtime to the latest version in case the race is fixed
  3. 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

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


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/93aeaccea3590214. Report an issue: GitHub.