Log a driver fault caught by the Windows pipeline guards #1766
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1766
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/win-driver-fault-log"
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?
On Windows the
__exceptaround vkCreateGraphicsPipelines returns VK_ERROR_UNKNOWN without a word, so a driver fault shows in the log only as "graphics pipeline for ... not made (-13)", the same as the driver returning that error itself. Since0560ecbthe Linux guard logs "the driver faulted compiling a graphics pipeline: that one is left out". Both Windows guards now log the same line, with the exception code.It came up while chasing a start that hung on an RTX 4070 Ti Super (driver 621.14): a precompile worker's build had faulted inside the driver, and nothing in the log said so; it took a local build that wrote a dump at the fault to see it. A freeze report with this line in it points at the driver straight away.
Testing: RTX 4070 Ti Super, driver 621.14, Windows 11. The Windows DLL builds on
adb7a5d. A local build that forced one access violation inside each guard (not part of this change) loggedand the precompile went on and finished.
The change itself is good: the Windows guards now say the same thing as the Linux one, with the exception code, and logging from the
__exceptbody (not the filter) is fine.But it breaks
tests/test_precompile_compute_guard.pyon the windows-2022 check. That test extractsguarded_computefromgpu/vk/vk_draw.cppverbatim into a small fixture, and the fixture has nologf, so the new line resolves to the CRT'slogf(float):The fix is a stub in the fixture's
HEAD, e.g.void logf(const char*, ...) {}(a variadic overload next to the math one is fine), or a counter if you want the test to also assert the message is logged on a fault (mode==1). The other Windows failure on that job is not from this PR; everything else is green.Once the test is fixed this is good to merge.
Thanks, fixed in
b177711. The fixture now has a countinglogf(const char*, ...)and case 4 checks the fault was logged once. I built the generated fixture with llvm-mingw (with -fms-extensions, as I don't have the MSVC target set up here) and ran it on Windows 11: cases 0 to 4 all exit 0.The fixture is fixed: the counting
logf(const char*, ...)is in, and case 4 now checks the fault was logged exactly once.test_precompile_compute_guard.pypasses on the windows-2022 job.The log call sits in the
__exceptbody, after the filter (__except (1)) has returned, so nothing runs inside the filter.logfformats into a 1 KiB stack buffer and hands it to the host log, with no allocation of its own, so it is safe there.The remaining red on the two Python source checks jobs is not from this PR:
test_nup_out_of_space(windows),test_lift_cleanup_errorandtest_recomplauncher_jsonfail on main as well, and main has since fixed the lift-cleanup and launcher ones. A merge of main will clear them. The branch is 149 commits behind main but touches onlygpu/vk/vk_draw.cppand the one test, so I don't expect a conflict.Good to merge.