Bug 105904 - Needed to delete mesa shader cache after driver upgrade for 32 bit wine vulkan programs to work.
Summary: Needed to delete mesa shader cache after driver upgrade for 32 bit wine vulka...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-05 11:32 UTC by Snubb
Modified: 2019-03-14 08:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Snubb 2018-04-05 11:32:09 UTC
After driver update to 18.1~git1804050730.8cd58d~oibaf~b from oibafs ubuntu repo my 32 bit game that i run with dxvk stopped working.
I tried 64 bit cube.exe from LunarG VulkanSDK which worked, 32 bit cube.exe from the same SDK didn't work.

Manually deleting shader cache made 32 bit cube.exe and game running with dxvk work.
Comment 1 Timothy Arceri 2018-04-05 23:40:59 UTC
(In reply to Snubb from comment #0)
> After driver update to 18.1~git1804050730.8cd58d~oibaf~b from oibafs ubuntu
> repo my 32 bit game that i run with dxvk stopped working.
> I tried 64 bit cube.exe from LunarG VulkanSDK which worked, 32 bit cube.exe
> from the same SDK didn't work.
> 
> Manually deleting shader cache made 32 bit cube.exe and game running with
> dxvk work.

Can you be more specific about what stopped working means? Did the game have corruptions? Was is crashing on start-up?

And just to be clear you deleted ~/.cache/mesa_shader_cache/ ?
Comment 2 Snubb 2018-04-06 18:56:59 UTC
I'm sorry but I can't be more specific than that the game "World of tanks" that i've been playing didn't start after driver update, no window. Nothing.
When It didn't start I tried to run 64 bit cube.exe from LunarG Vulkan SDK, and it did run.
Then I tried the 32 bit cube.exe from the LunarG SDK, it crashed. Weird becouse it run before driver update, and 64 bit cube.exe still worked.
I didn't know what to do, (i'm no genious), so I deleted ~/.cache/mesa/ and ~/.cache/radv_builtin_shaders, and voila, 32 bit vulkan apps in wine starts working (32 bit cube.exe and dxvk)
Comment 3 Timothy Arceri 2018-04-12 06:27:28 UTC
Do you recall what version you updated from?
Comment 4 Snubb 2018-04-13 13:18:39 UTC
No, but probably from previous oibaf.
I don't know how oibafs 32 bit vs 64 bit package dependencies are set up, if there are any, but could it be that i had a temporal version mismatch between 32 and 64 bit version that trigered the bug? I don't know.
I've tried to reproduce it but failed :-(
Comment 5 Snubb 2018-04-19 18:18:52 UTC
My computer reproduced bug!! 

64 bit cube.exe working and 32 bit cube.exe and 32 bit dxvk not working before deleting ~./cache/radv_builtin_shaders

I don't know why or how but i grabbed some output so you can try figure it out :-)


Driver versions = 18.1~git1804190730.0e1079~oibaf~b


Wine error window from running 32 bit cube.exe before deleting radv_builtin_shaders:

Unhandled exception: divide by zero in 32-bit code (0x7d39e95c).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7d39e95c ESP:0033e9e8 EBP:00000000 EFLAGS:00010246(  R- --  I  Z- -P- )
 EAX:00000100 EBX:7be45300 ECX:00000024 EDX:00000000
 ESI:7be44fcc EDI:00000000
Stack dump:
0x0033e9e8:  00000480 7be44fe4 7d8d7d2c 7d8d7e44
0x0033e9f8:  7be44cb0 7d576000 7d576000 7d3a3708
0x0033ea08:  7be44cb0 7d3a3774 7d92c9a8 f7ef13ec
0x0033ea18:  7d576000 00000000 00000000 0033f388
0x0033ea28:  0000000a 7d66c114 0033f0f8 7d33a001
0x0033ea38:  7be45690 00000011 00000002 7d8d69f0
Backtrace:
=>0 0x7d39e95c in libvulkan_radeon.so (+0x6695c) (0x00000000)
  1 0x7d3a3774 in libvulkan_radeon.so (+0x6b773) (0x7be44cb0)
  2 0x7d3a437e in libvulkan_radeon.so (+0x6c37d) (0x7d8d6a14)
  3 0x7d36f388 in libvulkan_radeon.so (+0x37387) (0x0033f7b8)
  4 0x7d365707 in libvulkan_radeon.so (+0x2d706) (0x00000000)
  5 0x7d35811c in libvulkan_radeon.so (+0x2011b) (0x7d8d69f0)
  6 0x7dc60cfb in libvulkan.so.1 (+0x18cfa) (0x0033f9f8)
  7 0x7dc69b15 in libvulkan.so.1 (+0x21b14) (0x0033fad8)
  8 0x7dc6dbf5 vkCreateDevice+0x244() in libvulkan.so.1 (0x0033fb20)
  9 0x7dd76f7d wine_vkCreateDevice+0x1ac() in winevulkan (0x0033fbe8)
  10 0x100395bf in vulkan-1 (+0x395be) (0x0033fc78)
  11 0x10029be4 in vulkan-1 (+0x29be3) (0x0033fd1c)
  12 0x1003fc00 in vulkan-1 (+0x3fbff) (0x0033fd54)
  13 0x00416e74 in cube (+0x16e73) (0x0033fdc8)
  14 0x00418f6e in cube (+0x18f6d) (0x0033fe20)
  15 0x004162fe in cube (+0x162fd) (0x0033fe74)
  16 0x0041ec98 in cube (+0x1ec97) (0x0033fec0)
  17 0x7b46279c call_process_entry+0xb() in kernel32 (0x0033fed8)
  18 0x7b4641ce in kernel32 (+0x441cd) (0x0033ffd8)
  19 0x7b4627aa call_process_entry+0x19() in kernel32 (0x0033ffec)
