https://bugs.winehq.org/show_bug.cgi?id=55140
Bug ID: 55140 Summary: GPU Caps Viewer 1.60 can crash with Nvidia GPU when additional Nvidia libraries are present Product: Wine Version: 8.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: saancreed@gmail.com Regression SHA1: 354a8bb1f4a65bdec052606f2799db9e2907b5b1 Distribution: ---
Created attachment 74704 --> https://bugs.winehq.org/attachment.cgi?id=74704 Backtrace from wine-8.9
A particular setup of GPU Caps Viewer 1.60, when paired together with reimplementations of some Nvidia libraries, crashes in its own code after upgrading Wine to release 8.9 or later. I've bisected this problem to commit 354a8bb1f4a65bdec052606f2799db9e2907b5b1 which can be reverted to make the program function again.
The setup required to reproduce the issue might be quite convoluted, so bear with me:
1. Get a system with Nvidia GPU and their proprietary driver, making sure that 32-bit `libnvidia-ml.so.1` is installed and can be found by `dlopen` 2. Get a build of Wine that includes commit 354a8bb1f4a65bdec052606f2799db9e2907b5b1 and doesn't use experimental wow64 mode and drop wine-nvml into that Wine's libdirs (https://github.com/Saancreed/wine-nvml, see build/install instructions, there are prebuilt binaries on GH Actions) 3. Create a prefix and install into it at least 32-bit versions of: a. DXVK (https://github.com/doitsujin/dxvk) b. DXVK-NVAPI (https://github.com/jp7677/dxvk-nvapi) 4. Get GPU Caps Viewer from https://www.geeks3d.com/dl/show/718, sha256sum of that zip should be fcdd0992fdd36660a7561d6d5a9d3e64e653c7d5cc5cae2856634f6a003ae731. Unzip it somewhere and run `wine GPU_Caps_Viewer.exe`. If everything went right, it should see Nvidia GPU, load NVAPI, then load NVML, make a few NVML calls and cause a segfault after one such call returns.
Attached is the backtrace made with Wine 8.9 from Arch Linux repositories. Unfortunately, the application seems to enter the problematic code path only when all the mentioned libraries are present, which actually suggests another possibility: that this is an application bug that simply went undetected on Windows because there is no 32-bit `nvml.dll` provided by Nvidia. I have no idea if this works on Windows, or if it ever worked at all, but I find it curious that it used to work in Wine (when my wine-nvml wrapper was present) and it doesn't anymore.