pub struct ObjectArenaExhausted {
pub objects: usize,
}Expand description
The target refused to materialise a kernel object a mutex needs.
§The defect this closes
A VxWorks pthread mutex has no kernel SEMAPHORE until its first lock:
pthread_mutex_init only stamps the magic, and pthreadMutexInit calls
semMCreate from inside pthread_mutex_lock. When that returns NULL the
chain hands back 0x16 — EINVAL, not ENOMEM — and std::sync::Mutex
turns it into “failed to lock mutex: invalid argument (os error 22)” and
panics. Measured on target at 588 live semaphores with 49 sets / 98
workers / 48 connections; the panicking worker took its set with it.
It is not a total. Creation resumed past 1,024 objects after that NULL, so
the arena is a transient refusal and a byte or count budget is the wrong
shape for it — there is no per-thread figure to add to
PER_THREAD_OBJECT_ARENA, and a cap set at 588 would refuse connections a
moment later than the target would have served them. What a transient
refusal needs is for the rate of creation to bend to the target, which is
what this gate does: the pool asks for the object at a point where “no”
costs one refusal, and the client’s retry is the pacing.
§Why this is not its own AcquireError variant
It rides as the payload of AcquireError::SpawnFailed, whose meaning it
shares exactly — the target said no, and the pool’s own bounds were never
reached. A consumer that needs to tell an arena refusal from a stack refusal
downcasts, so the discriminator is a type rather than the message prose that
AcquireError exists to stop consumers parsing.
Fields§
§objects: usizeHow many objects the set needed — one per worker.
Trait Implementations§
Source§impl Clone for ObjectArenaExhausted
impl Clone for ObjectArenaExhausted
Source§fn clone(&self) -> ObjectArenaExhausted
fn clone(&self) -> ObjectArenaExhausted
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ObjectArenaExhausted
Source§impl Debug for ObjectArenaExhausted
impl Debug for ObjectArenaExhausted
Source§impl Display for ObjectArenaExhausted
impl Display for ObjectArenaExhausted
Source§impl Error for ObjectArenaExhausted
impl Error for ObjectArenaExhausted
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()