0x7d39e95c: divl	0x14(%ebx),%eax
Modules:
Module	Address			Debug info	Name (86 modules)
PE	  400000-  498000	Export          cube
PE	10000000-100cd000	Export          vulkan-1
ELF	42150000-4229b000	Deferred        libx11.so.6
ELF	42fc0000-42fd5000	Deferred        libxext.so.6
ELF	42fd8000-42feb000	Deferred        libxi.so.6
ELF	43028000-4302f000	Deferred        libxfixes.so.3
ELF	43038000-43045000	Deferred        libxrandr.so.2
ELF	43048000-43054000	Deferred        libxrender.so.1
ELF	430d8000-430dc000	Deferred        libxau.so.6
ELF	430e0000-430e4000	Deferred        libxcomposite.so.1
ELF	430f0000-430f4000	Deferred        libxinerama.so.1
ELF	77468000-7b3fb000	Deferred        libllvm-6.0.so.1
ELF	7b400000-7b7eb000	Dwarf           kernel32<elf>
  \-PE	7b420000-7b7eb000	\               kernel32
ELF	7bc00000-7bcfa000	Deferred        ntdll<elf>
  \-PE	7bc10000-7bcfa000	\               ntdll
ELF	7c000000-7c004000	Deferred        <wine-loader>
ELF	7cfc0000-7d333000	Deferred        libvulkan_intel.so
ELF	7d338000-7d578000	Dwarf           libvulkan_radeon.so
ELF	7d678000-7d6af000	Deferred        libedit.so.2
ELF	7d988000-7d991000	Deferred        libffi.so.6
ELF	7d998000-7d9b6000	Deferred        libgcc_s.so.1
ELF	7dbf0000-7dbfd000	Deferred        libwayland-client.so.0
ELF	7dc00000-7dc03000	Deferred        libxshmfence.so.1
ELF	7dc48000-7dc9f000	Dwarf           libvulkan.so.1
ELF	7dca8000-7dcb0000	Deferred        libxcb-sync.so.1
ELF	7dcb0000-7dcb4000	Deferred        libxcb-present.so.0
ELF	7dcb8000-7dcbd000	Deferred        libxcb-dri3.so.0
ELF	7dcc0000-7dcc3000	Deferred        libx11-xcb.so.1
ELF	7dcc8000-7dcdc000	Deferred        libdrm.so.2
ELF	7dce0000-7dcec000	Deferred        libxcursor.so.1
ELF	7dcf0000-7dcf7000	Deferred        libxxf86vm.so.1
ELF	7dcf8000-7dd02000	Deferred        librt.so.1
ELF	7dd08000-7dd23000	Deferred        libbsd.so.0
ELF	7dd28000-7dd2f000	Deferred        libxdmcp.so.6
ELF	7dd30000-7dd5c000	Deferred        libxcb.so.1
ELF	7dd60000-7dd92000	Dwarf           winevulkan<elf>
  \-PE	7dd70000-7dd92000	\               winevulkan
ELF	7dda0000-7de30000	Deferred        winex11<elf>
  \-PE	7ddb0000-7de30000	\               winex11
ELF	7de38000-7de44000	Deferred        libdrm_amdgpu.so.1
ELF	7de48000-7de66000	Deferred        libelf.so.1
ELF	7de68000-7de7c000	Deferred        api-ms-win-core-localization-l1-2-1<elf>
  \-PE	7de70000-7de7c000	\               api-ms-win-core-localization-l1-2-1
