Open GKNSB opened 5 years ago
We do mention Mesa in doc/README-OPENCL
. While it may eventually become stable enough that we could start working around remaining problems, they are not there yet. Your best bet is trying a proprietary driver but AMD drivers have their share of problems as well, unfortunately...
Then again you could of course report a bug with them instead!
True, I just wanted to let you guys know about the latest status. I'll look into it more and update the issue accordingly even with proprietary drivers so that there is a reference for anyone else interested. Thanks a lot for the reply @magnumripper. Cheers
According to @AlekseyCherepanov, almost half of our OpenCL formats now work with Mesa:
https://www.openwall.com/lists/john-users/2021/11/27/1
See also https://github.com/openwall/john/issues/3610#issuecomment-982652301 for the much better status with amdgpu-pro.
@GKNSB DRM 2.50.0
in the output suggests that you use radeon
driver. You might try to switch to amdgpu
driver (it should be already installed).
I used this advice to switch driver. (.si / .cik seem messed up there. Gentoo's wiki suggests pitcairn belongs to Southern Islands
family. [Arch's wiki] suggests Southern Islands
use .si_support
argument.)
Also I tried blacklisting radeon driver as described here. It did not work for me.
You may check which driver is active using lspci -v
:
[...]
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] (rev 80) (prog-if 00 [VGA controller])
[...]
Kernel driver in use: amdgpu
Kernel modules: radeon, amdgpu
[...]
If none of formats work at all, you may need to install non-free package with firmware for gpu. I installed it as dependency of broad package firmware-linux
on Debian.
On mesa krb5asrep-aes-opencl and sappse-opencl formats get stuck during --test.
^C or kill -9
cannot quit john. Reboot with command reboot
helps but takes unusual 5+ minutes. Before ^C it is possible to use clinfo. After ^C clinfo gets stuck too.
(Previously with amdgpu-pro I had gpu stuck and reboot
was not able to reboot machine actually, so I had to use reset button. I had older kernel, so I guess the ability to reboot
is not question of mesa vs amdgpu-pro.)
krb5asrep-aes-opencl gets stuck during auto-tuning. Setting LWS/GWS manually bypasses this problem.
$ ./run/john --test --format=krb5asrep-aes-opencl --verbosity=6
initUnicode(UNICODE, RAW/RAW)
RAW -> RAW -> RAW
Device 1: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.40.0, 5.10.0-9-amd64, LLVM 11.0.1)
Benchmarking: krb5asrep-aes-opencl, Kerberos 5 AS-REP etype 17/18 [PBKDF2-SHA1 OpenCL 4x]... Loaded 3 hashes with 3 different salts to test db from test vectors
TestDB LWS=7 GWS=49 (7 blocks) PASS,
Test mask: ?a?a?l?u?d?d?s
Calculating best GWS for LWS=64; max. 100 ms single kernel invocation.
Raw speed figures including buffer transfers:
Tuning for password length 7
xfer: 445 ns, init: 356.593 us, loop: 78x6.937 ms, final: 241.037 us, asrep: 1.420 ms, res xfer: 161.333 us
gws: 128 942 c/s 15433728 rounds/s 543.447 ms per crypt_all()!
xfer: 445 ns, init: 357.926 us, loop: 78x7.277 ms, final: 241.926 us, asrep: 1.783 ms, res xfer: 135.259 us
gws: 256 1795 c/s 29409280 rounds/s 570.289 ms per crypt_all()+
xfer: 445 ns, init: 442.963 us, loop: 78x7.308 ms, final: 313.926 us, asrep: 2.428 ms, res xfer: 145.334 us
gws: 512 3570 c/s 58490880 rounds/s 573.564 ms per crypt_all()+
xfer: 296 ns, init: 888 us, loop: 78x7.263 ms, final: 666.963 us, asrep: 3.718 ms, res xfer: 159.111 us
gws: 1024 7158 c/s 117276672 rounds/s 572.151 ms per crypt_all()!
xfer: 297 ns, init: 1.292 ms, loop: 78x7.293 ms, final: 851.703 us, asrep: 6.710 ms, res xfer: 179.703 us
gws: 2048 14170 c/s 232161280 rounds/s 578.087 ms per crypt_all()+
xfer: 445 ns, init: 2.376 ms, loop: 78x7.597 ms, final: 1.515 ms, asrep: 20.263 ms, res xfer: 218.074 us
gws: 4096 26550 c/s 434995200 rounds/s 617.087 ms per crypt_all()+
xfer: 444 ns, init: 5.109 ms, loop: 78x7.782 ms, final: 1.553 ms, asrep: 6.140 ms, res xfer: 257.186 us
gws: 8192 52829 c/s 865550336 rounds/s 620.257 ms per crypt_all()+
xfer: 296 ns, init: 1.113 ms, loop: 78x14.515 ms, final: 852.148 us, asrep: 10.199 ms, res xfer: 397.630 us
gws: 16384 57233 c/s 937705472 rounds/s 1.145 s per crypt_all()+
xfer: 445 ns, init: 1.946 ms, loop: 78x28.774 ms, final: 1.520 ms, asrep: 17.614 ms, res xfer: 457.777 us
gws: 32768 57829 c/s 947470336 rounds/s 2.266 s per crypt_all()+
xfer: 296 ns, init: 3.926 ms, loop: 78x50.503 ms, final: 3.013 ms, asrep: 31.419 ms, res xfer: 693.926 us
gws: 65536 65876 c/s 1079312384 rounds/s 3.979 s per crypt_all()+
xfer: 296 ns, init: 7.755 ms, loop: 78x93.978 ms, final: 5.982 ms, asrep: 59.280 ms, res xfer: 1.260 ms
gws: 131072 70788 c/s 1159790592 rounds/s 7.406 s per crypt_all()+
sappse-opencl gets stuck before auto-tuning. (Setting LWS/GWS did not help. I tried values 1/1 and 16/4096.)
$ time ./run/john --test --format=sappse-opencl --verbosity=6
initUnicode(UNICODE, RAW/RAW)
RAW -> RAW -> RAW
Device 1: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.40.0, 5.10.0-9-amd64, LLVM 11.0.1)
Benchmarking: sappse-opencl, SAP PSE [PKCS#12 PBE (SHA1) OpenCL]... Loaded 5 hashes with 5 different salts to test db from test vectors
TestDB LWS=7 GWS=49 (7 blocks)
Somehow nt-opencl
fail self-tests starting real attack, while --test
reports success.
$ ./john/run/john --format=nt-opencl --device=1 --test=0
Device 1: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.40.0, 5.10.0-9-amd64, LLVM 11.0.1)
Testing: NT-opencl [MD4 OpenCL]... PASS
$ ./john/run/john --format=nt-opencl --device=1 --test
Device 1: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.40.0, 5.10.0-9-amd64, LLVM 11.0.1)
Benchmarking: NT-opencl [MD4 OpenCL/mask accel]... Build log: input.cl:332:18: warning: unknown attribute 'max_constant_size' ignored [-Wunknown-attributes]
LWS=256 GWS=163840 (640 blocks) x8580 DONE
Raw: 9742M c/s real, 196804M c/s virtual
$ ./john/run/john --format=nt-opencl --device=1 --mask='?a?a?a?a?a?a?a' <(echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
Device 1: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.40.0, 5.10.0-9-amd64, LLVM 11.0.1)
Using default input encoding: UTF-8
Loaded 1 password hash (NT-opencl [MD4 OpenCL])
Self test failed (cmp_one(0))
It seems wrong that self test failed before real attack but it did not fail with --test
.
JFYI if mesa is present, john built with asan fails to start (local paths are replaced by ...
):
$ ./run/john --test --format=odf-opencl --device=2
NOTE: This is a debug build, speed will be lower than normal
==124564==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/asan/asan_interceptors.cpp:333 "((__interception::real___cxa_throw)) != (0)" (0x0, 0x0)
#0 0x7f41d8158657 in AsanCheckFailed ../../../../src/libsanitizer/asan/asan_rtl.cpp:73
#1 0x7f41d8175d4a in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:78
#2 0x7f41d80dec14 in __interceptor___cxa_throw ../../../../src/libsanitizer/asan/asan_interceptors.cpp:333
#3 0x7f41d475627e (/lib/x86_64-linux-gnu/libMesaOpenCL.so.1+0x2527e)
#4 0x7f41d4783db7 (/lib/x86_64-linux-gnu/libMesaOpenCL.so.1+0x52db7)
#5 0x7f41d4759904 (/lib/x86_64-linux-gnu/libMesaOpenCL.so.1+0x28904)
#6 0x7f41d8aa2fe1 in call_init elf/dl-init.c:72
#7 0x7f41d8aa30e8 in call_init elf/dl-init.c:30
#8 0x7f41d8aa30e8 in _dl_init elf/dl-init.c:119
#9 0x7f41d7af42bc in __GI__dl_catch_exception elf/dl-error-skeleton.c:182
#10 0x7f41d8aa7057 in dl_open_worker elf/dl-open.c:758
#11 0x7f41d7af425f in __GI__dl_catch_exception elf/dl-error-skeleton.c:208
#12 0x7f41d8aa68f9 in _dl_open elf/dl-open.c:837
#13 0x7f41d7bb7257 in dlopen_doit dlfcn/dlopen.c:66
#14 0x7f41d7af425f in __GI__dl_catch_exception elf/dl-error-skeleton.c:208
#15 0x7f41d7af431e in __GI__dl_catch_error elf/dl-error-skeleton.c:227
#16 0x7f41d7bb7a64 in _dlerror_run dlfcn/dlerror.c:170
#17 0x7f41d7bb72e3 in __dlopen dlfcn/dlopen.c:87
#18 0x7f41d80f06d5 in __interceptor_dlopen ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:6042
#19 0x7f41d7d25678 (/lib/x86_64-linux-gnu/libOpenCL.so.1+0x6678)
#20 0x7f41d7d25875 (/lib/x86_64-linux-gnu/libOpenCL.so.1+0x6875)
#21 0x7f41d7d2674d in clGetPlatformIDs (/lib/x86_64-linux-gnu/libOpenCL.so.1+0x774d)
#22 0x557af019a83d in load_opencl_environment .../src/opencl_common.c:432
#23 0x557af01a36f5 in opencl_load_environment .../src/opencl_common.c:850
#24 0x557af00bc6ce in benchmark_all .../src/bench.c:766
#25 0x557af00ef71c in john_run .../src/john.c:1661
#26 0x557af00ef71c in main .../src/john.c:2082
#27 0x7f41d79e2d09 in __libc_start_main ../csu/libc-start.c:308
#28 0x557aefbf1489 in _start (.../run/john+0x2da489)
It seems wrong that self test failed before real attack but it did not fail with
--test
.
Real attack implies --encoding=utf-8
. It may be specified explicitly for --test
. It might explain the difference. But I cannot try it now.
Hello everyone. First of, here are some information
After having installed what in my head looks like the requirements to provide opencl support for my Saphire HD 7850, john failes on opencl tests. More specifically, rar-opencl seems to break the test loop altogether.
Here is another one for testing nt-opencl:
And when I tried against a small test file of ntlm hashes:
Version of john is latest jumbo cloned from github. I cannot figure out if it is an issue with my installation, or from the related issues I've seen with previous versions. I remain at your disposal should you require any further information regarding the issue.