[GH-ISSUE #2131] sha512crypt-opencl failing tests #1421

Closed
opened 2026-10-15 04:16:38 +07:00 by bsakaguchi · 11 comments
Owner

Originally created by @crioux on GitHub (May 9, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2131

As of latest bleeding-jumbo (merged into jtrdll fork), I am seeing this:

Does anyone else get this?

Also, I have a radeon pro duo that I am doing tests with.

# john --verbosity=4 --test=2 --format=sha512crypt-opencl
Device 0: Fiji [Radeon (TM) Pro Duo]
Benchmarking: sha512crypt-opencl, crypt(3) $6$ (rounds=5000) [SHA512 OpenCL]... Calculating best GWS for LWS=64; max. 100ms single kernel invocation.
gws: 1024          5053c/s25265000 rounds/s 202.645ms per crypt_all()!
gws: 2048         10658c/s53290000 rounds/s 192.138ms per crypt_all()!
gws: 4096         21357c/s106785000 rounds/s 191.786ms per crypt_all()!
gws: 8192         41263c/s206315000 rounds/s 198.530ms per crypt_all()+
gws: 16384        78059c/s390295000 rounds/s 209.889ms per crypt_all()+
gws: 32768       102446c/s512230000 rounds/s 319.854ms per crypt_all()+
gws: 65536       111851c/s559255000 rounds/s 585.917ms per crypt_all()+
gws: 131072      118098c/s590490000 rounds/s    1.109s per crypt_all()+
gws: 262144      120664c/s603320000 rounds/s    2.172s per crypt_all()+
Calculating best LWS for GWS=262144
Testing LWS=64 GWS=262144 ... 87.953ms+
Testing LWS=128 GWS=262144 ... 87.952ms
Testing LWS=256 GWS=262144 ... 88.145ms
Calculating best GWS for LWS=64; max. 200ms single kernel invocation.
gws: 4096         21043c/s105215000 rounds/s 194.645ms per crypt_all()!
gws: 8192         41476c/s207380000 rounds/s 197.511ms per crypt_all()+
gws: 16384        78878c/s394390000 rounds/s 207.711ms per crypt_all()+
gws: 32768       102499c/s512495000 rounds/s 319.688ms per crypt_all()+
gws: 65536       111509c/s557545000 rounds/s 587.716ms per crypt_all()+
gws: 131072      118386c/s591930000 rounds/s    1.107s per crypt_all()+
gws: 262144      119455c/s597275000 rounds/s    2.194s per crypt_all()
gws: 524288      106743c/s533715000 rounds/s    4.911s per crypt_all()
Local worksize (LWS) 64, global worksize (GWS) 131072
FAILED (cmp_all(1) $6$LKO/Ute40T3FNF95$6S/6T2YuOIHY0N3XpLKABJ3soYcXD9mB7uVbtEZDj/LNscVhZoZ9DEH.sBciDrMsHOWOoASbNLTypH/5X26gN0)

Originally created by @crioux on GitHub (May 9, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2131 As of latest bleeding-jumbo (merged into jtrdll fork), I am seeing this: Does anyone else get this? Also, I have a radeon pro duo that I am doing tests with. ``` # john --verbosity=4 --test=2 --format=sha512crypt-opencl Device 0: Fiji [Radeon (TM) Pro Duo] Benchmarking: sha512crypt-opencl, crypt(3) $6$ (rounds=5000) [SHA512 OpenCL]... Calculating best GWS for LWS=64; max. 100ms single kernel invocation. gws: 1024 5053c/s25265000 rounds/s 202.645ms per crypt_all()! gws: 2048 10658c/s53290000 rounds/s 192.138ms per crypt_all()! gws: 4096 21357c/s106785000 rounds/s 191.786ms per crypt_all()! gws: 8192 41263c/s206315000 rounds/s 198.530ms per crypt_all()+ gws: 16384 78059c/s390295000 rounds/s 209.889ms per crypt_all()+ gws: 32768 102446c/s512230000 rounds/s 319.854ms per crypt_all()+ gws: 65536 111851c/s559255000 rounds/s 585.917ms per crypt_all()+ gws: 131072 118098c/s590490000 rounds/s 1.109s per crypt_all()+ gws: 262144 120664c/s603320000 rounds/s 2.172s per crypt_all()+ Calculating best LWS for GWS=262144 Testing LWS=64 GWS=262144 ... 87.953ms+ Testing LWS=128 GWS=262144 ... 87.952ms Testing LWS=256 GWS=262144 ... 88.145ms Calculating best GWS for LWS=64; max. 200ms single kernel invocation. gws: 4096 21043c/s105215000 rounds/s 194.645ms per crypt_all()! gws: 8192 41476c/s207380000 rounds/s 197.511ms per crypt_all()+ gws: 16384 78878c/s394390000 rounds/s 207.711ms per crypt_all()+ gws: 32768 102499c/s512495000 rounds/s 319.688ms per crypt_all()+ gws: 65536 111509c/s557545000 rounds/s 587.716ms per crypt_all()+ gws: 131072 118386c/s591930000 rounds/s 1.107s per crypt_all()+ gws: 262144 119455c/s597275000 rounds/s 2.194s per crypt_all() gws: 524288 106743c/s533715000 rounds/s 4.911s per crypt_all() Local worksize (LWS) 64, global worksize (GWS) 131072 FAILED (cmp_all(1) $6$LKO/Ute40T3FNF95$6S/6T2YuOIHY0N3XpLKABJ3soYcXD9mB7uVbtEZDj/LNscVhZoZ9DEH.sBciDrMsHOWOoASbNLTypH/5X26gN0) ```
bsakaguchi 2026-10-15 04:16:38 +07:00
Author
Owner

@ghost commented on GitHub (May 9, 2016):

I guess you are using a recent driver (probably hotfix 16.5.1). New AMD drivers frequently means that unexpected things are needed to bypass AMD 'creativity' [1].

I haven't tried any driver newer than 15.11, so I am not the right person to give an advice. Anyway, if possible, please let me know:

  • this happened after a merge? Recent one?
  • what about your old board? Failing, the same driver?

Note to self: since 15.11 is not supported nor recommended some problems were seen in this version too.

[1] - https://github.com/magnumripper/JohnTheRipper/search?utf8=%E2%9C%93&q=workaround

<!-- gh-comment-id:217913836 --> @ghost commented on GitHub (May 9, 2016): I guess you are using a recent driver (probably hotfix 16.5.1). New AMD drivers frequently means that unexpected things are needed to bypass AMD 'creativity' [1]. I haven't tried any driver newer than 15.11, so I am not the right person to give an advice. Anyway, if possible, please let me know: - this happened after a merge? Recent one? - what about your old board? Failing, the same driver? Note to self: since 15.11 is not supported nor recommended some problems were seen in this version too. [1] - https://github.com/magnumripper/JohnTheRipper/search?utf8=%E2%9C%93&q=workaround
Author
Owner

@ghost commented on GitHub (May 9, 2016):

Notes:

Only Windows drivers are available to Radeon™ Pro Duo right now.

  • I'm planning to build a version of JtR to "MS Windows 10 Ubuntu Edition". That means I might be able to use a recent AMD driver at some point in the future (I already have a Windows 10 license).
  • At this moment, I am stuck in AMD 15.9.
  • So, for a while, I am useless.
<!-- gh-comment-id:217921780 --> @ghost commented on GitHub (May 9, 2016): Notes: Only Windows drivers are available to Radeon™ Pro Duo right now. - I'm planning to build a version of JtR to "MS Windows 10 Ubuntu Edition". That means I **might** be able to use a recent AMD driver at some point in the future (I already have a Windows 10 license). - At this moment, I am stuck in AMD 15.9. - So, for a while, I am useless.
Author
Owner

@crioux commented on GitHub (May 9, 2016):

Okay, cool. I will test the same build on the old card with older drivers, then upgrade them and try again.
If that doesn't reproduce it, i will assume it is the card, and debug the build.
Thanks!

<!-- gh-comment-id:217923051 --> @crioux commented on GitHub (May 9, 2016): Okay, cool. I will test the same build on the old card with older drivers, then upgrade them and try again. If that doesn't reproduce it, i will assume it is the card, and debug the build. Thanks!
Author
Owner

@ghost commented on GitHub (May 9, 2016):

Ok. On Openwall's super everything is fine:

  • AMD 7990, AMD Tahiti and NVIDIA TITAN X.
<!-- gh-comment-id:217925147 --> @ghost commented on GitHub (May 9, 2016): Ok. On Openwall's super everything is fine: - AMD 7990, AMD Tahiti and NVIDIA TITAN X.
Author
Owner

@crioux commented on GitHub (May 9, 2016):

Yea, my other test box is AMD 7990, so i suspect that its the new card/driver/combo.

<!-- gh-comment-id:217925832 --> @crioux commented on GitHub (May 9, 2016): Yea, my other test box is AMD 7990, so i suspect that its the new card/driver/combo.
Author
Owner

@crioux commented on GitHub (May 11, 2016):

I have determined that this does not happen with the 7990 and latest drivers, but it does with the Pro Duo and latest drivers.

I have a workaround, which is to add OPENCLBUILDOPTIONS="-frontend=edg"
which switches from their LLVM default compiler to the EDG compiler, which doesn't exhibit this optimization issue. Going to see how 'portable' that option really is, since it's not well documented and not something that is in the OpenCL spec.

<!-- gh-comment-id:218350576 --> @crioux commented on GitHub (May 11, 2016): I have determined that this does not happen with the 7990 and latest drivers, but it does with the Pro Duo and latest drivers. I have a workaround, which is to add OPENCLBUILDOPTIONS="-frontend=edg" which switches from their LLVM default compiler to the EDG compiler, which doesn't exhibit this optimization issue. Going to see how 'portable' that option really is, since it's not well documented and not something that is in the OpenCL spec.
Author
Owner

@magnumripper commented on GitHub (Aug 18, 2016):

Is this perhaps related to #2215 and #2221 (unroll)?

<!-- gh-comment-id:240885095 --> @magnumripper commented on GitHub (Aug 18, 2016): Is this perhaps related to #2215 and #2221 (unroll)?
Author
Owner

@crioux commented on GitHub (Aug 19, 2016):

One can't use "-frontend=edg" for nvidia. It's an AMD only option. So I think it's not related.

<!-- gh-comment-id:240922346 --> @crioux commented on GitHub (Aug 19, 2016): One can't use "-frontend=edg" for nvidia. It's an AMD only option. So I think it's not related.
Author
Owner

@crioux commented on GitHub (Aug 19, 2016):

That said, i didn't go back and try removing 'frontend=edg' after adding the pragma unroll. I could try that and see if it breaks in a different way :P

<!-- gh-comment-id:240922497 --> @crioux commented on GitHub (Aug 19, 2016): That said, i didn't go back and try removing 'frontend=edg' after adding the pragma unroll. I could try that and see if it breaks in a different way :P
Author
Owner

@magnumripper commented on GitHub (Aug 19, 2016):

Yes I was thinking the 'frontend=edg' could be an alternative way (on AMD) to work around the unroll bug. On another thought the unroll bug was only with VLIW5 for AMD, so forget about it.

<!-- gh-comment-id:240948267 --> @magnumripper commented on GitHub (Aug 19, 2016): Yes I was thinking the 'frontend=edg' could be an alternative way (on AMD) to work around the unroll bug. On another thought the unroll bug was only with VLIW5 for AMD, so forget about it.
Author
Owner

@ghost commented on GitHub (Dec 15, 2018):

Bug closed as:

  • Low Priority - They have a tendency to become high priority if enough of the users complain.

  • Business Priority - Obsolete hardware and software. Hardware nobody owns, etc.

  • ExternalDependency - We can't do much.

  • Fixed - It was fixed.

<!-- gh-comment-id:447588385 --> @ghost commented on GitHub (Dec 15, 2018): Bug closed as: * **Low Priority** - They have a tendency to become high priority if enough of the users complain. * **Business Priority** - Obsolete hardware and software. Hardware nobody owns, etc. * **ExternalDependency** - We can't do much. * **Fixed** - It was fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1421
No description provided.