Device kernel image is invalid
#1
Hi all,

I have a problem when running hashcat on Windows 10x64. Here are my setup and versions:

Windows 10x64
AMD Ryzen 7 5800X 8-Core Processor
Nvidia GeForce RTX 2080 Super
Nvidia Game Ready Driver 511.23
Cuda Toolkit 11.6.0_511.23
Hashcat 6.2.5

Here is the message I have when I try to run a benchmark with example0.cmd :

Code:
E:\Tools\hashcat-6.2.5>hashcat -b -m 22000
hashcat (v6.2.5) starting in benchmark mode

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

* Device #1: WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch
* Device #2: WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch
CUDA API (CUDA 11.6)
====================
* Device #1: NVIDIA GeForce RTX 2080 SUPER, 7137/8191 MB, 48MCU

OpenCL API (OpenCL 3.0 CUDA 11.6.58) - Platform #1 [NVIDIA Corporation]
=======================================================================
* Device #2: NVIDIA GeForce RTX 2080 SUPER, skipped

Benchmark relevant options:
===========================
* --optimized-kernel-enable

-------------------------------------------------------------
* Hash-Mode 22000 (WPA-PBKDF2-PMKID+EAPOL) [Iterations: 4095]
-------------------------------------------------------------

cuModuleLoadDataEx(): device kernel image is invalid

* Device #1: Kernel ./OpenCL/markov_le.cl load failed. Error Log:

error  : Binary format for key='0', ident='' is not recognized


* Device #1: Kernel ./OpenCL/markov_le.cl build failed.

Started: Sun Jan 30 11:43:51 2022
Stopped: Sun Jan 30 11:44:03 2022

It works with example400.cmd and example500.cmd but not example0.cmd. I also have the same issue with:

Code:
E:\Tools\hashcat-6.2.5\hashcat.exe -w 2 -b

Before I installed Cuda 11.6, I had Cuda 11.4 and my whole PC just crashed (black screen no cursor, keyboard and mouse RGB went off...) when I tried to run a benchmark. Any tips ?

Thank you
Reply
#2
I managed to fix the "device kernel image is invalid" by compiling hashcat using WSL. However, I am back to the stage where when I run a benchmark, I instantly get a blackscreen that shuts down everything (no more keyboard, mouse, screen...)

No specific message in event viewer.
Reply
#3
well the problem with this error is, it could be anything

to high powerconsumption, to low power from your psu, keyboard and mouse offline, could be a motherboard issue, did you have any related errors when playing games?

try downloading a graphics benchmark and go to highest settings to stress your gpu to see if it is a gpu/poer consumption error

and first of all, see this warning

WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch

plz download this patch and restart your pc and try again

and you dont need -w option for benchmarking
Reply
#4
(01-31-2022, 12:04 PM)Snoopy Wrote: well the problem with this error is, it could be anything

to high powerconsumption, to low power from your psu, keyboard and mouse offline, could be a motherboard issue, did you have any related errors when playing games?

try downloading a graphics benchmark and go to highest settings to stress your gpu to see if it is a gpu/poer consumption error

and first of all, see this warning

WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch

plz download this patch and restart your pc and try again

and you dont need -w option for benchmarking

I ran 3DMark TimeSpy without any issue. I however had some random computer freezes (that needed a reboot) while playing Control, but no black screen). The black screen is instant, the first sec the benchmark starts with hashcat. I'll try the timeout patch and see how it goes, thanks !

Oh, and now I have "kernel device image invalid" with example400.cmd and example500.cmd and not example0.cmd. But example0.cmd crashes my PC lol. Before I recompiled example400 and example500 worked but not example0.
Reply
#5
After applying the patch, I still have the same issue. Instant blackscreen. I'll try to clean the computer and check for any wiring issues. I don't understand that it can support a 3DMark stress test and instantly crash with hashcat.
Reply
#6
have you tried just using the precompiled binaries rather than building from source?
Reply
#7
(02-01-2022, 12:36 AM)slyexe Wrote: have you tried just using the precompiled binaries rather than building from source?

Yes, with the precompiled binaries I have this error on example0.cmd but not on example400.cmd and example500.cmd

With the one I compiled I have this error on example400.cmd and example500.cmd. Example0.cmd runs without error but instantly crashes my computer.

I have a hard time making sense of this.
Reply
#8
well im really sorry, but i cannot help you any further with this

maybe it is driver related or hardware , its hard to test from "far away"

the only thing you maybe could test is the following, hashcat will use the cuda backend by default, but you could try to force hahscat to use the opencl instead, given your example from above you have to add options

Code:
-D2 -d2

to your command line, if this also results in instant blackscreen i dont have any clue other than, yeah well thats personal computers, dont know what they are goood for and what they are doing
Reply
#9
(02-03-2022, 04:07 PM)Snoopy Wrote: well im really sorry, but i cannot help you any further with this

maybe it is driver related or hardware , its hard to test from "far away"

the only thing you maybe could test is the following, hashcat will use the cuda backend by default, but you could try to force hahscat to use the opencl instead, given your example from above you have to add options

Code:
-D2 -d2

to your command line, if this also results in instant blackscreen i dont have any clue other than, yeah well thats personal computers, dont know what they are goood for and what they are doing

Thanks, seems like I didn't got any crash with OpenCL. However I still have some errors, I'll try to make a clean install of my drivers (again). This is the errors I got on some benchmarks:

Code:
-------------------------------------------------------------
* Hash-Mode 22000 (WPA-PBKDF2-PMKID+EAPOL) [Iterations: 4095]
-------------------------------------------------------------

clCreateKernel(): CL_INVALID_KERNEL_NAME

* Device #2: Kernel amp create failed.
-----------------------
* Hash-Mode 1000 (NTLM)
-----------------------

Speed.#2.........: 23435.4 MH/s (8.47ms) @ Accel:64 Loops:256 Thr:256 Vec:1

---------------------
* Hash-Mode 3000 (LM)
---------------------

* Device #2: ATTENTION! OpenCL kernel self-test failed.

Your device driver installation is probably broken.
See also: https://hashcat.net/faq/wrongdriver
Reply
#10
Instead of compiling for yourself, you could also test the compiled githhub betas here

https://hashcat.net/beta/

another test would be, after clean driver install and so on, deleting already compiled kernels for specific modes(folder kernels) to force hahscat to compile them again
Reply