0x0000800267780000
that looks like a new class of bug, more like use-after-free maybe, but impossible to tell without a reliable repro.
With VKD3D_CONFIG=retain_descriptor_heaps set I played ~30 hours
... If it takes 30 hours to repro I don't see how this is possible to workaround.
RADV_DEBUG=bo_history might help to catch what kind of fault it is if you can find a more reliable repro. The log would end up in /tmp/radv_bo_history.log.
Got a reliable repro. It happens on the mission "Another Day, Another Universe", in the cutscene where Lilith comes out of the portal right before the boss fight. Hung there 3 times now in the same spot.
| Previous GPU hang scene | Today GPU hang scene |
|---|---|
Caught it with RADV_DEBUG=bo_history this time. The faulting page 0x80025ae21000 falls inside this BO:
timestamp=41528638341842, VA=000080025ae00000-000080025b184000, destroyed=0, is_virtual=0
timestamp=41561843764139, VA=000080025ae00000-000080025b184000, destroyed=1, is_virtual=0
BO destroyed at 41561.843764s, GPU page fault at 41562.197217s (dmesg uptime) — the BO was freed ~353 ms before the shader faulted on its address.
dmesg
[41562.197217] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:5 pasid:684)
[41562.197260] amdgpu 0000:03:00.0: in page starting at address 0x000080025ae21000 from client 10
[41562.197286] amdgpu 0000:03:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00501031
[41562.197288] amdgpu 0000:03:00.0: Faulty UTCL2 client ID: TCP (0x8)
[41562.197294] amdgpu 0000:03:00.0: MORE_FAULTS: 0x1
[41562.197305] amdgpu 0000:03:00.0: PERMISSION_FAULTS: 0x3
VKD3D_CONFIG=retain_descriptor_heaps was set for this session.
Logs attached (radv_bo_history.log, dmesg, devcoredump, Proton log):
Indeed, this looks like a straight use-after-free. Clearly a game bug.
Thanks for confirming. Should I report this to Gearbox, or is there any chance of a game-specific workaround on the vkd3d side like #3037?
There is no obvious workaround we can apply on our end right now other than just not freeing memory when application asks us to, but that's going to be broken too in different ways. @runar-work is doing some triage on it to see if we can get anything actionable out of it.
So far I haven't been able to repro any hangs in that spot with Proton Experimental, vkd3d-proton 5da4f239b96926c, Mesa 72f02d6e, 7.0.10-arch1-1, on neither RX 9070 nor RX 7600. Which graphics settings are you using?
Graphics settings:
| 1 | 2 | 3 | 4 |
|---|---|---|---|
Differences from your setup that might affect hitting the timing window:
Repro: mission "Another Day, Another Universe", the cutscene where Lilith comes out of the portal before the boss fight. 3/3 for me.
Reproduced again, same spot. This time the bo_history ordering is slightly different — worth noting.
Faulting page 0x80026fb83000 is inside this BO:
timestamp=20173253223945, VA=000080026f800000-000080026fb84000, destroyed=0, is_virtual=0
timestamp=20206485992384, VA=000080026f800000-000080026fb84000, destroyed=1, is_virtual=0
BO created at 20173.253224s, GPU page fault at 20206.373142s (dmesg), BO logged destroyed at 20206.485992s — i.e. the fault happened ~113 ms before RADV logged the destroy, not after like in the previous capture (where destroy preceded the fault by ~353 ms).
dmesg:
[20206.373142] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:4 pasid:1310)
[20206.373165] amdgpu 0000:03:00.0: in page starting at address 0x000080026fb83000 from client 10
[20206.373167] amdgpu 0000:03:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00401031
[20206.373170] amdgpu 0000:03:00.0: Faulty UTCL2 client ID: TCP (0x8)
[20206.373177] amdgpu 0000:03:00.0: PERMISSION_FAULTS: 0x3
Both this BO and the one from the previous capture had a lifetime of exactly ~33.2 s before being destroyed.
VKD3D_CONFIG=fault would maybe include more context on which resource is being destroyed, but so far it's not looking very actionable ...
BO timings and stuff might not use exactly the same time base, so I wouldn't read too much into those.
I'll try some degenerate config options to do delayed free or something like that, but probably too risky to enable that by default.
Reproduced with VKD3D_CONFIG=retain_descriptor_heaps,fault.
The address binding tracker output:
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VA range [ffff800254000000, ffff800259590000) [size = 89718784 (0x5590000)]
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Fault offset: 58990592 (0x3842000)
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: BIND
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: T: 16583.046207 s
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Cookie: 2199.
19754.013:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VkImage [9384 x 9384 x 1] [levels = 1] [layers = 1] [fmt = 137] [type = 1] [usage = #f]
19754.017:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: UNBIND ...
19754.018:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: BIND (new VkDeviceMemory at same VA range)
So the faulting address used to belong to a VkImage 9384x9384 (fmt 137, usage 0xf), which was unbound and then the VA range got reused by something else before the shader touched it.
dmesg:
[19749.012023] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:5 pasid:1494)
[19749.012047] amdgpu 0000:03:00.0: in page starting at address 0x0000800257b81000 from client 10
[19749.012059] amdgpu 0000:03:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00501031
[19749.012063] amdgpu 0000:03:00.0: Faulty UTCL2 client ID: TCP (0x8)
Same spot — Lilith portal cutscene.
Logs:
Interesting ...
19754.019:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VA range [ffff800257800000, ffff800257b84000) [size = 3686400 (0x384000)]
19754.019:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Fault offset: 270336 (0x42000)
19754.019:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: BIND
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: T: 19715.779589 s
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Cookie: 0.
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VkDeviceMemory [memoryTypeIndex = 0]
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VA range [ffff800257800000, ffff800257b84000) [size = 3686400 (0x384000)]
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Fault offset: 270336 (0x42000)
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: BIND
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: T: 19715.779608 s
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Cookie: 9359270.
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VkImage [1920 x 804 x 1] [levels = 1] [layers = 1] [fmt = 76] [type = 1]
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VA range [ffff800257800000, ffff800257b84000) [size = 3686400 (0x384000)]
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Fault offset: 270336 (0x42000)
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: UNBIND
19754.020:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: T: 19749.006508 s
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VkImage
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VA range [ffff800257800000, ffff800257b84000) [size = 3686400 (0x384000)]
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: Fault offset: 270336 (0x42000)
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: UNBIND
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: T: 19749.006511 s
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_report_entry: VkDeviceMemory
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_check_va: Fault address is currently unmapped. This is very likely use-after-free.
19754.021:0170:0208:err:vkd3d-proton:vkd3d_address_binding_tracker_check_va: Done reporting VA fault.
19754.021:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19754.021:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 1920 x 804 x 1, levels 1, DXGI_FORMAT #2a, dim 3.
19754.021:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_ReconstructedPrevNearestDepth
19754.481:0170:0184:fixme:dwmapi:DwmGetWindowAttribute DWMWA_CLOAKED: always returning 0.
19754.482:0170:0184:fixme:eventlog:QueryAllTracesW (00000000A9CC0000, 64, 000000000414FC30) stub
19754.677:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19754.677:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 1 x 1 x 1, levels 1, DXGI_FORMAT #2a, dim 3.
19754.678:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_SpdAtomicCounter
19754.678:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19754.678:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 1920 x 804 x 1, levels 1, DXGI_FORMAT [#36](/issue/HansKristian-Work/vkd3d-proton/36), dim 3.
19754.678:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_IntermediateFp16x1
19755.249:0170:0184:fixme:dwmapi:DwmGetWindowAttribute DWMWA_CLOAKED: always returning 0.
19755.252:0170:0184:fixme:eventlog:QueryAllTracesW (00000000A9CC0000, 64, 000000000414FC30) stub
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 960 x 402 x 1, levels 1, DXGI_FORMAT #3d, dim 3.
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_ShadingChange
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 3840 x 1607 x 1, levels 1, DXGI_FORMAT #3d, dim 3.
19755.444:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_NewLocks
19756.010:0170:0184:fixme:dwmapi:DwmGetWindowAttribute DWMWA_CLOAKED: always returning 0.
19756.012:0170:0184:fixme:eventlog:QueryAllTracesW (00000000A9CC0000, 64, 000000000414FC30) stub
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 960 x 402 x 1, levels 1, DXGI_FORMAT [#36](/issue/HansKristian-Work/vkd3d-proton/36), dim 3.
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_FarthestDepthMip1
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 1920 x 804 x 1, levels 1, DXGI_FORMAT #1c, dim 3.
19756.186:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_DilatedReactiveMasks
19756.752:0170:0184:fixme:dwmapi:DwmGetWindowAttribute DWMWA_CLOAKED: always returning 0.
19756.753:0170:0184:fixme:eventlog:QueryAllTracesW (00000000A9CC0000, 64, 000000000414FC30) stub
19756.931:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19756.931:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 960 x 402 x 1, levels 10, DXGI_FORMAT [#22](/issue/HansKristian-Work/vkd3d-proton/22), dim 3.
19756.931:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_SpdMips
19757.505:0170:0184:fixme:dwmapi:DwmGetWindowAttribute DWMWA_CLOAKED: always returning 0.
19757.507:0170:0184:fixme:eventlog:QueryAllTracesW (00000000A9CC0000, 64, 000000000414FC30) stub
19757.689:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource refcount will hit 0 from a fence callback, which proves use-after-free by game.
19757.689:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Identified use-after-free resource: 1920 x 804 x 1, levels 1, DXGI_FORMAT [#36](/issue/HansKristian-Work/vkd3d-proton/36), dim 3.
19757.689:0170:0208:err:vkd3d-proton:d3d12_resource_decref_retained: Resource name: FSR3UPSCALER_Luma1
This seems to be related to FSR3 usage being completely and utterly broken still. Wonder if some resource could actually escape this analysis. Does the hang go away if you disable FSR3?
Confirmed. Switched Upscaling Method to TSR (same Performance quality, same scene), played through the whole "Another Day, Another Universe" mission including the Lilith cutscene and the boss fight. ~67 min session, no hang.
Proton log: 0 VK_ERROR / DEVICE_LOST / GPUVM fault entries, 0 FSR3UPSCALER resources logged, 0 address binding tracker reports. Clean run.
Proton log: steam-1285190.zip
Kernel log: dmesg-7.1.0-rc5-eb3f4b7426cf-with-fixes-v1.zip
radv_bo_history.log: radv_bo_history.zip
Ok. I'm working on a potential workaround that is more aggressive than the existing one.
https://github.com/HansKristian-Work/vkd3d-proton/pull/3074 might also workaround the BL4 hang with FSR.
EDIT: nvm. Found a subtle bug. Need to fix first ...
EDIT: should be good now.
If that PR alone doesn't work, VKD3D_CONFIG=defer_resource_destruction might help. That might be relevant if FSR somehow didn't tag all its resources, but I'd be mildly surprised if that works around it ...
Should be resolved now.
proton 3.0x2 2026-05proton experimentalx2 2026-05VKD3D_CONFIG=defer_resource_destructionx1 2026-05VKD3D_CONFIG=retain_descriptor_heaps,fault`.x1 2026-05VKD3D_CONFIG=faultx1 2026-05RADV_DEBUG=bo_historyx2 2026-05VKD3D_CONFIG=retain_descriptor_heaps`x2 2026-05VKD3D_CONFIG=retain_descriptor_heapsx1 2026-05VKD3D_CONFIG='retain_descriptor_heaps'x1 2026-05
With
VKD3D_CONFIG=retain_descriptor_heapsset I played ~30 hours without any of the SQC hangs from [#3034](https://github.com/HansKristian-Work/vkd3d-proton/issues/3034).Today got a new GPU hang. Looks different from the previous ones - not sure if this is the same class of bug or a new one.
Comparison of dmesg page fault info:
Dmesg block:
Proton log around the time of hang has the usual FSR bursts (156
FSR resource detectedwarnings over the session), but unlike in [#3034](https://github.com/HansKristian-Work/vkd3d-proton/issues/3034) there is noradv: GPUVM fault detected, nodevice_lost, novr -4- the log just ends with SEH unwinding traces.Versions:
amdgpu.gpu_recovery=0)Questions:
retain_descriptor_heapsdoesn't cover?Umr logs and devcoredump attached: umr-log.gz
Proton log: steam-1285190.zip