gfx icon indicating copy to clipboard operation
gfx copied to clipboard

Sementation fault on Windows with Intel UHD Graphics 630

Open parasyte opened this issue 5 years ago • 7 comments

Short info header:

  • GFX version: gfx-hal 0.4.0
  • OS: Windows 10
  • GPU: Adapter Vulkan AdapterInfo { name: "Intel(R) UHD Graphics 630", vendor: 32902, device: 16027, device_type: IntegratedGpu }
  • Driver version: 24.20.100.6195 and 25.20.100.6444

See https://github.com/parasyte/pixels/issues/49#issuecomment-575665724 for additional information. Updating to driver version 26.20.100.7584 fixes the crash.

I think you might want to blacklist these old drivers that can cause crashes. The original report was filed against pixels, which only draws a single textured quad. Nothing fancy...

parasyte avatar Jan 17 '20 18:01 parasyte

Thank you for the report! Reading the issue, I'm slightly confused. It was reported on dx12 originally (in https://github.com/parasyte/pixels/issues/49#issuecomment-554403950), was it? But then at the end the report says it only happens on Vulkan (in https://github.com/parasyte/pixels/issues/49#issuecomment-575665724).

If the problem is about dx12, we found a crash in that place, and it is fixed in "gfx-backend-dx12-0.4.3". Would be great if somebody with a repro case could try and confirm that this indeed solves their crash.

kvark avatar Jan 18 '20 05:01 kvark

I can't be sure, but FWIW the paste link on this comment https://github.com/parasyte/pixels/issues/49#issuecomment-554395440 says it's using Vulkan.

parasyte avatar Jan 18 '20 21:01 parasyte

If they have a problem on Vulkan, and it's within adapter enumeration, the good thing to ask would be to run any ash examples.

kvark avatar Jan 18 '20 21:01 kvark

I found my way here from parasyte/pixels#49. I seem to have lost the original driver, but windows update installed 25.20.100.6444 for me which also crashes.

I ran the tringle example from ash. The access violation seems to happen somewhere in Swapchain::create_swapchain

Backtrace from LLDB
thread #1
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #2
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #3
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #4
    frame #0: 0x00007ffb86edf9f4 ntdll.dll`NtWaitForAlertByThreadId + 20
    frame #1: 0x00007ffb86ea0610 ntdll.dll`RtlSleepConditionVariableSRW + 304
    frame #2: 0x00007ffb841b599d KernelBase.dll`SleepConditionVariableSRW + 45
    frame #3: 0x00007ffb0e9afa68 igvk64.dll`vkDisplayModeControlINTEL + 2064712
