Commit Graph
4 Commits
Author SHA1 Message Date
FredApps a348a2a460 test(gpu): treat an already-answered request as a skipped smoke check; test_gpu waits without limit
The zero-timeout smoke tests now skip, instead of failing, if the driver
answered first, whether with a success or an initialization error.
test_gpu waits for its timed-out request without a limit while it holds the
GPU lock. A request that never finishes then shows up as a slow test,
instead of the next GPU test starting beside it.

Signed-off-by: FredApps <[email protected]>
2026-11-18 16:31:19 +07:00
FredApps e10c6ec6fe test(gpu): wait for a timed-out request under the GPU lock, and skip when none timed out
bounded_readback's test_gpu now waits for its own timed-out request before
releasing GPU_LOCK, so the next GPU test doesn't start beside a request still
inside the driver. init_timeout no longer reads the process-wide count. The
renderer test skips if the driver answered before the zero timeout, instead of
failing.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:57:34 +07:00
FredApps c06ae97029 fix(gpu): wait for this renderer's own timed-out request, and test it without a driver
Review follow-ups:

- A timed-out request now returns `GpuContextError::TimedOut` with an
  `AbandonedRequest` handle (same message as before). `GpuRenderer`
  keeps only its own handle and waits on that when dropped, so an
  ordinary adapter failure no longer waits for another renderer's
  abandoned request.
- The result goes through a rendezvous channel, and the receiver is
  dropped on timeout, so an unclaimed context is dropped on the worker
  before the request counts as finished.
- The timeout is now `run_with_timeout`, unit-tested with held work:
  it counts as running until released, and an unclaimed result is
  dropped first.
- The docs say what a `false` from either wait means.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:44:03 +07:00
FredApps 8543937a76 fix(gpu): wait for a timed-out GPU request before the process exits
`NativeContext::request` gives up after its timeout (10 s by default) but
leaves its `pc_gpu_init` thread inside wgpu and the driver. When the
process then exits, the driver is torn down under that thread, and
Lavapipe crashes the process: on a loaded CI runner two headless GPU
tests took the "no GPU adapter available" path, printed ok, and then
died with SIGSEGV ("error: scalar-to-vector conversion failed" from
LLVM) as the test process exited (#9824's Ubuntu gate).

Count the initialization threads a request gave up on, and add
`NativeContext::wait_for_abandoned_requests(limit)` to wait for them.
A `GpuRenderer` whose request failed now waits (at least 30 s, bounded)
for its abandoned request when it is dropped, so the process no longer
exits under it.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:25:11 +07:00