Closed frank-dittrich closed 7 years ago
I wanted to check whether we can reproduce the Travis OpenCL format errors for the failing clang build. On well, after moving these plugins out of the way
crc32_fmt_plug.c gost3411-2012-sse41_plug.c HDAA_fmt_plug.c stribog_fmt_plug.c
(because clang has trouble compiling them), I get just one failed OpenCL format self test:
Testing: rar-opencl, RAR3 (length 5) [SHA1 OpenCL AES]... FAILED (valid (before init))
(already known, see issue https://github.com/magnumripper/JohnTheRipper/issues/1499) and these warnings:
Testing: strip-opencl, STRIP Password Manager [PBKDF2-SHA1 OpenCL]... Warning: salt() returned misaligned pointer
Testing: sxc-opencl, StarOffice .sxc [PBKDF2-SHA1 OpenCL Blowfish]... Warning: salt() returned misaligned pointer
And I get these failing CPU formats:
$ ./john --test=0 --format=cpu | grep -v PASS
Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... FAILED (cmp_all(2))
Testing: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 AVX-16]... FAILED (cmp_all(2))
Testing: LM [DES 128/128 AVX-16]... FAILED (cmp_all(2))
Testing: mschapv2-naive, MSCHAPv2 C/R [MD4 DES DES 128/128 AVX-16 naive]... FAILED (cmp_all(2))
-
Testing: netntlm-naive, NTLMv1 C/R [MD4 DES (ESS MD5) DES 128/128 AVX-16 naive]... FAILED (cmp_all(2))
5 out of 311 tests have FAILED
$ ./john --list=build-info Version: 1.8.0.6-jumbo-1-252-g2c9182e+ Build: linux-gnu 64-bit AVX-ac SIMD: AVX, interleaving: MD4:4 MD5:5 SHA1:2 SHA256:1 SHA512:1 $JOHN is ./ Format interface version: 13 Max. number of reported tunable costs: 3 Rec file version: REC4 Charset file version: CHR3 CHARSET_MIN: 1 (0x01) CHARSET_MAX: 255 (0xff) CHARSET_LENGTH: 24 Max. Markov mode level: 400 Max. Markov mode password length: 30 clang version: 3.0 (tags/RELEASE_30/final) (gcc 4.2.1 compatibility) GNU libc version: 2.15 (loaded: 2.15) OpenCL library version: 1.2 Crypto library: OpenSSL OpenSSL library version: 01000100f OpenSSL 1.0.1 14 Mar 2012 GMP library version: 5.0.2 File locking: fcntl() fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's
BTW: In addition to the tons of
clang: warning: argument unused during compilation: '-arch host'
warnings, I also get these warnings:
In file included from dynamic_big_crypt.c:88:
./gost.h:80:10: warning: 'bswap_32' macro redefined
# define bswap_32(x) _JtR_Swap_32(x)
^
/usr/include/byteswap.h:33:9: note: previous definition is here
#define bswap_32(x) __bswap_32 (x)
^
In file included from dynamic_big_crypt.c:88:
./gost.h:102:10: warning: 'bswap_64' macro redefined
# define bswap_64(x) _JtR_Swap_64(x)
^
/usr/include/byteswap.h:37:10: note: previous definition is here
# define bswap_64(x) __bswap_64 (x)
^
2 warnings generated.
clang: warning: argument unused during compilation: '-arch host'
In file included from dynamic_compiler.c:149:
./gost.h:80:10: warning: 'bswap_32' macro redefined
# define bswap_32(x) _JtR_Swap_32(x)
^
/usr/include/byteswap.h:33:9: note: previous definition is here
#define bswap_32(x) __bswap_32 (x)
^
In file included from dynamic_compiler.c:149:
./gost.h:102:10: warning: 'bswap_64' macro redefined
# define bswap_64(x) _JtR_Swap_64(x)
^
/usr/include/byteswap.h:37:10: note: previous definition is here
# define bswap_64(x) __bswap_64 (x)
^
2 warnings generated.
cracker.c:388:3: warning: data argument not used by format string [-Wformat-extra-args]
crk_db->salt_count);
^
1 warning generated.
john.c:732:3: warning: data argument not used by format string [-Wformat-extra-args]
database.salt_count);
^
1 warning generated.
gpg2john.c:1889:3: warning: if statement has empty body [-Wempty-body]
;
^
gpg2john.c:1892:3: warning: if statement has empty body [-Wempty-body]
;
^
2 warnings generated.
The
fatal error: error in backend: Cannot select: 0x30e0460: ch = store 0x30df350, 0x30d6790, 0x30df450, 0x3066ec0<ST8[%183]> [ID=182] dbg:HDAA_fmt_plug.c:373:17
message has already been mentioned above. These are the other error messages:
fatal error: error in backend: Cannot select: intrinsic %llvm.x86.sse42.crc32.32.8
make[1]: *** [crc32_fmt_plug.o] Error 1
fatal error: error in backend: Cannot select: intrinsic %llvm.x86.mmx.emms
make[1]: *** [gost3411-2012-sse41_plug.o] Error 1
and after moving gost3411-2012-sse41_plug.c out of the way:
stribog_fmt_plug.o: In function `stribog256_init':
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:247: undefined reference to `GOST34112012Init'
stribog_fmt_plug.o: In function `stribog_final':
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:279: undefined reference to `GOST34112012Final'
stribog_fmt_plug.o: In function `stribog512_init':
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:254: undefined reference to `GOST34112012Init'
stribog_fmt_plug.o: In function `stribog_final':
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:279: undefined reference to `GOST34112012Final'
stribog_fmt_plug.o: In function `stribog_update':
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:270: undefined reference to `GOST34112012Update'
/space/home/frank/git/JtR/src/stribog_fmt_plug.c:271: undefined reference to `GOST34112012Update'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../run/john] Error 1
make: *** [default] Error 2
I opened #1512 for the warnings specific to recent dynamic changes
I wanted to check whether we can reproduce the Travis OpenCL format errors for the failing clang build
As far as I understand those problems has nothing to do with clang. It's just that gcc segfaults earlier so we don't see them.
@magnumripper clang not being to blame for the OpenCL format errors is probably correct, but I didn't want to jump to conclusions I cannot prove.
I'd even say it's the same bug(s) (in shared or duplicated code) in most of them.
I wanted to test whether these problems still exist, but apparently, there's no clang on well and super anymore, and bull is refusing ssh connections.
Not sure what to do now. Just close this issue? Ask Solar to install clang, so that we can test clang builds?
[frank@super src]$ make -s distclean; ./configure CC=clang --disable-cuda && make -s clean && make -s && ../run/john --test=0 --format=opencl
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to compile using MPI... no
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/home/frank/git/JtR/src':
configure: error: C compiler cannot create executables
See `config.log' for more details
[frank@super src]$ which clang
/usr/bin/which: no clang in (...)
Yes I think clang would be a good thing on well & super (different versions of it would be even better).
The problem is gone:
claudio@well:~/bleeding/src$ make -s distclean; ./configure CC=clang && make -s clean && make -s && ../run/john --test=0 --format=opencl
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to compile using MPI... no
checking for gcc... clang
[...]
Device 0: Bonaire [AMD Radeon HD 7700 Series]
[...]
Testing: sha1crypt-opencl, (NetBSD) [PBKDF1-SHA1 OpenCL]... PASS
$ ../run/john --list=build-info
Version: 1.8.0-jumbo-1-5393-gc19f75f
Build: linux-gnu 64-bit AVX2-ac
SIMD: AVX2, interleaving: MD4:4 MD5:5 SHA1:2 SHA256:1 SHA512:1
$JOHN is ../run/
Format interface version: 14
Max. number of reported tunable costs: 3
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
clang version: 3.4.2 (tags/RELEASE_34/dot2-final) (gcc 4.2.1 compatibility)
GNU libc version: 2.17 (loaded: 2.17)
OpenCL headers version: 2.0
Crypto library: OpenSSL
OpenSSL library version: 01000105f
OpenSSL 1.0.1e-fips 11 Feb 2013
GMP library version: 6.0.0
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
The problem is gone:
Device 0: Bonaire [AMD Radeon HD 7700 Series]
Claudio, FWIW you're running these tests on a GPU that is under heavy concurrent use, with much of its memory allocated by the unrelated job. Maybe this somehow affects which tests pass or fail (at least it might if any uninitialized memory is involved, or for the case of new failures in case together these jobs exhaust a shared resource).
Well, since we were seeing a clean test with clang 3.0 on Travis (until recently). Now, a clean test using 3.4.
On super, clang isn't installed.
On well:
May be clang is among the
On bull:
Trying to build on bull produces the same results as on well.