fix(agc): harden host import construction and mutation waits #2779
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2779"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by nikhilpanchal1 on 2026-10-10T14:37:11Z.
What
Follow-up to #2575, which merged MarcZX100's fix for #2352. Clean up incomplete Vulkan host imports before releasing their allocation pins. Install the mutation waiter centrally for descriptor-first imports, release completed batch holds during nested waits, reject pinned mutations in active completion callbacks, and propagate waiter errors after restoring the registry lock.
#1357, #1359 and #1361 cover related retirement ownership; that work is excluded. #1961 installs a waiter for its new map-time imports. This change covers existing descriptor-first imports centrally. #2283 changes kept-byte accounting; #290 adds import windows, eviction and memory-pressure release waits. Its pressure relief returns when the caller holds the GPU lock. These PRs touch related functions but do not implement the remaining safeguards here.
Tested
Linux x86-64 Release, Mesa 26.1.6 llvmpipe, Vulkan required. Full build and runtime library patching pass. Eight isolated cases fail
mainat5edae353and pass here; three controls pass both. Native guest APIs and a relinker-converted ELF exercise real Vulkan fills/copies and memory mutations, including Linux heap cache reuse and uncached reset/release. All nine runnable new tests pass 50 times with the shader cache disabled: 450 executions.Full suite: 670 passed, 37 skipped, two failed. All 698 existing tests retain their baseline results, including the same f32 denormal and f64 FMA failures. Two new write-watch tests skip because
userfaultfdis unavailable; the skip audit rejects those plus existingagc_write_tracking. Conventions and test registration pass. Windows, NVIDIA, DMA-buf chunks and Windows heap caching remain untested.Checklist
mainat5edae353; related open PRs reviewed and function overlaps disclosed aboveImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T14:37:21Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by zaydzaari on 2026-10-10T15:39:23Z.
Windows/NVIDIA validation — RTX 5070
Tested PR #2779 on Windows 11 using an NVIDIA RTX 5070 and MinGW-w64 GCC 15.2.0.
Revisions
5edae35361e9b7f7061f28c6e80ed075312b8105db76c694378824b950a74565ec4aa458d52db5cfResults
agc_driver_host_import_lifetime: failed (timeout waiting 2000 ms for lease; unreleased kept lease in deferred batches)agc_driver_host_import_mutation_race: failed (registry lock left unlocked on pin waiter exception)host_import_lifetime,host_import_mutation_race,guest_memory_lifetime, andhost_import_teardown)Notable observations
Recorder::ReleaseCompletedKeeps().VK_ERROR_DEVICE_LOST), crashes, or timeouts were observed across all 80 executed stress runs on the RTX 5070.Limitations
Conclusion
The evidence on Windows 11 / NVIDIA RTX 5070 confirms that PR #2779 fixes the reproduced lease timeout and registry lock inversion bugs without introducing observed regressions in the tested AGC driver paths. Full validation logs and per-iteration records are preserved locally.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-10T15:40:57Z.
Windows/NVIDIA validation, as asked on #2575. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
db76c694, merged ontomainca349535f(together with justdoston'sselect/pollbranch from #1471, which touches onlySocket.cpp,Udp.cppandGuestPoll.cpp).agc_host_import_unmap,agc_driver_host_import_lifetime,agc_driver_host_import_mutation_race,agc_driver_host_import_teardownand the sixagc_driver_guest_memory_lifetime*variants (copy,direct,locked,heap,heap_uncached).agc_driverfailed once with0xc0000374under-j 8. It then passed 10 of 10 on its own, and I haven't measured its rate onmain, so I can't tell whether it relates to this change.🤖 Addressed by Claude Code
Pull request closed