microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6.04k stars 2.03k forks source link

Getting access violation with Linked GPU example "sometimes!" #548

Open zezba9000 opened 5 years ago

zezba9000 commented 5 years ago

Think there is a race condition in the Linked GPU example. If I breakpoint on line 191 and increase the resolution to 1080p etc then continue to run I'll sometime hit an access violation.

Exception thrown at 0x00007FFCC8C221EA (nvwgf2umx.dll) in D3D12LinkedGpus.exe: 0xC0000005: Access violation reading location 0x0000020B440EC2AC.

Win 10 x64 1809 Two Nvidia SLI / Linked GTX 960's i3-7100 CPU

Also when I run this test on a Crossfire R9 280x setup it blue-screens windows.

Phil-Lewin commented 1 year ago

I have just upgraded to two evga 3090 ftw3 cards and the debug build of Linked GPU sample crashes with same exception after 1 second of execution every time! Call stack:-

nvwgf2umx.dll!00007ffa86aa69bb()    Unknown
nvwgf2umx.dll!00007ffa86aa6737()    Unknown
nvwgf2umx.dll!00007ffa86aa3a30()    Unknown
nvwgf2umx.dll!00007ffa87c37192()    Unknown
nvwgf2umx.dll!00007ffa87c35a30()    Unknown
nvwgf2umx.dll!00007ffa87c353e6()    Unknown
nvwgf2umx.dll!00007ffa87c49b54()    Unknown
nvwgf2umx.dll!00007ffa87c2b3d1()    Unknown
nvwgf2umx.dll!00007ffa87c2a4bb()    Unknown
nvwgf2umx.dll!00007ffa87c2811c()    Unknown
nvwgf2umx.dll!00007ffa87c3c423()    Unknown
nvwgf2umx.dll!00007ffa87c3d5c7()    Unknown
nvwgf2umx.dll!00007ffa87c59248()    Unknown

D3D12Core.dll!CCommandQueue<0>::ExecuteCommandListsImpl(unsigned int,struct ID3D12CommandList const ) Unknown D3D12Core.dll!CCommandQueue<0>::ExecuteCommandLists(unsigned int,struct ID3D12CommandList const ) Unknown d3d12SDKLayers.dll!00007ff9e0903b9c() Unknown d3d12SDKLayers.dll!00007ff9e0907bf1() Unknown d3d12SDKLayers.dll!00007ff9e0906f2d() Unknown ntdll.dll!TppWorkpExecuteCallback() Unknown ntdll.dll!TppWorkerThread() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown

The D3D12LinkedGpusAffinity runs for a bit longer but crashes in similar fashion.

nvwgf2umx.dll!00007ffa86aa69bb() Unknown nvwgf2umx.dll!00007ffa86aa6737() Unknown nvwgf2umx.dll!00007ffa86aa3a30() Unknown nvwgf2umx.dll!00007ffa87c37192() Unknown nvwgf2umx.dll!00007ffa87c35a30() Unknown nvwgf2umx.dll!00007ffa87c353e6() Unknown nvwgf2umx.dll!00007ffa87c49b54() Unknown nvwgf2umx.dll!00007ffa87c2b3d1() Unknown nvwgf2umx.dll!00007ffa87c2a4bb() Unknown nvwgf2umx.dll!00007ffa87c2811c() Unknown nvwgf2umx.dll!00007ffa87c3c423() Unknown nvwgf2umx.dll!00007ffa87c3d5c7() Unknown nvwgf2umx.dll!00007ffa87c59248() Unknown D3D12Core.dll!CCommandQueue<0>::ExecuteCommandListsImpl(unsigned int,struct ID3D12CommandList const ) Unknown D3D12Core.dll!CCommandQueue<0>::ExecuteCommandLists(unsigned int,struct ID3D12CommandList const ) Unknown d3d12SDKLayers.dll!NDebug::CCommandQueue::ExecuteCommandListsImpl(class NDebug::CInterfaceSentinel::CFunctionSentinel &,unsigned int,struct ID3D12CommandList const ,class NDebug::CCastableCommandList const ) Unknown d3d12SDKLayers.dll!NDebug::CCommandQueue::DeferredCommand<void ( ID3D12CommandQueue::)(unsigned int,struct ID3D12CommandList const )>::Invoke(class NDebug::CCommandQueue ) Unknown d3d12SDKLayers.dll!NDebug::CCommandQueue::WaitForFenceValueThreadProc(struct _TP_CALLBACK_INSTANCE ,void ,struct _TP_WORK *) Unknown ntdll.dll!TppWorkpExecuteCallback() Unknown ntdll.dll!TppWorkerThread() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown

VS2022 Community edition. OS Name Microsoft Windows 10 Pro Version 10.0.19044 Build 19044 Processor Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz, 3000 Mhz, 18 Core(s), 36 Logical Processor(s) DirectX version: 12.0 GPU processor: NVIDIA GeForce RTX 3090 x 2 SLI with NVLink Driver version: 526.47

Release build of same code runs fine.

zezba9000 commented 1 year ago

@Phil-Lewin I've since made stable Linked-GPU support. The example is missing I think is missing some resource lock before or after present but its been so long I can't remember. Frankly the example is a fragmented mess.