DualFailureDumpReport

Struct DualFailureDumpReport 

Source
#[non_exhaustive]
pub struct DualFailureDumpReport { pub schema: String, pub early: Option<FailureDumpReport>, pub late: FailureDumpReport, pub early_max_age_jiffies: u64, pub early_threshold_jiffies: u64, pub early_skipped_reason: Option<String>, }
Expand description

Pair of failure-dump snapshots captured at two points in a stall.

early is taken when the host-side runnable_at scanner observes any task with jiffies - p->scx.runnable_at > watchdog_timeout/2 (mirrors the kernel’s check_rq_for_timeouts walk over rq->scx.runnable_list). late is taken at the same trigger as the single-snapshot path: the BPF probe’s ktstr_err_exit_detected latch flipping after a sched_ext error-class exit.

early == None when the watchdog half-way threshold never triggered before late fired (e.g. an immediate scheduler error in init_task before any task became runnable). Diffing late against early shows what BPF state changed during the stall window — the value-add over the single-snapshot dump.

No user toggle — auto-repro engages this automatically. Only the auto-repro VM emits this shape; crate::test_support::probe::attempt_auto_repro is the single call site flipping the builder’s dual_snapshot flag, and there is no public ktstr surface for asking for it from a primary VM. Test authors don’t need to know about it — when an auto-repro fires, the file at <test>-<variant_hash>.repro.failure-dump.json changes shape from FailureDumpReport to this wrapper.

Note: there is no Default impl. The late field is required by the doc invariant (“the freeze coordinator only writes a DualFailureDumpReport after the late snapshot has been captured”); a Default::default() would have produced a wrapper with an empty late report whose maps/vcpu_regs vectors silently lie about a successful capture. Construct via the struct literal with an explicit late: FailureDumpReport.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§schema: String

Wire-format discriminant. Always "dual" for this variant, pinning SCHEMA_DUAL. Mirror of FailureDumpReport::schema — consumers branch on it before deserializing.

§early: Option<FailureDumpReport>

Snapshot at the watchdog half-way point. None when the stall fired before the half-way scanner crossed its threshold.

§late: FailureDumpReport

Snapshot at the error-exit latch trigger. Always present (the freeze coordinator only writes a DualFailureDumpReport after the late snapshot has been captured; if the run ends with only an early snapshot the file is not written at all).

§early_max_age_jiffies: u64

Maximum jiffies - p->scx.runnable_at observed by the runnable_at scanner at the moment the early snapshot fired. Zero when early is None.

To recover the kernel’s full watchdog_timeout, double Self::early_threshold_jiffies — the scanner trigger fires at half the watchdog, so the threshold field carries watchdog_timeout / 2. Diff early_max_age_jiffies against 2 * early_threshold_jiffies to see how close the system was to the SCX_EXIT_ERROR_STALL emission line at the early-trigger point.

§early_threshold_jiffies: u64

The half-way trigger threshold the scanner compared against when capturing the early snapshot, expressed in guest jiffies. Equals (watchdog_timeout_ms * CONFIG_HZ) / 1000 / 2 at the moment the snapshot fired. Zero when early is None.

Surfaced alongside early_max_age_jiffies so a downstream consumer reading the JSON does not have to recompute the kernel-internal jiffies arithmetic to reproduce the trigger condition.

§early_skipped_reason: Option<String>

Structured reason the early snapshot is absent. None when the early snapshot was captured (the Self::early field is Some). When the early field is None, this carries a short machine-friendly string identifying which of the known failure modes occurred:

  • "scan prerequisites unavailable: <prereq>" — the per-CPU runnable_at scan never resolved its dependencies (most often <prereq> names the missing kernel symbol / BTF entry).
  • "max_age never crossed threshold (peak={peak}j, threshold={threshold}j)" — the scan ran but the maximum observed runnable-age stayed below the half-way mark for the whole VM lifetime. Indicates a non-stall err-class exit (e.g. scx_bpf_error()).
  • "scx_tick stall — no per-task runnable_at data" — the stall path that drove the late capture has no per-task runnable_at to scan (the kernel’s “watchdog failed to check in” path raises SCX_EXIT_ERROR_STALL from the scx_tick kernel side without any task on rq->scx.runnable_list).

Display rendering at super::display surfaces this string directly; the previous “stall fired before half-way threshold, or runnable_at scan setup failed” generic text is replaced with the structured reason whenever this field is Some.

Trait Implementations§

Source§

impl Clone for DualFailureDumpReport

Source§

fn clone(&self) -> DualFailureDumpReport

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DualFailureDumpReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DualFailureDumpReport

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for DualFailureDumpReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for DualFailureDumpReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,