Skip to main content

ServerError

Enum ServerError 

Source
pub enum ServerError {
    Validation {
        message: String,
        backtrace: BackTrace,
    },
    Generic {
        reason: String,
        backtrace: BackTrace,
    },
    NoDeviceTransport {
        operation: Collective,
        backtrace: BackTrace,
    },
    ForeignHandle {
        handle: String,
        client: String,
        backtrace: BackTrace,
    },
    ServiceMismatch {
        client: String,
        requested: String,
        backtrace: BackTrace,
    },
    Launch(LaunchError),
    Io(IoError),
    TornDown,
    Unwritten {
        failure: u64,
        claimed: u32,
        chain: Vec<String>,
        root: Box<ServerError>,
        backtrace: BackTrace,
    },
    Skipped,
    Several {
        errors: Vec<ServerError>,
        backtrace: BackTrace,
    },
}
Expand description

Error that can happen asynchronously while executing registered kernels.

Variants§

§

Validation

A runtime validation error

Fields

§message: String

The details of the validation error.

§backtrace: BackTrace

The backtrace for this error.

§

Generic

A generic runtime error.

Fields

§reason: String

The details of the generic error.

§backtrace: BackTrace

The backtrace for this error.

§

NoDeviceTransport

The runtime has no transport between its devices, so the collective was not run. Its own variant rather than a Generic reason, so a caller can tell a runtime that cannot do this apart from a collective that failed.

Fields

§operation: Collective

The collective that was asked for.

§backtrace: BackTrace

The backtrace for this error.

§

ForeignHandle

A handle from one service was handed to a client of another: memory coordinates mean nothing there, so nothing was run.

Fields

§handle: String

The service whose memory the handle addresses.

§client: String

The service the client reaches.

§backtrace: BackTrace

The backtrace for this error.

§

ServiceMismatch

A caller named a server type the client does not reach. The client is erased over its server, so the type it is asked for is checked against the one it was built from, and nothing was run.

Fields

§client: String

The service the client reaches.

§requested: String

The server type the caller asked for.

§backtrace: BackTrace

The backtrace for this error.

§

Launch(LaunchError)

A launch error happened

§

Io(IoError)

An IO error happened

§

TornDown

The work writing this buffer was torn down before it could say what went wrong: its write scope never reached the exit that names the real failure, which a panic mid-launch explains.

This is the provisional error every write scope enters with, so it carries no payload and captures no backtrace — a launch that succeeds mints one and drops it again, and paying a String and a stack walk per launch for the message nobody normally reads is the whole reason it is a variant rather than a Generic.

§

Unwritten

The bytes asked about were never written: the work that was going to write them failed, or was skipped downstream of a failure. chain walks from the buffer asked about back toward the root, newest skip first, and root is the failure that started it.

Fields

§failure: u64

The failure’s id in the device’s error store, as printed by every other read that trips over the same failure.

§claimed: u32

How many buffers the failure still claims.

§chain: Vec<String>

The skip chain from the buffer asked about back toward the root.

§root: Box<ServerError>

The failure that started it, backtrace included.

§backtrace: BackTrace

Where the question was asked, so the lazy report and the read that tripped over it can be tied together.

§

Skipped

The work did not run, because an input it needed carried a failure.

The report is on the buffers: the work’s outputs claim the failure its inputs did, so a read of one of them names the root cause and the path back to it. This variant says only that the caller’s work was skipped, which is why it carries no payload — the failure the inputs held is not the caller’s to receive here, and minting a formatted message per skip would cost the loop that skips on every iteration.

§

Several

More than one thing went wrong at once, and the caller is owed all of them: a read naming buffers that several distinct failures claim, or a capture that was both doomed and abandoned.

Fields

§errors: Vec<ServerError>

The failures, in the order they were found.

§backtrace: BackTrace

The backtrace for this error.

Implementations§

Source§

impl ServerError

Source

pub fn no_device_transport(operation: Collective) -> ServerError

The error every collective returns on a runtime with no transport between devices.

Source

pub fn is_refusal(&self) -> bool

Whether this is the kernel being refused before it ran, rather than something going wrong while running it.

The distinction a test harness or an autotuner needs: a kernel a backend cannot build at this configuration is a candidate to drop or a case to skip, while a fault, an out-of-memory or an IO failure is a defect that has to be reported. Answering it by reading the message is how a harness ends up accepting the second as the first.

Walks Several and Unwritten to the roots, because a read of an unwritten buffer reports the failure that stopped its writer and that is where the distinction lives. A group answers yes only when every root does: one real failure among refusals is still a real failure, and an empty group refuses nothing.

Source

pub fn graph_state(reason: impl Into<String>) -> ServerError

A graph-capture call the stream’s lifecycle does not allow — a begin_capture without graph_prepare, a second overlapping capture, a replay of an unknown graph, or an operation a capture window cannot record. reason names the call and what was wrong with it.

Source

pub fn graph_capture_unsupported() -> ServerError

The error the default (unsupported) graph-capture methods return, for a backend that has no graph support at all.

Trait Implementations§

Source§

impl Clone for ServerError

Source§

fn clone(&self) -> ServerError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ServerError

Source§

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

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

impl<'de> Deserialize<'de> for ServerError

Source§

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

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

impl Display for ServerError

Source§

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

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

impl Error for ServerError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&ServerError> for ProfileError

A failure during a profiling window invalidates the measurement, whatever the failure was. Every backend answers a launch, write or replay failure this way, so the conversion lives here rather than five times over.

Source§

fn from(error: &ServerError) -> ProfileError

Converts to this type from the input type.
Source§

impl From<Box<ServerError>> for ProfileError

Source§

fn from(source: Box<ServerError>) -> ProfileError

Converts to this type from the input type.
Source§

impl From<IoError> for ServerError

Source§

fn from(source: IoError) -> ServerError

Converts to this type from the input type.
Source§

impl From<LaunchError> for ServerError

Source§

fn from(source: LaunchError) -> ServerError

Converts to this type from the input type.
Source§

impl Serialize for ServerError

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::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> AnyError for T
where T: Error + Send + Sync + 'static,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoComptime for T

Source§

fn comptime(self) -> Self

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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