ELF	7de80000-7de94000	Deferred        api-ms-win-core-fibers-l1-1-1<elf>
  \-PE	7de90000-7de94000	\               api-ms-win-core-fibers-l1-1-1
ELF	7de98000-7deac000	Deferred        api-ms-win-core-synch-l1-2-0<elf>
  \-PE	7dea0000-7deac000	\               api-ms-win-core-synch-l1-2-0
ELF	7deb0000-7ded4000	Deferred        imm32<elf>
  \-PE	7dec0000-7ded4000	\               imm32
ELF	7e120000-7e152000	Deferred        libexpat.so.1
ELF	7e158000-7e1a3000	Deferred        libfontconfig.so.1
ELF	7e1a8000-7e1c7000	Deferred        libz.so.1
ELF	7e1c8000-7e285000	Deferred        libfreetype.so.6
ELF	7e2c8000-7e2eb000	Deferred        libtinfo.so.5
ELF	7e2f0000-7e316000	Deferred        libncurses.so.5
ELF	7e318000-7e352000	Deferred        libpng16.so.16
ELF	7e358000-7e3d9000	Deferred        rpcrt4<elf>
  \-PE	7e360000-7e3d9000	\               rpcrt4
ELF	7e3e0000-7e44d000	Deferred        setupapi<elf>
  \-PE	7e3f0000-7e44d000	\               setupapi
ELF	7e478000-7e4ee000	Deferred        shlwapi<elf>
  \-PE	7e490000-7e4ee000	\               shlwapi
ELF	7e4f0000-7e743000	Deferred        shell32<elf>
  \-PE	7e500000-7e743000	\               shell32
ELF	7e748000-7e7c0000	Deferred        advapi32<elf>
  \-PE	7e760000-7e7c0000	\               advapi32
ELF	7e7c0000-7e8ee000	Deferred        gdi32<elf>
  \-PE	7e7d0000-7e8ee000	\               gdi32
ELF	7e8f0000-7ead4000	Deferred        user32<elf>
  \-PE	7e900000-7ead4000	\               user32
ELF	7ee60000-7ee74000	Deferred        libnss_files.so.2
ELF	7ee78000-7ee93000	Deferred        libnsl.so.1
ELF	7ee98000-7eea6000	Deferred        libnss_nis.so.2
ELF	7eea8000-7eeb2000	Deferred        libnss_compat.so.2
ELF	7eeb8000-7efba000	Deferred        libm.so.6
ELF	7efc0000-7efd9000	Deferred        cfgmgr32<elf>
  \-PE	7efd0000-7efd9000	\               cfgmgr32
ELF	7efe0000-7effa000	Deferred        version<elf>
  \-PE	7eff0000-7effa000	\               version
ELF	f7ae8000-f7aed000	Deferred        libdl.so.2
ELF	f7af0000-f7ccc000	Deferred        libc.so.6
ELF	f7cd0000-f7cef000	Deferred        libpthread.so.0
ELF	f7d30000-f7ee6000	Dwarf           libwine.so.1
ELF	f7ee8000-f7f10000	Deferred        ld-linux.so.2
ELF	f7f13000-f7f15000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) C:\VulkanSDK\1.0.68.0\Bin32\cube.exe
	00000009    0 <==
0000000e services.exe
	00000022    0
	0000001d    0
	00000015    0
	00000014    0
	00000013    0
	00000010    0
	0000000f    0
00000011 winedevice.exe
	0000001a    0
	00000019    0
	00000018    0
	00000017    0
	00000016    0
	00000012    0
0000001b plugplay.exe
	0000001f    0
	0000001e    0
	0000001c    0
00000020 winedevice.exe
	00000029    0
	00000026    0
	00000025    0
	00000024    0
	00000023    0
	00000021    0
00000027 explorer.exe
	0000002c    0
	0000002b    0
	0000002a    0
	00000028    0
System information:
    Wine build: wine-3.6
    Platform: i386 (WOW64)
    Version: Windows 10
    Host system: Linux
    Host version: 4.16.0-041600-lowlatency
Comment 6 Timothy Arceri 2018-08-23 23:17:14 UTC
Should be fixed by:

commit	356f6673d695eb98c42d80f3c2b30fad746cdbba

radv: place pointer length into cache uuid

Thanks to reproducible builds, binary file timestamps may be identical
for both 32bit and 64bit packages when built from the same source.
This means radv will use the same cache for both 32 and 64 bit
processes, which leads to crashes.

Conveniently there is a spare byte in cache_uuid, let's place the
pointer size there.

Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"

CC: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107601
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105904
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.