ASSERTION FAILED in backend/src/backend/gen_context.cpp, line 438
Submitted by Frank Dittrich
Assigned to Luo Xionghu
Description
This is with beignet's latest git commit, commit 228775e8, on a Fedora 22 system, but with a vanilla kernel: $ uname -a Linux f22b.localdomain 4.2.0-0.rc4.git4.1.vanilla.mainline.knurd.1.fc22.x86_64 #1 SMP Sat Aug 1 06:31:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
CPU is Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
When I build the latest John the Ripper version https://github.com/magnumripper/JohnTheRipper/commit/8ebe17a69745dd3f6735c7d1f65884a40c98162e or any other recent commit of the bleeding-jumbo branch
(bleeding-jumbo)src $ make -s distclean; ./configure && make -s clean && make -s -j 16
and then test the office2013-opencl format, I get
(bleeding-jumbo)src $ ../run/john --test=0 --format=office2013-opencl --verbosity=5 initUnicode(UNICODE, ASCII/ASCII) ASCII -> ASCII -> ASCII Will run 4 OpenMP threads Failed to release test userptr object! (9) i915 kernel driver may not be sane! Failed to release test userptr object! (9) i915 kernel driver may not be sane! Failed to release test userptr object! (9) i915 kernel driver may not be sane! Failed to release test userptr object! (9) i915 kernel driver may not be sane! Device 0: Intel(R) HD Graphics Haswell GT2 Desktop Testing: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL 2x AES]... (4xOMP) Options used: -I ../run/kernels -cl-mad-enable -D__GPU__ -DDEVICE_INFO=34 -DDEV_VER_MAJOR=1 -DDEV_VER_MINOR=2 -D_OPENCL_COMPILER -DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2 ASSERTION FAILED: 0 at file /home/fd/git/beignet/backend/src/backend/gen_context.cpp, function virtual void gbe::GenContext::emitUnaryWithTempInstruction(const gbe::SelectionInstruction&), line 438 Trace/breakpoint trap
When I added a printf statement immediatelyx before the ASSERT, I saw that src.type was 8.
Just in case it helps, here's the backtrace from gdb:
(gdb) bt
#0 gbe::onFailedAssertion (msg=<optimized out>, file=<optimized out>, fn=<optimized out>, line=<optimized out>) at /home/fd/git/beignet/backend/src/sys/assert.cpp:76
#1 0x00007fffedae591f in gbe::GenContext::emitUnaryWithTempInstruction (this=0x1ae0700, insn=...) at /home/fd/git/beignet/backend/src/backend/gen_context.cpp:438
#2 0x00007fffedafd7be in gbe::GenContext::emitInstructionStream (this=this@entry=0x1ae0700) at /home/fd/git/beignet/backend/src/./backend/gen_insn_selection.hxx:81
#3 0x00007fffedaff2a5 in gbe::GenContext::emitCode (this=0x1ae0700) at /home/fd/git/beignet/backend/src/backend/gen_context.cpp:2288
#4 0x00007fffeda02caf in gbe::Context::compileKernel (this=this@entry=0x1ae0700) at /home/fd/git/beignet/backend/src/backend/context.cpp:365
#5 0x00007fffedb073c7 in gbe::GenProgram::compileKernel (this=<optimized out>, unit=..., name="Generate2013key", relaxMath=<optimized out>)
at /home/fd/git/beignet/backend/src/backend/gen_program.cpp:184
#6 0x00007fffeda071b7 in gbe::Program::buildFromUnit (this=this@entry=0x16c67c0, unit=..., error="") at /home/fd/git/beignet/backend/src/backend/program.cpp:160
#7 0x00007fffeda07730 in gbe::Program::buildFromLLVMFile (this=this@entry=0x16c67c0, fileName=fileName@entry=0x0, module=module@entry=0x13b9bd0, error="", optLevel=optLevel@entry=1)
at /home/fd/git/beignet/backend/src/backend/program.cpp:144
#8 0x00007fffedb07a5a in gbe::genProgramNewFromLLVM (deviceID=1042, fileName=0x0, module=0x13b9bd0, llvm_ctx=<optimized out>, stringSize=1000, err=0x16fc550 "", errSize=0x13b5320,
optLevel=1) at /home/fd/git/beignet/backend/src/backend/gen_program.cpp:365
#9 0x00007fffeda1c546 in gbe::programNewFromSource (deviceID=1042, source=<optimized out>, stringSize=1000,
options=0xf5b860 <include> "-I /home/fd/git/JtR/run/kernels -cl-mad-enable -D__GPU__ -DDEVICE_INFO=34 -DDEV_VER_MAJOR=1 -DDEV_VER_MINOR=2 -D_OPENCL_COMPILER -DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2", err=0x16fc550 "", errSize=0x13b5320) at /home/fd/git/beignet/backend/src/backend/program.cpp:808
#10 0x00007ffff23362ff in cl_program_build (p=p@entry=0x13b5290, options=<optimized out>) at /home/fd/git/beignet/src/cl_program.c:535
#11 0x00007ffff232e126 in clBuildProgram (program=0x13b5290, num_devices=<optimized out>, device_list=<optimized out>, options=<optimized out>, pfn_notify=0x0, user_data=0x0)
at /home/fd/git/beignet/src/cl_api.c:946
#12 0x00007ffff70dcafb in clBuildProgram () from /lib64/libOpenCL.so.1
#13 0x00000000006c9d46 in opencl_build (sequential_id=sequential_id@entry=0, opts=opts@entry=0x7fffffffb2c0 "-DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2", save=save@entry=0,
file_name=file_name@entry=0x0) at common-opencl.c:955
#14 0x00000000006ca1d1 in opencl_build_kernel_opt (opts=0x7fffffffb2c0 "-DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2", sequential_id=0,
kernel_filename=0x789ac8 "$JOHN/kernels/office2013_kernel.cl") at common-opencl.c:1871
#15 opencl_build_kernel (kernel_filename=kernel_filename@entry=0x789ac8 "$JOHN/kernels/office2013_kernel.cl", sequential_id=0,
opts=opts@entry=0x7fffffffb2c0 "-DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2", warn=warn@entry=0) at common-opencl.c:1887
#16 0x00000000006ca5e2 in opencl_init (kernel_filename=kernel_filename@entry=0x789ac8 "$JOHN/kernels/office2013_kernel.cl", sequential_id=<optimized out>,
opts=opts@entry=0x7fffffffb2c0 "-DHASH_LOOPS=100 -DUNICODE_LENGTH=96 -DV_WIDTH=2") at common-opencl.c:1966
#17 0x00000000005d66b1 in reset (db=<optimized out>) at opencl_office2013_fmt_plug.c:300
#18 0x000000000067d9cb in fmt_self_test_body (db=0x0, salt_copy=0x13b5b51, binary_copy=0x1388951, format=0xa82c00 <fmt_opencl_office2013>) at formats.c:295
#19 fmt_self_test (format=format@entry=0xa82c00 <fmt_opencl_office2013>, db=db@entry=0x0) at formats.c:719
#20 0x0000000000672709 in benchmark_format (format=0xa82c00 <fmt_opencl_office2013>, salts=256, results=0x7fffffffd5d0) at bench.c:235
#21 0x000000000067359d in benchmark_all () at bench.c:652
#22 0x0000000000685d72 in john_run () at john.c:1368
#23 0x0000000000686846 in main (argc=3, argv=0x7fffffffe088) at john.c:1741