[MacPorts] #68483: hashcat @6.2.5_0: "No devices found/left" message on Apple M1 Max chip
MacPorts
noreply at macports.org
Mon Oct 16 02:46:16 UTC 2023
#68483: hashcat @6.2.5_0: "No devices found/left" message on Apple M1 Max chip
----------------------+---------------------------
Reporter: JDLH | Owner: gaming-hacker
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: hashcat |
----------------------+---------------------------
Old description:
> hashcat is a tool designed to run on GPUs, not CPUs. It has a range of
> code to detect available GPUs. It appears to be unable to use the GPU of
> the Apple M1 Max chip on my mac.
>
> **To reproduce**: Perform any crack attempt, e.g. the one described in
> their [https://github.com/hashcat/hashcat/blob/master/example0.sh
> example0.sh]:
> {{{
> % hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
> '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
> }}}
>
> **Observed behaviour**:
> {{{
> % hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
> '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
> hashcat (v6.2.5) starting
>
> No devices found/left.
>
> Started: Sun Oct 15 18:21:43 2023
> Stopped: Sun Oct 15 18:21:43 2023
> }}}
>
> The message "No devices found/left" seems to say that hashcat was unable
> to find the M1 Max GPU, so gave up.
>
> **Expected behaviour**:
> No error message, "No devices found/left".
>
> Hashcat successfully cracks the example password.
>
> **Discussion**:
>
> My Mac is a MacBookPro18,2, with an Apple M1 Max chip having 10 cores (8
> performance and 2 efficiency).
>
> This is what Hashcat detects for my GPUs:
>
> {{{
> % hashcat -I
> hashcat (v6.2.5) starting in backend information mode
>
> OpenCL Info:
> ============
>
> OpenCL Platform ID #1
> Vendor..: Apple
> Name....: Apple
> Version.: OpenCL 1.2 (Aug 17 2023 05:46:52)
>
> Backend Device ID #1
> Type...........: GPU
> Vendor.ID......: 2
> Vendor.........: Apple
> Name...........: Apple M1 Max
> Version........: OpenCL 1.2
> Processor(s)...: 32
> Clock..........: 1000
> Memory.Total...: 49152 MB (limited to 4608 MB allocatable in one
> block)
> Memory.Free....: 24512 MB
> OpenCL.Version.: OpenCL C 1.2
> Driver.Version.: 1.2 1.0
> }}}
>
> The `-D 2` option apparently forces hashcat to choose a GPU over a CPU to
> use for its work. When I include that option, I get a runtime error:
> {{{
> % hashcat -D 2 -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
> '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
> hashcat (v6.2.5) starting
>
> * Device #1: Apple's OpenCL drivers (GPU) are known to be unreliable.
> You have been warned.
>
> OpenCL API (OpenCL 1.2 (Aug 17 2023 05:46:52)) - Platform #1 [Apple]
> ====================================================================
> * Device #1: Apple M1 Max, 24512/49152 MB (4608 MB allocatable), 32MCU
>
> Minimum password length supported by kernel: 0
> Maximum password length supported by kernel: 256
>
> Dictionary cache built:
> * Filename..: /opt/local/share/doc/hashcat/example.dict
> * Passwords.: 128416
> * Bytes.....: 1069601
> * Keyspace..: 128416
> * Runtime...: 0 secs
>
> Hashes: 6494 digests; 6494 unique digests, 1 unique salts
> Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13
> rotates
>
> Optimizers applied:
> * Zero-Byte
> * Early-Skip
> * Not-Salted
> * Not-Iterated
> * Single-Salt
> * Raw-Hash
>
> ATTENTION! Pure (unoptimized) backend kernels selected.
> Pure kernels can crack longer passwords, but drastically reduce
> performance.
> If you want to switch to optimized kernels, append -O to your
> commandline.
> See the above message to find out about the exact limits.
>
> Watchdog: Hardware monitoring interface not found on your system.
> Watchdog: Temperature abort trigger disabled.
>
> Initializing backend runtime for device #1. Please be
> patient...UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
> clBuildProgram(): CL_BUILD_PROGRAM_FAILURE
>
> Compilation failed:
>
> program_source:7:10: fatal error: 'inc_vendor.h' file not found
> #include "inc_vendor.h"
> ^~~~~~~~~~~~~~
>
> * Device #1: Kernel /opt/local/share/hashcat/OpenCL/shared.cl build
> failed.
>
> Started: Sun Oct 15 18:30:21 2023
> Stopped: Sun Oct 15 18:30:25 2023
> }}}
>
> Adding the `-O` option does not change the end result: failure, with the
> same message.
>
> The
> [https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#installation
> Hashcat project's installation FAQ] mentions Windows and Linux, but not
> macOS. It mentions OpenCL, AMD, and nVidia, but not Apple or Apple's
> [https://developer.apple.com/documentation/metal/ Metal framework]. Their
> [https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_can_i_make_sure_that_my_gpu_is_supported
> Supported GPUs FAQ] similarly does not mention Apple or Apple Silicon or
> M1. It is interesting that the error message does mention "metal",
> however.
New description:
hashcat is a tool designed to run on GPUs, not CPUs. It has a range of
code to detect available GPUs. It appears to be unable to use the GPU of
the Apple M1 Max chip on my mac.
**To reproduce**: Perform any crack attempt, e.g. the one described in
their [https://github.com/hashcat/hashcat/blob/master/example0.sh
example0.sh]:
{{{
% hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
'?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
}}}
**Observed behaviour**:
{{{
% hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
'?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
hashcat (v6.2.5) starting
No devices found/left.
Started: Sun Oct 15 18:21:43 2023
Stopped: Sun Oct 15 18:21:43 2023
}}}
The message "No devices found/left" seems to say that hashcat was unable
to find the M1 Max GPU, so gave up.
**Expected behaviour**:
No error message, "No devices found/left".
Hashcat successfully cracks the example password.
**Discussion**:
My Mac is a MacBookPro18,2, with an Apple M1 Max chip having 10 cores (8
performance and 2 efficiency).
This is what Hashcat detects for my GPUs:
{{{
% hashcat -I
hashcat (v6.2.5) starting in backend information mode
OpenCL Info:
============
OpenCL Platform ID #1
Vendor..: Apple
Name....: Apple
Version.: OpenCL 1.2 (Aug 17 2023 05:46:52)
Backend Device ID #1
Type...........: GPU
Vendor.ID......: 2
Vendor.........: Apple
Name...........: Apple M1 Max
Version........: OpenCL 1.2
Processor(s)...: 32
Clock..........: 1000
Memory.Total...: 49152 MB (limited to 4608 MB allocatable in one
block)
Memory.Free....: 24512 MB
OpenCL.Version.: OpenCL C 1.2
Driver.Version.: 1.2 1.0
}}}
The `-D 2` option apparently forces hashcat to choose a GPU over a CPU to
use for its work. When I include that option, I get a runtime error:
{{{
% hashcat -D 2 -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash
'?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
hashcat (v6.2.5) starting
* Device #1: Apple's OpenCL drivers (GPU) are known to be unreliable.
You have been warned.
OpenCL API (OpenCL 1.2 (Aug 17 2023 05:46:52)) - Platform #1 [Apple]
====================================================================
* Device #1: Apple M1 Max, 24512/49152 MB (4608 MB allocatable), 32MCU
Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256
Dictionary cache built:
* Filename..: /opt/local/share/doc/hashcat/example.dict
* Passwords.: 128416
* Bytes.....: 1069601
* Keyspace..: 128416
* Runtime...: 0 secs
Hashes: 6494 digests; 6494 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13
rotates
Optimizers applied:
* Zero-Byte
* Early-Skip
* Not-Salted
* Not-Iterated
* Single-Salt
* Raw-Hash
ATTENTION! Pure (unoptimized) backend kernels selected.
Pure kernels can crack longer passwords, but drastically reduce
performance.
If you want to switch to optimized kernels, append -O to your commandline.
See the above message to find out about the exact limits.
Watchdog: Hardware monitoring interface not found on your system.
Watchdog: Temperature abort trigger disabled.
Initializing backend runtime for device #1. Please be
patient...UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
clBuildProgram(): CL_BUILD_PROGRAM_FAILURE
Compilation failed:
program_source:7:10: fatal error: 'inc_vendor.h' file not found
#include "inc_vendor.h"
^~~~~~~~~~~~~~
* Device #1: Kernel /opt/local/share/hashcat/OpenCL/shared.cl build
failed.
Started: Sun Oct 15 18:30:21 2023
Stopped: Sun Oct 15 18:30:25 2023
}}}
Adding the `-O` option does not change the end result: failure, with the
same message.
The
[https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#installation
Hashcat project's installation FAQ] mentions Windows and Linux, but not
macOS. It mentions OpenCL, AMD, and nVidia, but not Apple or Apple's
[https://developer.apple.com/documentation/metal/ Metal framework]. Their
[https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_can_i_make_sure_that_my_gpu_is_supported
Supported GPUs FAQ] similarly does not mention Apple or Apple Silicon or
M1. It is interesting that the error message does mention "metal",
however.
--
Comment (by ryandesign):
MacPorts distributes software made by other developers; we don't develop
that software. If you want hashcat to support Apple Silicon GPUs, file a
bug report / enhancement request with its developers.
--
Ticket URL: <https://trac.macports.org/ticket/68483#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list