john icon indicating copy to clipboard operation
john copied to clipboard

Abort trap:6 JTR 1.8 jumbo OS X 10.10.5

Open JPaulMora opened this issue 10 years ago • 15 comments

Hey guys, getting this error on my 2014 MBP with discrete GPU. it happens when i try to use my GPUs only with the --devices=1,2 flag, whenever I use my CPU it works flawlessly (but leaves me waiting for super-slow CPU threads to finish) .

[Apple:27025] *** Process received signal ***
[Apple:27025] Signal: Abort trap: 6 (6)
[Apple:27025] Signal code:  (0)
[Apple:27025] [ 0] 0   libsystem_platform.dylib            0x00007fff918c4f1a _sigtramp + 26
[Apple:27025] [ 1] 0   libsystem_pthread.dylib             0x00007fff9a11ac70 __mtx_droplock + 462
[Apple:27025] [ 2] 0   libsystem_c.dylib                   0x00007fff9089c9b3 abort + 129
[Apple:27025] [ 3] 0   libGPUSupportMercury.dylib          0x00007fff91fdeb81 gpumCreateComputeContext + 0
[Apple:27025] [ 4] 0   AppleIntelHD5000GraphicsGLDriver    0x0000000106db449f gpusKillClient + 9
[Apple:27025] [ 5] 0   libGPUSupportMercury.dylib          0x00007fff91fdf538 gpusQueueSubmitDataBuffers + 170
[Apple:27025] [ 6] 0   AppleIntelHD5000GraphicsGLDriver    0x0000000106e09909 _ZN20IntelCLCommandBuffer6getNewEP11GLDQueueRec + 33
[Apple:27025] [ 7] 0   AppleIntelHD5000GraphicsGLDriver    0x0000000106e07817 _Z21intelSubmitCLCommandsP11GLDQueueRecj + 65
[Apple:27025] [ 8] 0   AppleIntelHD5000GraphicsGLDriver    0x0000000106e1d799 _ZN10CHAL_INTEL11ChalContext9ChalFlushEv + 83
[Apple:27025] [ 9] 0   AppleIntelHD5000GraphicsGLDriver    0x0000000106e09b85 gldFinishQueue + 43
[Apple:27025] [10] 0   OpenCL                              0x00007fff955637f0 OpenCL + 6128
[Apple:27025] [11] 0   OpenCL                              0x00007fff95563cba OpenCL + 7354
[Apple:27025] [12] 0   OpenCL                              0x00007fff95581fc4 clSetEventCallback + 6547
[Apple:27025] [13] 0   OpenCL                              0x00007fff9558563b clFinish + 747
[Apple:27025] [14] 0   libdispatch.dylib                   0x00007fff8eae7e73 _dispatch_client_callout + 8
[Apple:27025] [15] 0   libdispatch.dylib                   0x00007fff8eaf760b _dispatch_barrier_sync_f_slow + 757
[Apple:27025] [16] 0   OpenCL                              0x00007fff955854bf clFinish + 367
[Apple:27025] [17] 0   OpenCL                              0x00007fff9558106b clSetEventCallback + 2618
[Apple:27025] [18] 0   OpenCL                              0x00007fff955761c1 clEnqueueReadBuffer + 813
[Apple:27025] [19] 0   john                                0x00000001032fb8b8 crypt_all + 824
[Apple:27025] *** End of error message ***
Abort trap: 6

JPaulMora avatar Nov 12 '15 19:11 JPaulMora

I'm pretty convinced you are seeing a bug with Apple's OpenCL drivers. There's not much we can do about it.

magnumripper avatar Nov 13 '15 08:11 magnumripper

See also #1786 and #1800.

magnumripper avatar Nov 13 '15 18:11 magnumripper

If it helps, only happens when the CPU is not in use.

JPaulMora avatar Nov 19 '15 17:11 JPaulMora

You mean OpenCL formats work fine as long as you use --dev=cpu? That too sounds like the driver problems we've been seeing.

magnumripper avatar Nov 19 '15 18:11 magnumripper

as long as there is a thread on the CPU it doesn't happen, but as I said, these do 22p/s so there are slow.

JPaulMora avatar Nov 19 '15 18:11 JPaulMora

Please post the output of ./john --list=opencl-devices. You are using latest (or fairly recent) code from here, right?

magnumripper avatar Nov 19 '15 18:11 magnumripper

yes, pulled the day I uploaded this issue, here's your output:

