Hold _pthread_list_lock

Triggers a crash with libsystem_pthread's _pthread_list_lock held, causing non-async-safe crash reporters that use pthread APIs to deadlock.

The use of the non-async-safe pthread API in a crash reporter will result in these types of crashes not being reported, and will lock up the application until it is either force quit by the user, or eventually killed by the system watchdog.

Provider X86-64
HockeyApp
SDK: 4.1.3 Date: 05/18/2017 (i)
Bugsnag
SDK: 5.0.0 Date: 02/16/2016 (i)
Apple
Date: 05/18/2017 (i)

Expected Report Details:

-[CRLCrashAsyncSafeThread crash] (CRLCrashAsyncSafeThread.m:41)
-[CRLMainWindowController causeCrash:] (CRLMainWindowController.m:72)

Click a status icon above to see the crashing thread’s stack trace with further info.

HockeyApp - x86_64

Exception Type:  SIGSEGV
Exception Codes: SEGV_MAPERR at 0x1
Crashed Thread:  0

Thread 0 Crashed:
0   libsystem_platform.dylib 0x00007fff96e68f5a _platform_memmove$VARIANT$Haswell + 186
1   libsystem_pthread.dylib  0x00007fff96e70af0 pthread_getname_np + 133
2   CrashLib                 0x000000010d68325e -[CRLCrashAsyncSafeThread crash] (CRLCrashAsyncSafeThread.m:41)
3   CrashProbe               0x000000010d676c31 -[CRLMainWindowController causeCrash:] (CRLMainWindowController.m:72)
4   libsystem_trace.dylib    0x00007fff96e883a7 _os_activity_initiate_impl + 52
5   AppKit                   0x00007fff7f754721 -[NSApplication(NSResponder) sendAction:to:from:] + 455
6   AppKit                   0x00007fff7f238cc4 -[NSControl sendAction:to:] + 85
7   AppKit                   0x00007fff7f238bec __26-[NSCell _sendActionFrom:]_block_invoke + 135
8   libsystem_trace.dylib    0x00007fff96e883a7 _os_activity_initiate_impl + 52
9   AppKit                   0x00007fff7f238b44 -[NSCell _sendActionFrom:] + 127
10  AppKit                   0x00007fff7f27b539 -[NSButtonCell _sendActionFrom:] + 97
11  libsystem_trace.dylib    0x00007fff96e883a7 _os_activity_initiate_impl + 52
12  AppKit                   0x00007fff7f237426 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2480
13  AppKit                   0x00007fff7f27b272 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 797
14  AppKit                   0x00007fff7f235ddb -[NSControl mouseDown:] + 831
15  AppKit                   0x00007fff7f8d024f -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 6340
16  AppKit                   0x00007fff7f8cca6c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 1941
17  AppKit                   0x00007fff7f8cbf0a -[NSWindow(NSEventRouting) sendEvent:] + 540
18  AppKit                   0x00007fff7f750681 -[NSApplication(NSEvent) sendEvent:] + 1144
19  HockeySDK                0x000000010d6a154e -[BITCrashExceptionApplication sendEvent:] (BITCrashExceptionApplication.m:48)
20  AppKit                   0x00007fff7efcb427 -[NSApplication run] + 1001
21  AppKit                   0x00007fff7ef95e0e NSApplicationMain + 1236
22  CrashProbe               0x000000010d676ef0 main (main.m:13)
23  libdyld.dylib            0x00007fff96c56235 start + 0

Bugsnag - x86_64

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS
Attempted to dereference garbage pointer 0x1.
                                                                                                      
