Files
nvdriver/reports/gpu-instances-pending.txt
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

47 lines
3.1 KiB
Plaintext

Owned pending RM instance retention
Problem: borrowed Reservation previously rolled back on Drop. If PfSoftware
construction had allocated resources and its close failed, dropping that borrowed
reservation could allow another GPU to reuse the instance while the first GPU's
partial resources remained owned.
New transition: Reservation::retain_for_cleanup consumes the borrowed reservation,
marks that same occupied slot pending, and returns a non-Clone PendingInstance.
It ends the exclusive allocator borrow, allowing other GPUs to construct while
failed cleanup retains the actual instance slot. The token has private allocator
identity, full-width monotonic u64 epoch and bounded u32 instance. It contains no
reference, pointer, lifetime transmute or GPU lease. This is a failed-construction
cleanup credential, not an Instance, initialized GPU, resource allocation grant
or StateInit/Load receipt. No pending-to-committed conversion exists.
Instances::release_pending consumes the credential only after the enclosing owner
has really destroyed its partial resources. Foreign allocator, stale epoch, wrong
slot kind and out-of-range index return PendingReleaseFailure containing both
status and the original credential. The allocator validates bounds before shifts
or array access. A failed validation never clears a slot. A separate pending bit
mask prevents an internally forged committed credential from releasing pending
state, or vice versa. Epoch exhaustion fails without wrapping and still permits
teardown of existing pending state. Dropping/loss of the owned token intentionally
does not release its slot: leaking occupancy is safer than reusing a failed graph.
Existing live_count counts all occupied slots, now explicitly including pending
failed constructions; manager shutdown must wait for those too. pending_count
reports the retained subset. Normal Reservation Drop still rolls back a cleanly
failed/no-resource construction, and normal commit/release behavior is unchanged.
The enclosing parent must choose the retention transition whenever cleanup fails;
this core allocator cannot determine whether independent GPU resources were freed.
Validation: eight focused Rust tests pass. New tests cover two failed graph-close
attempts with unrelated allocations in between and final idempotent close; foreign
allocator retaining the credential; adversarial stale/replayed/wrong-kind tokens;
all32 pending slots and highest slot31 reuse; full-width u64 epoch exhaustion;
and invalid32/256/u32MAX indices without truncation/panic. Private test-only token
copies deliberately exercise validation even though the public API is linear.
Existing generated vectors and next_instance policy are unchanged. The independent
whole-original031359 instruction oracle still passes193 cases with --check. That
original oracle proves allocation selection policy, while the new failure tests
prove Rust ownership retention; the original has no Rust PendingInstance API.
Strict core all-target Clippy and focused rustfmt checks pass. No kernel manager,
per-device constructor, common build file or hardware state is changed here.
Root owns parent integration and real PfSoftware cleanup-failure injection.