docker-hashcat icon indicating copy to clipboard operation
docker-hashcat copied to clipboard

CL_PLATFORM_NOT_FOUND_KHR

Open peckerle opened this issue 4 years ago • 8 comments

Running hashcat command works on my mac but errors out on clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR when running on ubuntu 18.04 Bionic. I have tried both intel-cpu and latest tagged images and both have the same errors. I see this is related to https://github.com/dizcza/docker-hashcat/issues/2, is the fix the same?

peckerle avatar Feb 05 '20 02:02 peckerle

UPDATE 08.06.22

nvidia-full is a deprecated (and misleading) tag created at the time when Hashcat had no CUDA support whatsoever. nvidia-full is an old build of Hashcat with OpenCL (not CUDA!).

Original response below


Do you have GPUs? :latest and :nvidia-full tags run only on GPU containers. Please try :nvidia-full tag as I've described in #4 . If you don't have nvidia GPUs, the steps to alleviate the problems are different. Let me know.

dizcza avatar Feb 05 '20 11:02 dizcza

No I do not have GPUs. I'm still having the same issue with the :nvidia-full tag. I have removed the other images as described in the previous ticket as well.

peckerle avatar Feb 05 '20 15:02 peckerle

Then it means OpenCL driver is not properly installed for your graphics card or hashcat simply does not support your graphics card -- or rather it cannot/does not know how to talk with linux Intel OpenCL driver in :intel-cpu image (because you mentioned it works with Mac OS). That happens to me with new amazon AWS simple CPU instances.

Is your graphics card integrated Intel? Otherwise, :intel-cpu won't work.

If yes, try installing Intel OpenCL driver as described here https://github.com/hashcat/hashcat/issues/1207 or building the driver manually https://software.intel.com/en-us/articles/opencl-drivers#latest_CPU_runtime. Make sure you're running Ubuntu 16.x -- driver complains that it does not support Ubuntu 18.x, however, in my case, it either works for both 16.x and 18.x or works for neither of them (as I currently experience with AWS CPU instances).

dizcza avatar Feb 06 '20 08:02 dizcza

After installing Intel CPU OpenCL runtime, please download hashcat-v5.1.0 archived source code, extract it and build hashcat manually. It's very straightforward - make && make install.

dizcza avatar Feb 24 '20 20:02 dizcza

Just a small question, when I run the command "nvidia-smi" it shows me CUDA version: 11.0 instead of 10.2 do you know why?

fa1rid avatar Aug 06 '20 06:08 fa1rid

@fa1rid maybe because you've installed CUDA 11 on your host system, which is shared with docker containers, and then a docker container picks 11 in favor of installed 10.2 at runtime.

dizcza avatar Aug 06 '20 06:08 dizcza

Confirmed fixed using :nvidia-full instead of :cuda ???

chrisbward avatar Jun 07 '22 19:06 chrisbward

nvidia-full is a deprecated (and misleading) tag created at the time when Hashcat had no CUDA support whatsoever. It's is an old build of Hashcat with OpenCL (not CUDA!).

CL_PLATFORM_NOT_FOUND_KHR means that Hashcat could find neither CUDA nor OpenCL backend. Try running the containers in the following order until you succeed:

  • if you have a GPU card: cuda, latest;
  • if you don't have GPU cards: intel-gpu, intel-cpu, pocl

POCL should be the last resort.

dizcza avatar Jun 08 '22 06:06 dizcza