0  libsystem_platform.dylib platform_memmove$VARIANT$Haswell                                      
1  libsystem_pthread.dylib  pthread_getname_np                                                    
2  CrashProbe               -[CRLCrashAsyncSafeThread crash] (CRLCrashAsyncSafeThread.m:41)       
3  CrashProbe               -[CRLMainWindowController causeCrash:] (CRLMainWindowController.m:72) 
4  libsystem_trace.dylib    os_activity_initiate                                                  
5  AppKit                   -[NSApplication sendAction:to:from:]                                  
6  AppKit                   -[NSControl sendAction:to:]                                           
7  AppKit                   _26-[NSCell _sendActionFrom:]_block_invoke                            
8  libsystem_trace.dylib    os_activity_initiate                                                  
9  AppKit                   -[NSCell _sendActionFrom:]                                            
10 libsystem_trace.dylib    os_activity_initiate                                                  
11 AppKit                   -[NSCell trackMouse:inRect:ofView:untilMouseUp:]                      
12 AppKit                   -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]                
13 AppKit                   -[NSControl mouseDown:]                                               
14 AppKit                   -[NSWindow _handleMouseDownEvent:isDelayedEvent:]                     
15 AppKit                   -[NSWindow _reallySendEvent:isDelayedEvent:]                          
16 AppKit                   -[NSWindow sendEvent:]                                                
17 AppKit                   -[NSApplication sendEvent:]                                           
18 AppKit                   -[NSApplication run]                                                  
19 AppKit                   NSApplicationMain                                                     
20 CrashProbe               main (main.m:13)                                                      
21 libdyld.dylib            start

Apple - x86_64

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000001

Application Specific Information:
Performing @selector(causeCrash:) from sender NSButton 0x61800015da60

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  libsystem_platform.dylib       0x00007fff9513cf5a _platform_memmove$VARIANT$Haswell + 186
1  libsystem_pthread.dylib        0x00007fff95144b64 pthread_getname_np + 134
2  net.hockeyapp.CrashLib         0x0000000109cc125e -[CRLCrashAsyncSafeThread crash] + 27 (CRLCrashAsyncSafeThread.m:45) | Wrong line number
3  net.hockeyapp.CrashProbe.apple 0x0000000109cb3c35 -[CRLMainWindowController causeCrash:] + 75 (CRLMainWindowController.m:72)
4  libsystem_trace.dylib          0x00007fff9515c3a7 _os_activity_initiate_impl + 53
5  com.apple.AppKit               0x00007fff7da41791 -[NSApplication(NSResponder) sendAction:to:from:] + 456
6  com.apple.AppKit               0x00007fff7d526000 -[NSControl sendAction:to:] + 86
7  com.apple.AppKit               0x00007fff7d525f28 __26-[NSCell _sendActionFrom:]_block_invoke + 136
8  libsystem_trace.dylib          0x00007fff9515c3a7 _os_activity_initiate_impl + 53
9  com.apple.AppKit               0x00007fff7d525e80 -[NSCell _sendActionFrom:] + 128
10 com.apple.AppKit               0x00007fff7d568875 -[NSButtonCell _sendActionFrom:] + 98
11 libsystem_trace.dylib          0x00007fff9515c3a7 _os_activity_initiate_impl + 53
12 com.apple.AppKit               0x00007fff7d524762 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2481
13 com.apple.AppKit               0x00007fff7d5685ae -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 798
14 com.apple.AppKit               0x00007fff7d523117 -[NSControl mouseDown:] + 832
15 com.apple.AppKit               0x00007fff7dbbd2bf -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 6341
16 com.apple.AppKit               0x00007fff7dbb9adc -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 1942
17 com.apple.AppKit               0x00007fff7dbb8f7a -[NSWindow(NSEventRouting) sendEvent:] + 541
18 com.apple.AppKit               0x00007fff7da3d6f1 -[NSApplication(NSEvent) sendEvent:] + 1145
19 com.apple.AppKit               0x00007fff7d2b87f7 -[NSApplication run] + 1002
20 com.apple.AppKit               0x00007fff7d2831de NSApplicationMain + 1237
21 net.hockeyapp.CrashProbe.apple 0x0000000109cb3ef4 main + 9 (main.m:13)
22 libdyld.dylib                  0x00007fff94f2a235 start + 1