Platform #0 name: Apple, version: OpenCL 1.2 (May 10 2015 19:38:45)
    Device #0 (0) name:     Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Device vendor:          Intel
    Device type:            CPU (LE)
    Device version:         OpenCL 1.2 
    Driver version:         1.1
    Native vector widths:   char 16, short 8, int 4, long 2
    Preferred vector width: char 16, short 8, int 4, long 2
    Global Memory:          16.0 GB
    Global Memory Cache:    64.0  B
    Local Memory:           32.0 KB (Global)
    Max memory alloc. size: 4.0 GB
    Max clock (MHz):        2500
    Profiling timer res.:   1 ns
    Max Work Group Size:    1024
    Parallel compute cores: 8
    Speed index:            80000

    Device #1 (1) name:     Iris Pro
    Device vendor:          Intel
    Device type:            GPU (LE)
    Device version:         OpenCL 1.2 
    Driver version:         1.2(Sep 11 2015 11:30:07)
    Native vector widths:   char 1, short 1, int 1, long 1
    Preferred vector width: char 1, short 1, int 1, long 1
    Global Memory:          1.0 GB
    Local Memory:           64.0 KB (Local)
    Max memory alloc. size: 384.3 MB
    Max clock (MHz):        1200
    Profiling timer res.:   80 ns
    Max Work Group Size:    512
    Parallel compute cores: 40
    Speed index:            48000

    Device #2 (2) name:     GeForce GT 750M
    Device vendor:          NVIDIA
    Device type:            GPU (LE)
    Device version:         OpenCL 1.2 
    Driver version:         10.4.2 310.41.35f01
    Native vector widths:   char 1, short 1, int 1, long 1
    Preferred vector width: char 1, short 1, int 1, long 1
    Global Memory:          2.0 GB
    Local Memory:           48.0 KB (Local)
    Max memory alloc. size: 512.5 MB
    Max clock (MHz):        925
    Profiling timer res.:   1000 ns
    Max Work Group Size:    1024
    Parallel compute cores: 2
    Stream processors:      384  (2 x 192)
    Speed index:            355200


JPaulMora avatar Nov 19 '15 18:11 JPaulMora

OK. If I understand you right, you get the segfaults with eg. -fork=2 -dev=1,2, while eg. -fork=3 -dev=0,1,2 works better (but has other drawbacks). Is that correct? What format are we talking about here?

magnumripper avatar Nov 19 '15 18:11 magnumripper

Thats exactly right, I've using raw-md5-opencl

JPaulMora avatar Nov 19 '15 19:11 JPaulMora

You mentioned 22 p/s, that can't be raw md5...

Anyway raw-md5 works fine here but I have a slightly older MBP with HD4000 and GT650M. And I run latest El Capitan.

$ ../run/john alltests.in -form:raw-md5-opencl -mask:?a?a?a?a?a?a?a?a -fork=2 -dev=gpu -max-run=20
Using default input encoding: UTF-8
Loaded 42 password hashes with no different salts (Raw-MD5-opencl [MD5 OpenCL])
Remaining 38 password hashes with no different salts
Node numbers 1-2 of 2 (fork)
Device 1: HD Graphics 4000
Device 2: GeForce GT 650M
Press 'q' or Ctrl-C to abort, almost any other key for status
2 0g 0:00:00:17 0.00% (ETA: 2016-03-15 20:32) 0g/s 159201Kp/s 159201Kc/s 6234MC/s #qZ$;.....#g=z<...
1 0g 0:00:00:18 0.00% (ETA: 2016-07-08 03:27) 0g/s 80377Kp/s 80377Kc/s 3154MC/s #*+wyaaa..#S%`yaaa
Waiting for 1 child to terminate
Session stopped (max run-time reached)

magnumripper avatar Nov 19 '15 19:11 magnumripper

Right, sorry at the time of writing was using that format and got confused, its gpg-opencl.

JPaulMora avatar Nov 20 '15 14:11 JPaulMora

@magnumripper, if there is a misunderstanding, the patch below is going to be helpful.

diff --git a/src/common-opencl.c b/src/common-opencl.c
index 30d7056..8b2d1d3 100644
--- a/src/common-opencl.c
+++ b/src/common-opencl.c
@@ -723,6 +723,10 @@ void opencl_preinit(void)

                build_device_list(device_list);

+               if (!options.fork && get_number_of_devices_in_use() > 1)
+                       fprintf(stderr,
+                               "Warning: some devices in --devices list has nothing to do\n");
+
                if (get_number_of_devices_in_use() == 0) {
                        fprintf(stderr, "No OpenCL devices found\n");
                        error();

ghost avatar Nov 20 '15 16:11 ghost

@claudioandre good idea and we should consider that patch, but I reckon it's not the problem in this case.

Hey, I can in fact reproduce this on my MBPR. If I use -fork=3 -dev=all with gpg-opencl, it works fine. But if I use -fork=2 -dev=gpu it crashes with an Abort trap.

I still think this is a driver problem we can't work around but I'll have a look at it.

magnumripper avatar Nov 20 '15 19:11 magnumripper

Thanks a lot, hope this gets fixed.

JPaulMora avatar Nov 21 '15 07:11 JPaulMora

Hey, I can in fact reproduce this on my MBPR. If I use -fork=3 -dev=all with gpg-opencl, it works fine. But if I use -fork=2 -dev=gpu it crashes with an Abort trap.

What's the status on this, @magnumripper @JPaulMora?

solardiz avatar May 25 '24 15:05 solardiz