cargo test --workspace with the default parallel test threads intermittently dies with SIGSEGV around GPU test teardown. Observed locally on dev (2 of 3 runs) and on refactor/projection-self-ownership (1 of 5 runs); --test-threads=1 is stable across many runs on both branches.
The GPU tests each acquire their own adapter/device via gpu_or_skip(), so a parallel run creates and drops several GpuContexts concurrently. The crash pattern (segfault at teardown, timing-dependent, disappears single-threaded) points at a driver or wgpu instance teardown race between concurrent contexts rather than at any single test.
Not observed in CI so far (lavapipe adapter, RECO_REQUIRE_GPU=1).
Possible directions, unverified:
- share one
GpuContext across tests behind a OnceLock, dropping the per-test contexts entirely
- serialize GPU tests with a mutex in
test_support while leaving CPU tests parallel
- reproduce under a debugger to confirm the faulting component (driver vs wgpu) before choosing
cargo test --workspacewith the default parallel test threads intermittently dies with SIGSEGV around GPU test teardown. Observed locally on dev (2 of 3 runs) and on refactor/projection-self-ownership (1 of 5 runs);--test-threads=1is stable across many runs on both branches.The GPU tests each acquire their own adapter/device via
gpu_or_skip(), so a parallel run creates and drops severalGpuContexts concurrently. The crash pattern (segfault at teardown, timing-dependent, disappears single-threaded) points at a driver or wgpu instance teardown race between concurrent contexts rather than at any single test.Not observed in CI so far (lavapipe adapter,
RECO_REQUIRE_GPU=1).Possible directions, unverified:
GpuContextacross tests behind aOnceLock, dropping the per-test contexts entirelytest_supportwhile leaving CPU tests parallel