#[non_exhaustive]pub enum MissingStatsReason {
NoSchedulerBinary,
NoScheduler {
reason: String,
},
DuringFreeze,
Cancelled,
SchedulerError {
errno: i32,
args: Value,
},
MissingResp {
args: Value,
},
RequestTooLarge {
size: usize,
max: usize,
},
ResponseTooLarge {
size: usize,
max: usize,
},
MutexPoisoned,
}Expand description
Why a sample’s stats slot is unavailable — carried on
SnapshotError::MissingStats so operator diagnostics name
the specific failure mode rather than the generic “stats
absent”. Built by From<&crate::vmm::sched_stats::SchedStatsError>
for the relay-failure path, plus dedicated variants for the
pre-client gates that the crate::vmm::SchedStatsError enum doesn’t
cover (no scheduler binary configured).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoSchedulerBinary
No scheduler_binary was configured on the run, so the
freeze coordinator never wired a crate::vmm::SchedStatsClient.
Every periodic sample bypasses the stats request entirely
and lands here.
NoScheduler
The guest relay never connected to the scheduler’s Unix socket (no scheduler running, or the scheduler refused the connection).
DuringFreeze
The host-side coordinator marked the run as freezing while this stats request was in flight (or about to start); scx_stats responses are undefined while the scheduler’s userspace thread is paused.
Cancelled
The run-wide cancel flag was set (watchdog fired or the run is shutting down) while this stats request was in flight or about to start.
SchedulerError
The scheduler returned a non-zero errno in the typed
crate::vmm::StatsResponse envelope. The args payload is preserved
so operators can render the scheduler-side message.
MissingResp
The typed envelope was decoded but the inner args map
did not contain the expected "resp" key — protocol
mismatch with the scheduler.
RequestTooLarge
The caller passed a stats request larger than the client’s
crate::vmm::sched_stats::MAX_REQUEST_BYTES cap.
ResponseTooLarge
The scheduler’s response grew past
crate::vmm::sched_stats::MAX_RESPONSE_BYTES without ever emitting a newline.
MutexPoisoned
The shared response mutex was poisoned by a previous panic; the stats client cannot recover for this sample.
Trait Implementations§
Source§impl Clone for MissingStatsReason
impl Clone for MissingStatsReason
Source§fn clone(&self) -> MissingStatsReason
fn clone(&self) -> MissingStatsReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MissingStatsReason
impl Debug for MissingStatsReason
Source§impl<'de> Deserialize<'de> for MissingStatsReason
impl<'de> Deserialize<'de> for MissingStatsReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for MissingStatsReason
impl Display for MissingStatsReason
Source§impl From<&Error> for MissingStatsReason
impl From<&Error> for MissingStatsReason
Source§fn from(e: &Error) -> Self
fn from(e: &Error) -> Self
Downcast the anyhow chain to a typed
crate::vmm::SchedStatsError
when one is present (every SchedStatsClient failure path
boxes a typed variant via anyhow::anyhow!(SchedStatsError::…),
so the downcast succeeds on every well-formed sched_stats
error). Falls back to MissingStatsReason::NoScheduler
carrying the rendered display when the downcast fails — that
covers serde / IO / other errors that didn’t originate inside
crate::vmm::SchedStatsClient but still surface through the same
Result<_, anyhow::Error> return.
Source§impl Hash for MissingStatsReason
impl Hash for MissingStatsReason
Source§impl PartialEq for MissingStatsReason
impl PartialEq for MissingStatsReason
Source§impl Serialize for MissingStatsReason
impl Serialize for MissingStatsReason
impl Eq for MissingStatsReason
impl StructuralPartialEq for MissingStatsReason
Auto Trait Implementations§
impl Freeze for MissingStatsReason
impl RefUnwindSafe for MissingStatsReason
impl Send for MissingStatsReason
impl Sync for MissingStatsReason
impl Unpin for MissingStatsReason
impl UnwindSafe for MissingStatsReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more