Repository navigation
d3d12: the device-fault report names what the process and the driver had at each fault address (RT-FAULT-ADDRESS-OWNER) - #1918
Conversation
…had at each fault address (RT-FAULT-ADDRESS-OWNER) A fault address alone does not say whose page it is. Each one now also gets: - VirtualQuery of the same number on Windows: base, allocation base, state, protection and type. A host import, a range of the title's memory or a raw CPU pointer that reached a shader shares the number. - With LEONIDA_ADDRESS_BINDINGS=1, VK_EXT_device_address_binding_report: a debug messenger records the GPU range of every buffer, image and allocation the driver binds and unbinds (src/address_binding.h). The report lists the live objects containing the page, the nearest below and above, and recently unbound objects that held it. address_binding_test checks the record and the report on synthetic bindings, and the feature and extension on the device chain. On an RTX 5070 Ti (617.42) the messenger saw ~50,000 binds in a retail boot, and the world-start WRITE_INVALID address was in none of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vkDestroyInstance with a live messenger breaks the debug-utils rules. The device teardown and the failed-creation path now remove it first. d3d12_conservative_raster_test with LEONIDA_VK_VALIDATION=1 LEONIDA_ADDRESS_BINDINGS=1 LEONIDA_DEVICE_FAULT=1 runs with no validation message on an RTX 5070 Ti. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wner (#1723, #1918) Wave 10B: port unmapped-V# nulling, console heap sanitization + bounded round-robin re-probe, and 64 MiB resource-heap null tail guards from ProjectLeonida/mandy#1723 (GPL-3.0, author Moriz82, commit 9177972ae89d), plus RT-FAULT-ADDRESS-OWNER (Windows VirtualQuery + VK_EXT_device_address_binding_report tracking via LEONIDA_ADDRESS_BINDINGS=1) from ProjectLeonida/mandy#1918 (GPL-3.0, author kawaii-shakal, commit 223913540b12). Preserves all ultimate enhancements (Wave 8-1 TitleVaAliases::is_shader_va, Wave 7-1 NVIDIA host-image-copy policy, Wave 9E compile worker priority, and title_vsharp_guard/xmem-shadow guard-page semantics). Verified with Ninja + /Z7 and LEONIDA_VK_VALIDATION=1 on RTX 3080: 6/6 CTests pass (title_va_alias, title_vsharp_guard, vk_device_fault, address_binding, d3d12_xmem_shadow, d3d12_unmapped_vsharp) with 0 validation errors.
|
Built and ran this on an NVIDIA machine. It works here; a few suggestions below, none blocking. Setup
Results
Mutation
Suggestions
A similar branch exists at MoonEyes/leonida AI-assisted: yes (Claude Code built and ran the tests; I reviewed it) |
|
A small thing in
Thanks for the PR, its report is the one I would use for the geometry question in #1608. AI-assisted (Claude Code, Claude Opus 5.5). |
- A second Vulkan instance in the process no longer overwrites the messenger handle (the first one was left alive past its instance): it is refused, and enable_device only enables the extension for the instance that owns the messenger. install/uninstall are under a lock. - `on` is set only when a messenger records the device, and is atomic. With LEONIDA_ADDRESS_BINDINGS=1 and nothing recording, the fault report says the bindings were not recorded instead of reading as "no object there". - An object that only shares the reported page with the fault address is labelled "on the page" (unbound: "held the page"), not "containing". - Tests: exact end and start of an object, page vs byte precision, unbind matching by handle and size, the kept_unbound cap, recording from several threads while a report reads, and the two-instance messenger cases. The test builds on Linux too (setenv in place of _putenv_s). Changes made by Claude Code (AI-assisted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
|
These changes were made by Claude Code (AI-assisted) in 8ff0a16, after the review by @MoonEyes and @Snooozs:
The test now also builds on Linux ( Generated by Claude Code |
Keep address binding diagnostics alongside AMD markers and submit-lock tests. Conflict resolution assisted by Codex.
|
Independent real-fault exercise of your diagnostic, not a fix claim: Linux/Wine11.22, RTX3070Ti8GiB, NVIDIA620.73.04; local f448c712a includes your tested 8ff0a16 plus #1934 ac16dbe and #2091 topic (not current PR head51174c6). Messenger installed before device creation. A targeted pool-state pass ended at474.73s with VK_ERROR_DEVICE_LOST from the fence dispatcher vkWaitSemaphores, then a title breakpoint. Fault data contains one instruction-pointer fault (16-byte precision) and one READ_INVALID (4096-byte precision). Each address reports no live/page-overlapping or retained-unbound owner; nearest objects are not close enough to establish a simple one-page overrun. Counters:46806 binds,6018 unbinds,41253 live;6018 unbinds is below the16384 retention cap. VirtualQuery reports both numerical CPU addresses as free. Vendor fault binary size0. No kernel Xid/OOM entry was logged for this incident. This usefully excludes a demonstrated match to a recorded live/recently-unbound object; I am not equating it with a proven translator bug or assuming complete driver-internal code coverage.1074 actual presents,zero expired wait gates,16384 indirect draws emitted/zero reported skips. The separate title pool was only6474/25000 live at the last sample, so its earlier exhaustion did not reproduce. No further retail run queued; raw addresses/registers/shader names/roots/captures stay local. Existing19/19 focused Wine tests and native sanitizer checks passed before execution. AI-assisted (OpenAI GPT-6.1 Sol). |
|
@djrolfes thank you for the real-fault run. Reply by Claude Code (AI-assisted) on my behalf. What your numbers say, as far as this report can say it:
Your run was on f448c712a, before 8ff0a16; the labels changed there ("live, on the page", "held the page"), but The useful next step is the one you already took on #1934: with Generated by Claude Code |
Claimed in the coordination issue as RT-FAULT-ADDRESS-OWNER: #1608 (comment)
Problem
A device-fault report gives an address, its type and its precision, but not whose page it is. For the world-start WRITE_INVALID in #1608 several of us have been guessing: an untranslated title address, a raw CPU pointer, an object bound one page short, or driver-internal memory. Without an owner, nothing separates these guesses.
Change
For every fault address in the report:
What the process has at the same number (Windows).
VirtualQuerygives the base, allocation base, state, protection and type. A GPU address isn't a CPU one, but a host import, a range of the title's memory and a raw CPU pointer that reached a shader all share the number.With
LEONIDA_ADDRESS_BINDINGS=1(andLEONIDA_DEVICE_FAULT=1). The device enablesVK_EXT_device_address_binding_report. A debug messenger, installed beforevkCreateDevice, records the GPU virtual address range of every buffer, image and allocation the driver binds and unbinds (runtime/src/address_binding.h). The report then lists:"Nothing live or recently unbound there" means that no object of this device had that GPU address.
The record and the report are pure and covered by
address_binding_test: synthetic bindings, the messenger callback, and the feature and extension on the device chain.docs/d3d12_vulkan.md4.11 describes them.Measured (Windows 11 Pro 26300, RTX 5070 Ti, NVIDIA 617.42, 1.0.2.1 retail boot)
PAGE_READWRITEprivate page of this process, outside everyxmem-largeallocation of the title. Codex reads the same numbers as the arena base plus an untranslated title address (0x299fe000into one 2,199 MiB XMem range in three boots). After main's Integrate post-story-load memory, queue and Vulkan fixes (RT-POST-STORY-RUNTIME) #1723 that loss no longer happens here (a different stop, about 820 s in).address_bindingandvulkan_device_faultpass.Not done here
vkSetDebugUtilsObjectNameEXTpass over the layer's objects.🤖 Generated with Claude Code