* thread #5, stop reason = Exception 0xc0000005 encountered at address 0x7ffb0d64ef86: Access violation reading location 0x000001c8
  * frame #0: 0x00007ffb0d64ef86 ig9icd64.dll`DumpRegistryKeyDefinitions + 60326
  thread #6
    frame #0: 0x00007ffb86edcc14 ntdll.dll`NtWaitForMultipleObjects + 20
    frame #1: 0x00007ffb841e8027 KernelBase.dll`WaitForMultipleObjectsEx + 263
    frame #2: 0x00007ffb841e7f0e KernelBase.dll`WaitForMultipleObjects + 14
  thread #7
    frame #0: 0x00007ffb84d21164 win32u.dll`NtUserGetMessage + 20
    frame #1: 0x00007ffb84fd394d user32.dll`GetMessageW + 45
    frame #2: 0x00007ff6a75a7ba0 triangle.exe`void winit::platform::platform::events_loop::{{impl}}::with_dpi_awareness::{{closure}}(struct winit::platform::platform::events_loop::{{impl}}::with_dpi_awareness::closure-0) at events_loop.rs:180
    frame #3: 0x00007ff6a7572851 triangle.exe`void std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,()>(f=<unavailable>) at backtrace.rs:129
    frame #4: 0x00007ff6a75782d1 triangle.exe`void std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,()>(struct std::thread::{{impl}}::spawn_unchecked::{{closure}}::closure-0) at mod.rs:475
    frame #5: 0x00007ff6a7579b91 triangle.exe`void std::panic::{{impl}}::call_once<(),closure-0>(self=<unavailable>, _args=<unavailable>) at panic.rs:318
    frame #6: 0x00007ff6a757ac24 triangle.exe`void std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,()>(data="") at panicking.rs:305
    frame #7: 0x00007ff6a75fc232 triangle.exe`void panic_unwind::__rust_maybe_catch_panic() at lib.rs:86
    frame #8: 0x00007ff6a757aa8a triangle.exe`union core::result::Result<(), alloc::boxed::Box<Any>> std::panicking::try<(f=<unavailable>),std::panic::AssertUnwindSafe<closure-0>>(struct std::panic::AssertUnwindSafe<closure-0>) at panicking.rs:281
    frame #9: 0x00007ff6a757a811 triangle.exe`union core::result::Result<(), alloc::boxed::Box<Any>> std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,(f=<unavailable>)>(struct std::panic::AssertUnwindSafe<closure-0>) at panic.rs:394
    frame #10: 0x00007ff6a7578123 triangle.exe`void std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,()>(struct std::thread::{{impl}}::spawn_unchecked::closure-0) at mod.rs:474
    frame #11: 0x00007ff6a759f4b3 triangle.exe`void core::ops::function::FnOnce::call_once<closure-0,()>(=0x000000555c8ffcb0, =<unavailable>) at function.rs:232
    frame #12: 0x00007ff6a75eec47 triangle.exe`static void alloc::boxed::{{impl}}::call_once<(),FnOnce<()>>() at boxed.rs:1015
    frame #13: 0x00007ff6a7613040 triangle.exe
  thread #8
    frame #0: 0x00007ffb86edcc14 ntdll.dll`NtWaitForMultipleObjects + 20
    frame #1: 0x00007ffb841e8027 KernelBase.dll`WaitForMultipleObjectsEx + 263
    frame #2: 0x00007ffb841e7f0e KernelBase.dll`WaitForMultipleObjects + 14
  thread #9
    frame #0: 0x00007ffb86edcc14 ntdll.dll`NtWaitForMultipleObjects + 20
    frame #1: 0x00007ffb841e8027 KernelBase.dll`WaitForMultipleObjectsEx + 263
    frame #2: 0x00007ffb84058f46 crypt32.dll`CryptSIPGetSignedDataMsg + 278
  thread #10
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #11
    frame #0: 0x00007ffb86edc144 ntdll.dll`NtWaitForSingleObject + 20
  thread #12
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #13
    frame #0: 0x00007ffb84d29a84 win32u.dll`NtUserMsgWaitForMultipleObjectsEx + 20
    frame #1: 0x00007ffb84fd1c0d user32.dll`MsgWaitForMultipleObjectsEx + 157
    frame #2: 0x00007ffb84fd1af3 user32.dll`MsgWaitForMultipleObjects + 67
    frame #3: 0x00007ffb0ba68c0f nvoglv64.dll`DrvValidateVersion + 17343
  thread #14
    frame #0: 0x00007ffb86edfa54 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20

I was able to step ìnto with the debugger until the call to self.create_swapchain_khr in vk.rs:53882

I don't have much experience debugging stuff like this (especially on windows). Let me know, if there is anything else I can provide.

In the original issue it was mentioned the wpgu's cube example works. But I can't get the cube example to run on Intel, it uses Nvidia even when I pass PowerPreference::LowPower in framework.rs

kbleeke avatar Jan 20 '20 09:01 kbleeke

Thanks for the info @pluth ! @parasyte we already have limited feature blacklisting but we aren't checking for the driver version yet. Let this issue be a task to add this case.

kvark avatar Jan 20 '20 15:01 kvark

I also have this problem (as described here) when using Intel HD Graphics 4600 on an Intel Core i7-4790K, driver version 20.19.15.5126, which Intel Driver & Support Assistant says is the latest version.

ceranco avatar Jul 17 '20 16:07 ceranco

@ceranco it may very well be that Intel isn't interested in updating the driver for this GPU, since it's quite old...

kvark avatar Jul 17 '20 16:07 kvark