#[non_exhaustive]pub struct DegradedFailureDumpReport {
pub schema: String,
pub reason: String,
pub vcpu_regs: Vec<Option<VcpuRegSnapshot>>,
pub watchpoint_hit: bool,
pub bss_latch_state: String,
pub exit_kind: Option<u32>,
pub elapsed_ms: u64,
}Expand description
Top-level degraded failure-dump report. Emitted by the freeze
coordinator when a real error-class trigger fires but the dump
path aborts before a full FailureDumpReport can be captured —
today only the vCPU rendezvous-timeout path produces this shape.
Carries the partial state the coordinator did collect (per-vCPU
registers from any vCPU that parked before timeout) plus the
observable trigger state at the moment of degradation
(watchpoint hit, BPF .bss latch status, live exit_kind if the
gate read it). An operator inspecting the JSON learns WHY the
dump degraded from the reason field and WHICH vCPUs stalled
from the vcpu_regs Vec’s per-slot None / Some pattern.
Schema discriminant: SCHEMA_DEGRADED. Parsed via the same
FailureDumpReportAny::from_json dispatcher as the other two
variants.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.schema: StringWire-format discriminant. Always "degraded" for this
variant, pinning SCHEMA_DEGRADED. Mirror of
FailureDumpReport::schema / DualFailureDumpReport::schema
— consumers branch on it before deserializing.
reason: StringOperator-readable reason the dump degraded. Carries one of
the REASON_DEGRADED_* constants as the canonical prefix,
followed by dynamic detail filled in at emit time (e.g.
timeout milliseconds, parked-vCPU counts). Stable wire format
per the SCHEMA_DEGRADED discriminant contract: new degraded
causes add new REASON_DEGRADED_* constants rather than
mutating the existing ones.
vcpu_regs: Vec<Option<VcpuRegSnapshot>>Per-vCPU register snapshots collected before degradation.
Index matches vCPU id (BSP at 0, APs at 1..N). None entries
identify the vCPUs that never parked (the operator’s
signal for which vCPUs stalled) — distinct from
FailureDumpReport::vcpu_regs’s None, which usually
means KVM_GET_REGS failed mid-shutdown.
watchpoint_hit: boolHardware-watchpoint hit state at degradation. true when
the freeze-coordinator’s *scx_root->exit_kind watchpoint
fired on a vCPU thread; false when only the BPF .bss
latch fired (or the trigger source was a deferred-capture
request).
bss_latch_state: StringBPF probe .bss latch state at degradation. One of
"triggered" (probe latched err exit), "not_triggered"
(latch readable, value still 0), "out_of_bounds" (cached
.bss PA no longer 4-byte-readable — probe map freed
mid-run), or "not_resolved" (cached .bss PA was never
populated). Mirror of crate::vmm::freeze_coord’s
internal BssReadState enum, serialised as the snake-case
of each variant. String-typed for wire-format stability with
the rest of the REASON_* / state-name surface — see
SCHEMA_DEGRADED for the contract.
exit_kind: Option<u32>Live *scx_root->exit_kind value at degradation, when the
gate read it. None when the dump path aborted before
reaching the gate (rendezvous timed out earlier) or when the
KVA translation failed. Some(kind) carries the raw u32
from enum scx_exit_kind — operators read it against
the kernel’s scx_exit_kind enum definition to identify
whether the scheduler’s intended exit class matched the
trigger that fired.
elapsed_ms: u64Wall-clock milliseconds from the freeze trigger (capture
start) to the degraded-emit decision. Lets an operator see
how long the coordinator spent trying to capture before
giving up. Mirrors the elapsed_ms field
FailureDumpReport surfaces via the post-dump log line —
here it’s structured so consumers can read it without
parsing the log.
Trait Implementations§
Source§impl Clone for DegradedFailureDumpReport
impl Clone for DegradedFailureDumpReport
Source§fn clone(&self) -> DegradedFailureDumpReport
fn clone(&self) -> DegradedFailureDumpReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DegradedFailureDumpReport
impl Debug for DegradedFailureDumpReport
Source§impl<'de> Deserialize<'de> for DegradedFailureDumpReport
impl<'de> Deserialize<'de> for DegradedFailureDumpReport
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 DegradedFailureDumpReport
impl Display for DegradedFailureDumpReport
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Renders the degraded report as a short operator-oriented
banner: schema label, the human reason, the per-vCPU
parked / not_parked pattern that identifies which vCPUs
stalled, the watchpoint + bss latch state, the optional
live exit_kind, and the elapsed-ms budget the coordinator
spent before giving up. Designed to fit a single terminal
scroll without paging — the full diagnostic surface lives
in the structured fields.
Auto Trait Implementations§
impl Freeze for DegradedFailureDumpReport
impl RefUnwindSafe for DegradedFailureDumpReport
impl Send for DegradedFailureDumpReport
impl Sync for DegradedFailureDumpReport
impl Unpin for DegradedFailureDumpReport
impl UnwindSafe for DegradedFailureDumpReport
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<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