#339

UniformPool.endFrame()/StructuredUniform.write() bypass the guarded queue: post-loss uploads silently discarded (Ring-1, preexisting)

Openmatiasngfopened 2mo ago

Summary

UniformPool.endFrame() and StructuredUniform.write() upload through the raw device.gpu.queue.writeBuffer, bypassing the guarded Device.queue wrapper. After a real device loss, those uploads are silently discarded — no VGPU-DEVICE-LOST, no error of any kind.

Scope

These are Ring-1 escape hatches constructed with new — vgpu does not use them internally, and every factory-created object was verified to fail noisily after loss (T04-11's device-loss QA matrix: no factory object silently discards GPU work). The gap is limited to apps that construct these two classes directly.

Evidence / provenance

Found during the adversarial QA of T04-11 04/device-loss on the 0.4 train, verified preexisting (byte-identical code on the pre-branch base). Full instance-method matrix and repro in the QA harness: /tmp/debug/scripts/vgpu-t04-11-device-loss-qa/.

Related but distinct: the narrow timer/visibility gap (#assertUsable checks the object's own disposed flag, never device state) is pinned with a tripwire test in the T04-11 branch itself ("KNOWN GAP (T04-11 scope decision)") — it leaks a handle, not data.

Ask

Route these two upload paths through the guarded Device.queue wrapper (or add the device-state assert at the call sites), so post-loss uploads fail with VGPU-DEVICE-LOST like every other write path.

Activity

1
scs02092mo ago

I'd like to work on this if no one is already on it — route both paths through device.queue.writeBuffer and add device-loss regression tests following the existing VGPU-DEVICE-LOST patterns. Happy to step back if you're already planning to land this on the 0.4 train.