Repository navigation
vk_fuzz_run: stop hung GPU processes with the shared timeout - #8205
WebIdentity1 wants to merge 1 commit into
Conversation
|
All three vk_fuzz timeout tests passed on Windows at AI-assisted verification. |
ihymonte
left a comment
There was a problem hiding this comment.
Tested 40cc2d2 merged with main dde82f2 on macOS (Apple Silicon arm64), Python 3.12.16 (CPU only, no GPU, no game files): pass
python3.12 -I tests/test_vk_fuzz_timeout.py: 3/3 passed (real hung child subprocesses killed cleanly,workdir removed, no retries).- Related suites:
test_vk_fuzz_run.py(11/11),test_gpu_test_timeout.py(8/8),test_pk16_diff.py(16/16),test_vint_diff.py(19/19),test_sdwa_diff.py(22/22),test_wint_diff.py(19/19),test_fmisc_diff.py(25/25),test_ci_registration.py(14/14). - Negative control (reverted
tools/vk_fuzz_run.py):test_vk_fuzz_timeout.pyfails as expected (2 failures, 1 error). py_compileandscripts/check_no_game_data.pyon both touched files: clean.- Code audit: reuses
gpu_test_timeout()/timed_out()fromruntime/test/shaders/check.py, aborts retry/outer loops immediately onTimeoutExpired, and all 5 fuzzer CLIs catchRuntimeError-> exit 2 and close the oracle.
AI-assisted (Antigravity).
cryptocxeq
left a comment
There was a problem hiding this comment.
Independent CPU regression review of 40cc2d20b14a835a1a4843c13f3861681df59fd4, patch applied to main dde82f27e994337094afc476ded0b1426f6e87e2. No blocking findings in the reviewed change.
The GPU child alone receives the shared timeout; assembly and translation behavior are unchanged. TimeoutExpired becomes RuntimeError outside the retry loop, so a hang cannot be retried or misreported as an unsupported skip. Temporary work is cleaned by the existing finally. The test really runs a sleeping Python subprocess, replaces only unavailable compiler/GPU work, checks disabled/default timeout controls and verifies all five fuzzer CLIs return harness error 2.
Native Windows / CPython 3.11.15; synthetic inputs only, no game files or hardware oracle.
python -I tests/test_vk_fuzz_timeout.py: exit 0, 3 tests.- Same test with only implementation files restored to main: exit 1, failures=2, errors=1.
git diff --check passed. This is a focused CPU review, not a full-project or GPU validation run.
Claim: #8047 (comment)
AI-assisted (OpenAI Codex).
Claimed in the coordination issue as: #8047 (comment) (new TEST item; carried forward to #8186).
Depends on: #4426 (textual overlap on the GPU subprocess call; retain its
errors="replace"alongside this PR'stimeout=limitwhen combining).What and why
The shared Vulkan fuzzer runner invokes
vk_compute_testwithout a deadline. A hung shader or driver can therefore stall all five--oracle hw,vkdifferential fuzzers indefinitely, despite the GPU test suite already having a configurable timeout.Reuse
check.gpu_test_timeout()andtimed_out()so each GPU process honorsLEONIDA_GPU_TEST_TIMEOUT(default 120 seconds, 0 disables).subprocess.runkills and waits for an expired child. RaiseRuntimeErrorwith the program name: the five existing CLI handlers report a harness error and exit 2. A timeout aborts immediately, without retrying the hung program or counting it as an unsupported skip. The existingfinallycleans the scratch directory.The separate dump-sizing change in #7756 applies cleanly alongside this change and passes combined tests. The translator-return-code claim at #8047 (comment) changes a different subprocess call. This PR leaves assembly/translation execution policy unchanged.
Tested
macOS 27.2, Apple Silicon, Python 3.14.7, pinned test dependencies. No GPU/driver, llvm-mc or game files used. Assembly and translation are stubbed in the new regression tests; the child process and timeout are real Python subprocesses.
dde82f27e994337094afc476ded0b1426f6e87e2: the hanging-child test fails because no timeout error is raised; normal-result/timeout-disabled controls pass.python -I tests/test_vk_fuzz_timeout.py: 3 tests pass, including all five fuzzer CLIs, one-attempt timeout, work-directory cleanup, successful readback, default timeout, and timeout disabled.python -m pytest -q tests/test_vk_fuzz_timeout.py tests/test_vk_fuzz_run.py tests/test_gpu_test_timeout.py tests/test_pk16_diff.py tests/test_vint_diff.py tests/test_sdwa_diff.py tests/test_wint_diff.py tests/test_fmisc_diff.py: 123 passed, 116 subtests passed.python -I tests/test_ci_registration.py: 14 tests pass.python -I scripts/run_semantic_tests.py tests/semantic -j 8: 447 files, 5,956 tests; 2 failing files (test_image_atomics_guard,test_image_store_d16). All 48 failing test/subtest identifiers match the failures previously reproduced on untouched, unchanged maindde82f27e994337094afc476ded0b1426f6e87e2. The full suite is not green on this base.python -m compileall -q make_game.py tools tests,python -I make_game.py --help, changed-filecheck_no_game_data.py, andgit diff --check: passed.This verifies subprocess timeout/error propagation, not recovery of a real hung GPU driver.
AI-assisted: yes.
Checklist