mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #1571] Some failing opencl format tests with beignet on haswell GPU #1029
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1029
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @frank-dittrich on GitHub (Jul 22, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1571
Originally assigned to: @frank-dittrich on GitHub.
During my experiments to get the Haswell GPU working, I probably found some beignet / libdrm / i915 driver issues and may be some bleeding-jumbo issues.
On my 64bit Fedora 22 with Haswell CPU Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz, after installing beignet (I tried both the fedora package and the latest http://anongit.freedesktop.org/git/beignet.git commit):
Here, I am not sure whether the
multiple unsequenced modifications to 'p'warning indicates a real problem:The only statements that may trigger that
multiple unsequenced modifications to 'p'warning IMHO areCan any of the above be a problem?
I hope that these warnings
will disappear after a future libdrm or linux kernel upgrade and that the
problem will be fixed in future beignet versions.
May be when I get rid of the
disable atomic in L3 featuredue to the failed self test and when I disable the debug CFLAGS from my beignet build, the performance will improve...For now, I just use OCL_IGNORE_SELF_TEST=1, otherwise the Haswell GPU will be skipped:
Most opencl formats pass self test, with c/s rate between 10% and 90% of the CPU (4*OMP).
For rar, opencl gets closest:
BTW: why is the CPU format using length 4, but the GPU length 5?
And these are all the failing self tests:
The common warnings
which appeared for every single test have been filtered using
grep -v.@magnum I wasn't sure whether I should create separate issues for every possible problem (failing format self tests etc.)
May be beignet, libdrm or the i915 driver are to blame for many of these.
If you think I should have created multiple issues, I suggest that we keep this one for the
multiple unsequenced modifications to 'p'warning in oldoffice-opencl (and may be the failing oldoffice-opencl self test), and I'll create new issues for the other failing self tests.@frank-dittrich commented on GitHub (Jul 22, 2015):
Apparently, the i915 driver problems will be fixed with the 4.2 linux kernel.
@magnumripper commented on GitHub (Jul 22, 2015):
I guess we should trust it until proven wrong.
I guess. I'm not sure what a C99 spec would say about it (I thought it was left-to-right when I wrote that). Please try adding temps that removes these ambiguities! Or maybe we should google for C specs first (or just ask Alexander Cherepanov).
That's for benchmarking against cRARk, which has/had it that way. I don't care about that anymore, but it took me a year or so to get on par with cRARk.
Perhaps not quite yet. First we should try to find general little fixes that solves many issues (like was done for OSX three years ago - the first results were worse than these)
@frank-dittrich commented on GitHub (Jul 25, 2015):
Upgrading the Linux kernel from 4.0.8-300.fc22.x86_64 to a vanilla 4.2 rc3 helped to get rid of the
OCL_IGNORE_SELF_TEST=1which was needed to convince beignet not to disable the "non-working" device which didn't pass beignet's self test.Just upgrading the linux kernel also helped improving the rar-opencl performance (from 364 c/s to 658 c/s).
I guess it is somehow related to the
Beignet: warning - disable atomic in L3 feature.which was due to the failing self test with the older kernel.@frank-dittrich commented on GitHub (Jul 25, 2015):
For some reason, the encfs-opencl self test takes more than 7 minutes:
@frank-dittrich commented on GitHub (Jul 25, 2015):
With a 4.2-rc3 linux kernel, the number of failing opencl formats reduced from 16 to 6:
To get an idea why the beignet assertions failed, I added a few fprintf statements:
and got:
Looks like beignet is to blame here.
@frank-dittrich commented on GitHub (Jul 25, 2015):
BTW: not only is the GPU faster than the CPU for rar (660 c/s vs. 400 c/s), I can even run them in parallel, and after GPU auto-tuning is finished, both run at about the same speed they would run when started separately, i.e., I get a combined speed of 1060 c/s for my
Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz@frank-dittrich commented on GitHub (Jul 25, 2015):
These are the rar-opencl format tests of ./jtrts.pl:
Several other opencl formats pass self test (will report in detail later, probably next week).
@frank-dittrich commented on GitHub (Jul 26, 2015):
This is the jtrts result:
@frank-dittrich commented on GitHub (Jul 26, 2015):
And these are the --test results:
@magnumripper commented on GitHub (Jul 27, 2015):
I fixed oldoffice. Maybe it was actually proper code but better safe than sorry.
@frank-dittrich commented on GitHub (Jul 27, 2015):
A copy of magnum's link from #1515
https://gist.github.com/spiralray/cae0bc235509e495fec1
Just in case someone wants to test this on ubuntu...
@frank-dittrich commented on GitHub (Aug 3, 2015):
BTW, I reported two beignet bugs, let's we what happens.
https://bugs.freedesktop.org/show_bug.cgi?id=91524
https://bugs.freedesktop.org/show_bug.cgi?id=91525
@frank-dittrich commented on GitHub (Aug 21, 2015):
One of these beignet bugs has recently been fixed;
https://bugs.freedesktop.org/show_bug.cgi?id=91524
But for WPAPSK, the GPU can't compete...
@magnumripper commented on GitHub (Aug 31, 2015):
This is not what the Intel driver says (all 1). Perhaps a beigenet bug. Or maybe they are not the same model? Here's your i5-4570 output with warnings redacted:
Here's well's i7-4770K w/ Intel driver
@frank-dittrich commented on GitHub (Sep 22, 2015):
With the latest beignet commit http://cgit.freedesktop.org/beignet/commit/?id=18a52ffc966027a3004b85c7c03c9416e1a84c3a the bug https://bugs.freedesktop.org/show_bug.cgi?id=91525 seems to be fixed.
I don't get ASSERTION FAILED anymore.
However, this is what happens now:
Not sure whether this is a bleeding-jumbo error, a beignet error, a kernel driver error, or a combination of errors.
Any thoughts?
I'll try to upgrade to Linux kernel version 4.3.0-0.rc1 and see whether the problem disappears.
@magnumripper commented on GitHub (Sep 22, 2015):
I see nothing that points to a bug in Jumbo. Whether it's beignet or kernel I have no idea.
@frank-dittrich commented on GitHub (Sep 22, 2015):
What about this then?
Backtrace of that segfault:
@frank-dittrich commented on GitHub (Sep 22, 2015):
For this one
I filed a new beignet bug:
https://bugs.freedesktop.org/show_bug.cgi?id=92081
@magnumripper commented on GitHub (Sep 22, 2015):
I opened #1778 for the problem with new DEScrypt-opencl and --list (it's unrelated to beignet).
@frank-dittrich commented on GitHub (Sep 23, 2015):
Beignet bug https://bugs.freedesktop.org/show_bug.cgi?id=92081 (fixed earlier) reappeared for a different opencl format.
@frank-dittrich commented on GitHub (Nov 19, 2015):
Finally I found the time to re-test https://bugs.freedesktop.org/show_bug.cgi?id=91525 (GPU hang when testing
--format=office2013-openclon my Haswell with latest beignet.Running that test after
echo -n 0 > /sys/module/i915/parameters/enable_hangcheckto disable the hang check didn't help.I kept john running for about half an hour, the system didn't respond, so I has to use the power button to reboot.
That's why I doubt it is john's fault.
But let's see what beignet developers think.
Even with
GWS=1 LWS=1I get the hang.This is the corresponting
dmesgoutput:The contents of
/sys/class/drm/card0/errorhas been attached to the beignet bug report, see https://bugs.freedesktop.org/show_bug.cgi?id=91525#c11.Repeated tests of that formats just result in these dmesg lines:
But with linux kernel 4.3, the
lines finally disappeared.
@frank-dittrich commented on GitHub (Dec 3, 2015):
Next week I'll most likely have time to re-test. At least for one of the problems there should be a commit fixing the problem.
@frank-dittrich commented on GitHub (Dec 23, 2015):
Status update:
With latest John the Ripper bleeding-jumbo commit
8d4470ff9f. latest beignet commitand a newer Linux kernel (4.4.0-0.rc6.git0.1.vanilla.knurd.1.fc22.x86_64), I get these results:
https://bugs.freedesktop.org/show_bug.cgi?id=91524
https://bugs.freedesktop.org/show_bug.cgi?id=91525
Sometimes I still get
and dmesg shows
I attached the contents of /sys/class/drm/card0/error to the beignet bug.
But sometimes I don't run into this problem, instead I see
and when running that format with --skip-self-tests against the self test hashes, the correct passwords don't crack any hash.
https://bugs.freedesktop.org/show_bug.cgi?id=92081
@frank-dittrich commented on GitHub (Dec 23, 2015):
https://bugs.freedesktop.org/show_bug.cgi?id=91525
looks like john could be the culprit, causing kernel hangs.
Evidence:
Try to crack a single hash:
Look at
4293.777s per crypt_all()really looks bad.Lets try
LWS=1:Oops
GWS=1:
Still consuming too much time?
Any idea how I should try to debug the failing self test?
And why is GWS=1 LWS=1 failing?
Now that https://bugs.freedesktop.org/show_bug.cgi?id=91525 looks like there could be a john the ripper bug (hanging the GPU) and a second one (failing self test), should I create one or two new bugs, and keep issue 1571 for https://bugs.freedesktop.org/show_bug.cgi?id=91524 and https://bugs.freedesktop.org/show_bug.cgi?id=92081 instead?
@frank-dittrich commented on GitHub (Dec 23, 2015):
@frank-dittrich commented on GitHub (Dec 23, 2015):
Just to get an idea about the performance, here a --test (without =0) and without LWS and GWS:
@magnumripper commented on GitHub (Dec 23, 2015):
What in these walls of text suggests to you that the bug is in JtR?
@frank-dittrich commented on GitHub (Jan 4, 2016):
with latest bleeding-jumbo commit
ca11872eaf, Linux kernel 4.4.0-0.rc6.git1.1.vanilla.knurd.1.fc22.x86_64 and latest beignet commit f74980864a41daa5d644a033a16132768ce89296, all 53 opencl formats pass self test.@magnumripper commented on GitHub (Jan 4, 2016):
Cool! Thanks for your efforts with this.
@frank-dittrich commented on GitHub (Jan 4, 2016):
Unfortunately, meanwhile I managed to reproduce the GPU hang again.
I wanted to close those beignet bugs and, after restarting my system, I ran each individual command which caused one of those bugs in the past.
Some bugs seem to have been fixed, but some still remain.
May be I was just lucky with those tests where "All 53 formats passed self-tests!"
Before doing a full --test=10 run for --format=opencl, I tested each individual opencl format with --test=0, redirecting sdtout and stderr into files, and copying dmesg output into files.
No problems there (at least with a --disable-openmp build).
May be testing all those formats in a certain sequence somehow initialized the GPU state or memory in a certain way, and running certain format tests after shutting down and booting the system just triggers those bugs.
It also looks like after a GPU hang, the GPU isn't reset correctly, because afterwards I get
instead of the GPU hang
Instead of reporting this as a beignet bug, I now picked DRI as the product and DRM/Intel as the component, as suggested by the dmesg output
https://bugs.freedesktop.org/show_bug.cgi?id=93579
Let's just keep this issue closed.
I'll open new issues depending on the response to my freedesktop.org bug reports.
BTW some of the opencl format self tests seem to write '\n' to stderr (look at the additional new lines in the --test --verbosity=3 output.
@magnumripper commented on GitHub (Jan 4, 2016):
You had to filter out the "spinning wheel" from the output, right? I suspect it's just something with that.
@frank-dittrich commented on GitHub (Jan 5, 2016):
Now I know why the complete --test --format=opencl run didn't fail.
I forgot to check my local config. for disabled formats
But I think it is still better to keep this issue closed. I'll open new issues for the remaining problems.