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.2 Date: 02/124/2017 (i)
Bugsnag
SDK: 5.0.0 Date: 02/16/2016 (i)
Crashlytics
SDK: 3.4.1 Date: 12/10/2015 (i)
Apple
Date: 06/24/2015 (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 0x00007fffdf171f5a _platform_memmove$VARIANT$Haswell + 186
1  libsystem_pthread.dylib  0x00007fffdf179c60 pthread_getname_np + 134
2  CrashLib                 0x00000001013732ae -[CRLCrashAsyncSafeThread crash] (CRLCrashAsyncSafeThread.m:41)
3  CrashProbe               0x0000000101360b3d -[CRLMainWindowController causeCrash:] (CRLMainWindowController.m:72)
4  libsystem_trace.dylib    0x00007fffdf193c3d _os_activity_initiate + 61
5  AppKit                   0x00007fffc7cb7c9c -[NSApplication(NSResponder) sendAction:to:from:] + 456
6  AppKit                   0x00007fffc779d460 -[NSControl sendAction:to:] + 86
7  AppKit                   0x00007fffc779d388 __26-[NSCell _sendActionFrom:]_block_invoke + 136
8  libsystem_trace.dylib    0x00007fffdf193c3d _os_activity_initiate + 61
9  AppKit                   0x00007fffc779d2e0 -[NSCell _sendActionFrom:] + 128
10 AppKit                   0x00007fffc77dfcd9 -[NSButtonCell _sendActionFrom:] + 98
11 libsystem_trace.dylib    0x00007fffdf193c3d _os_activity_initiate + 61
12 AppKit                   0x00007fffc779bbc6 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2481
13 AppKit                   0x00007fffc77dfa12 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 798
14 AppKit                   0x00007fffc779a57b -[NSControl mouseDown:] + 832
15 AppKit                   0x00007fffc7e2f603 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 6341
16 AppKit                   0x00007fffc7e2be20 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 1942
17 AppKit                   0x00007fffc7e2b2be -[NSWindow(NSEventRouting) sendEvent:] + 541
18 AppKit                   0x00007fffc7cb3bf5 -[NSApplication(NSEvent) sendEvent:] + 1145
19 HockeySDK                0x0000000101395914 -[BITCrashExceptionApplication sendEvent:] (BITCrashExceptionApplication.m:48)
20 AppKit                   0x00007fffc752ff81 -[NSApplication run] + 1002
21 AppKit                   0x00007fffc74fa850 NSApplicationMain + 1237
22 CrashProbe               0x0000000101360ea4 main (main.m:13)
23 libdyld.dylib            0x00007fffdef61255 start + 1

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

Crashlytics - x86_64

App locks up.

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000001

Thread : Crashed: com.apple.main-thread
0  libsystem_platform.dylib 0x7fff9a741fda _platform_memmove$VARIANT$Haswell + 186
1  libsystem_pthread.dylib  0x7fff8a646312 pthread_getname_np + 105
2  CrashLib                 0x00010c3d834f -[CRLCrashAsyncSafeThread crash] (CRLCrashAsyncSafeThread.m:41)
3  CrashProbe               0x00010c3586e1 -[CRLMainWindowController causeCrash:] (CRLMainWindowController.m:72)
4  libsystem_trace.dylib    0x7fff84dea07a _os_activity_initiate + 75
5  AppKit                   0x7fff8df9551d -[NSApplication sendAction:to:from:] + 460
6  AppKit                   0x7fff8dfaa486 -[NSControl sendAction:to:] + 86
7  AppKit                   0x7fff8dfaa3b0 __26-[NSCell _sendActionFrom:]_block_invoke + 131
8  libsystem_trace.dylib    0x7fff84dea07a _os_activity_initiate + 75
9  AppKit                   0x7fff8dfaa30d -[NSCell _sendActionFrom:] + 144
10 libsystem_trace.dylib    0x7fff84dea07a _os_activity_initiate + 75
11 AppKit                   0x7fff8dfa8932 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2693
12 AppKit                   0x7fff8dffdd58 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 744
13 AppKit                   0x7fff8dfa705c -[NSControl mouseDown:] + 669
14 AppKit                   0x7fff8e554d1d -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322
15 AppKit                   0x7fff8e555fad -[NSWindow _reallySendEvent:isDelayedEvent:] + 212
16 AppKit                   0x7fff8deae735 -[NSWindow sendEvent:] + 517
17 AppKit                   0x7fff8deaae49 -[NSApplication sendEvent:] + 2540
18 AppKit                   0x7fff8ddde03a -[NSApplication run] + 796
19 AppKit                   0x7fff8dd60520 NSApplicationMain + 1176
20 CrashProbe               0x00010c358a46 main (main.m:13)
21 libdyld.dylib            0x7fff850755ad start + 1

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 0x608000152850

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  libsystem_platform.dylib 0x00007fff9152205a _platform_memmove$VARIANT$Unknown + 186
1  libsystem_pthread.dylib  0x00007fff9246200d pthread_getname_np + 105
2  net.hockeyapp.CrashLib   0x000000010cb50caf -[CRLCrashAsyncSafeThread crash] + 27 (CRLCrashAsyncSafeThread.m:45) | Wrong line number
3  net.hockeyapp.CrashProbe 0x000000010cb48473 -[CRLMainWindowController causeCrash:] + 75 (CRLMainWindowController.m:72)
4  libsystem_trace.dylib    0x00007fff91233cd7 _os_activity_initiate + 75
5  com.apple.AppKit         0x00007fff8bc45fb1 -[NSApplication sendAction:to:from:] + 452
6  com.apple.AppKit         0x00007fff8bc5ba46 -[NSControl sendAction:to:] + 86
7  com.apple.AppKit         0x00007fff8bc5b962 __26-[NSCell _sendActionFrom:]_block_invoke + 131
8  libsystem_trace.dylib    0x00007fff91233cd7 _os_activity_initiate + 75
9  com.apple.AppKit         0x00007fff8bc5b8bf -[NSCell _sendActionFrom:] + 144
10 libsystem_trace.dylib    0x00007fff91233cd7 _os_activity_initiate + 75
11 com.apple.AppKit         0x00007fff8bc59db3 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2821
12 com.apple.AppKit         0x00007fff8bcb245f -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 770
13 com.apple.AppKit         0x00007fff8bc58466 -[NSControl mouseDown:] + 714
14 com.apple.AppKit         0x00007fff8c1c22fc -[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
15 com.apple.AppKit         0x00007fff8bb51d76 -[NSWindow sendEvent:] + 470
16 com.apple.AppKit         0x00007fff8bb4e312 -[NSApplication sendEvent:] + 2504
17 com.apple.AppKit         0x00007fff8ba77c68 -[NSApplication run] + 711
18 com.apple.AppKit         0x00007fff8b9f4354 NSApplicationMain + 1832
19 net.hockeyapp.CrashProbe 0x000000010cb487d9 main + 9 (main.m:13
20 libdyld.dylib            0x00007fff8aaa75c9 start + 1