daniel-schuermann / mesa

Mesa 3D graphics library (mirror; no pull requests here please)
http://mesa3d.org
135 stars 3 forks source link

Division by zero with Path of Exile (DXVK) #49

Closed ernstp closed 5 years ago

ernstp commented 5 years ago

0069:err:seh:call_stack_handlers invalid frame 7f0ff2248600 (0x14d82000-0x15580000) Unhandled exception: divide by zero, invalid program stack in 64-bit code (0x00007f0fd3caa52c). 00c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 00c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6 Register dump: rip:00007f0fd3caa52c rsp:000000001557c4c0 rbp:00007f0ff09f8b30 eflags:00010202 ( R- -- I - - - ) rax:0000000000000320 rbx:00007f0ff11aeeb0 rcx:0000000000000000 rdx:0000000000000000 rsi:0000000000000000 rdi:00007f0ff0cc9430 r8:00007f0ff0cc9430 r9:0000000000000000 r10:000000000000001d r11:0000000000000000 r12:000000001557c4f0 r13:000000001557c620 r14:00007f0ff11b4bd0 r15:000000007c004040 Stack dump: 0x000000001557c4c0: 0000000000000000 00007f0f00000000 0x000000001557c4d0: 00007f0ff1138b00 00007f0ff2413660 0x000000001557c4e0: 0000000000000000 0000000000000000 0x000000001557c4f0: 00007f0ff1d958c0 00007f0f00000000 0x000000001557c500: 00007f0ff1d95c48 00007f0f0000001d 0x000000001557c510: 00007f0ff1d95c50 00007f0ff0cc9430 0x000000001557c520: 00007f0f00000000 00007f0ff0cc97b8 0x000000001557c530: 00007f0f0000001d 00007f0ff0cc97c0 0x000000001557c540: 0000000000000000 000000000000009b 0x000000001557c550: 00007f0ff11c4928 40c330e5f004b500 0x000000001557c560: 0000000000000000 40c330e5f004b500 0x000000001557c570: 000000001557c620 00007f0ff22485e8 Backtrace: =>0 0x00007f0fd3caa52c _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17__normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x00007f0ff09f8b30) 1 0x00007f0fd3c7f16b _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x00007f0ff22485e8) 2 0x00007f0fd3c6adbe _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x000000001557cf30) 3 0x00007f0fd3c6b0b1 _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17__normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x000000001557d380) 4 0x00007f0fd3c62e35 _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x00005555574664c0) 5 0x00007f0fd3c665d5 _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x000000001557f830) 6 0x00007f0fd3c68462 _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17__normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x00005555574664c0) 7 0x00007f0fd3c6854e _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff() in libvulkan_radeon.so (0x00005555574664c0) 8 0x00007f100a23cd89 wine_vkCreateGraphicsPipelines+0x98() in winevulkan (0x000000001557ed10) 9 0x00000000009d73fe EntryPoint+0x860cd() in d3d11 (0x0000000000000001) 0x00007f0fd3caa52c _ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9gnu_cxx17__normal_iteratorIPS1_S3EEDpOT+0xffffffffffffffff in libvulkan_radeon.so: idivl %ecx,%eax

Doesn't happen with RADV_PERFTEST=llvm

info: Game: PathOfExile_x64.exe info: DXVK: v1.2.3 warn: OpenVR: Failed to locate module info: Enabled instance extensions: info: VK_KHR_get_physical_device_properties2 info: VK_KHR_surface info: VK_KHR_win32_surface WARNING: Experimental compiler backend enabled. Here be dragons! Incorrect rendering, GPU hangs and/or resets are likely info: AMD RADV/ACO FIJI (LLVM 8.0.0): info: Driver: 19.1.99 info: Vulkan: 1.1.107

ernstp commented 5 years ago

Tested with mesa aco 19.2.0~git1907041227.8e93352dc14

daniel-schuermann commented 5 years ago

Thank you very much! Would you be able to create a debug build for a better stack trace?

ethan961 commented 5 years ago

I have the same issue, notably it only happens when attempting to load some levels such as the towns in Act 2 (The Forest Encampment) and Act 3 (The Sarn Encampment), just out of the few I've tested. Oriath town doesn't exhibit the issue. Using wine-staging 4.11 and DXVK 1.2.1, radv compiled from commit 8e93352dc14f33c8f07dc0107c3033295d4c6ace.

https://gist.github.com/ethan961/45270bbbfcadd44dd8d2e400f7430a4a

daniel-schuermann commented 5 years ago

Thanks, from this dump, I can already derive the function. Unfortunately, there is not a single division nor modulo in this function. Is there a way to jump directly into mentioned levels after installing the game? Otherwise, I'd appreciate running it again with a proper debug build.

ernstp commented 5 years ago

Running with assertions I got this: ../src/amd/compiler/aco_spill.cpp:1600: void aco::spill(aco::Program, aco::live&, const radv_nir_compiler_options): Assertion `program->num_waves >= num_waves' failed.

ernstp commented 5 years ago

Here's a renderdoc (800MB) https://drive.google.com/file/d/1yqtJlxgf6rQ6c63-nxYNxuIfEaxpec0F/view?usp=sharing

edmondo commented 5 years ago

Same assertion here, but with the PoE standalone client:

rev-proc-id: ../mesa-9999/src/amd/compiler/aco_spill.cpp:1600: void aco::spill(aco::Program*, aco::live&, const radv_nir_compiler_options*): Assertion `program->num_waves >= num_waves' failed.

Kernel: 5.1.0-gentoo CPU: AMD Ryzen 5 2600 GPU: AMD RX 470 (AMD RADV/ACO POLARIS10 (LLVM 9.0.0))

Stebs commented 5 years ago

Another dump: https://gist.github.com/Stebs/e94f2556b41af7ffa0b9ea6843d655bd RX580 Loading of Act 3 (The Sarn Encampment)

daniel-schuermann commented 5 years ago

Thx, we found the issue. Will get back to you when a patch is available.

daniel-schuermann commented 5 years ago

Fixed with 077490f11216f0d2c4550364ce2149ee31c17d33 on master and 1f6010dd013342fce62a9f4fd55186cf83e4570a on backend. Thx!