PlugInKit crash on widget

According to the Crash report we experience many crashes on our Widget extention: PlugInKit: -[PKService run]

This is happening on multiple iOS versions. We tried to reproduce it wituout any luck and I don't understand from the stack trace why it is happening. Can anyone point me to the right direction?


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib         0x1ab74900 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x1ab746e0 mach_msg + 44 (mach_msg.c:103)
2   CoreFoundation                 0x1b377be2 __CFRunLoopServiceMachPort + 144 (CFRunLoop.c:2527)
3   CoreFoundation                 0x1b376064 __CFRunLoopRun + 1436 (CFRunLoop.c:2870)
4   CoreFoundation                 0x1b2c91ae CFRunLoopRunSpecific + 470 (CFRunLoop.c:3113)
5   CoreFoundation                 0x1b2c8fd0 CFRunLoopRunInMode + 104 (CFRunLoop.c:3143)
6   GraphicsServices               0x1ca73b40 GSEventRunModal + 80 (GSEvent.c:2245)
7   UIKit                         0x20651a52 UIApplicationMain + 150 (UIApplication.m:4089)
8   libxpc.dylib                   0x1ac7062a _xpc_objc_main + 702 (main.m:143)
9   libxpc.dylib                   0x1ac71bd0 xpc_main + 164 (init.c:1468)
10  Foundation                     0x1bdfadfe -[NSXPCListener resume] + 182 (NSXPCListener.m:251)
11  PlugInKit                     0x22b1db84 -[PKService run] + 684 (PKService.m:105)
12  PlugInKit                     0x22b1d7a4 +[PKService main] + 56 (PKService.m:39)
13  PlugInKit                     0x22b1dbb2 +[PKService _defaultRun:arguments:] + 20 (PKService.m:116)
14  Foundation                     0x1bde2586 NSExtensionMain + 48 (NSExtensionMain.m:23)
15  libdyld.dylib                 0x1aab64ea start + 2


Thread 1:
0   libsystem_pthread.dylib       0x1ac3e454 start_wqthread + 0


Thread 2:
0   libsystem_pthread.dylib       0x1ac3e454 start_wqthread + 0


Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib         0x1ab8a73c __workq_kernreturn + 8
1   libsystem_pthread.dylib       0x1ac4280c _pthread_workqueue_addthreads + 58 (pthread.c:2348)
2   libdispatch.dylib             0x1aa99272 _dispatch_global_queue_poke_slow + 56 (queue.c:4296)
3   libdispatch.dylib             0x1aa98182 _dispatch_root_queue_drain + 276 (queue.c:4361)
4   libdispatch.dylib             0x1aa9800e _dispatch_worker_thread3 + 106 (queue.c:5550)
5   libsystem_pthread.dylib       0x1ac3e87c _pthread_wqthread + 1040 (pthread.c:2196)
6   libsystem_pthread.dylib       0x1ac3e45c start_wqthread + 8


Thread 4 name:
Thread 4:
0   libsystem_kernel.dylib         0x1ab74900 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x1ab746e0 mach_msg + 44 (mach_msg.c:103)
2   CoreFoundation                 0x1b377be2 __CFRunLoopServiceMachPort + 144 (CFRunLoop.c:2527)
3   CoreFoundation                 0x1b376064 __CFRunLoopRun + 1436 (CFRunLoop.c:2870)
4   CoreFoundation                 0x1b2c91ae CFRunLoopRunSpecific + 470 (CFRunLoop.c:3113)
5   CoreFoundation                 0x1b2c8fd0 CFRunLoopRunInMode + 104 (CFRunLoop.c:3143)
6   Foundation                     0x1bc1daf4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 258 (NSRunLoop.m:367)
7   Foundation                     0x1bc3a76c -[NSRunLoop(NSRunLoop) runUntilDate:] + 86 (NSRunLoop.m:411)
8   UIKit                         0x20f52ad8 -[UIEventFetcher threadMain] + 128 (UIEventFetcher.m:313)
9   Foundation                     0x1bd018ea __NSThread__start__ + 1122 (NSThread.m:1163)
10  libsystem_pthread.dylib       0x1ac4093a _pthread_body + 216 (pthread.c:697)
11  libsystem_pthread.dylib       0x1ac4085c _pthread_start + 234 (pthread.c:744)
12  libsystem_pthread.dylib       0x1ac3e468 thread_start + 8


Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib         0x1ab8a57c __ulock_wake + 8
1   libsystem_platform.dylib       0x1ac3b5b2 _os_unfair_lock_unlock_slow + 50 (lock.c:590)
2   CoreFoundation                 0x1b3e7e9c __CFBasicHashDrain + 512 (CFBasicHash.c:1074)
3   CoreFoundation                 0x1b379518 _CFRelease + 426 (CFRuntime.c:1987)
4   Foundation                     0x1bc18f9a -[NSXPCInterface dealloc] + 26 (NSXPCInterface.m:93)
5   libobjc.A.dylib               0x1a65d258 objc_object::sidetable_release(bool) + 238 (NSObject.mm:1591)
6   Foundation                     0x1bc18f5a -[_NSXPCConnectionExportInfo dealloc] + 60 (NSXPCConnectionHelpers.m:103)
7   libobjc.A.dylib               0x1a65d258 objc_object::sidetable_release(bool) + 238 (NSObject.mm:1591)
8   CoreFoundation                 0x1b3e7de8 __CFBasicHashDrain + 332 (CFBasicHash.c:389)
9   CoreFoundation                 0x1b2d20c4 CFDictionaryRemoveAllValues + 414 (CFDictionary.c:722)
10  Foundation                     0x1bc18f08 -[_NSXPCConnectionExportedObjectTable invalidate] + 88 (NSXPCConnectionHelpers.m:246)
11  Foundation                     0x1bc192dc message_handler + 504 (NSXPCConnection.m:521)
12  libxpc.dylib                   0x1ac67904 _xpc_connection_call_event_handler + 40 (connection.c:546)
13  libxpc.dylib                   0x1ac65bb0 _xpc_connection_mach_event + 640 (connection.c:1793)
14  libdispatch.dylib             0x1aaa2c42 _dispatch_mach_cancel_invoke + 52 (source.c:5841)
15  libdispatch.dylib             0x1aa8c3f2 _dispatch_mach_invoke + 844 (source.c:5979)
16  libdispatch.dylib             0x1aa9644e _dispatch_queue_serial_drain + 520 (inline_internal.h:2468)
17  libdispatch.dylib             0x1aa8cb70 _dispatch_queue_invoke + 886 (queue.c:4853)
18  libdispatch.dylib             0x1aa981b4 _dispatch_root_queue_drain + 326 (inline_internal.h:2468)
19  libdispatch.dylib             0x1aa9800e _dispatch_worker_thread3 + 106 (queue.c:5550)
20  libsystem_pthread.dylib       0x1ac3e87c _pthread_wqthread + 1040 (pthread.c:2196)
21  libsystem_pthread.dylib       0x1ac3e45c start_wqthread + 8


Thread 6:
0   libsystem_pthread.dylib       0x1ac3e454 start_wqthread + 0


Thread 7:
0   libsystem_kernel.dylib         0x1ab74968 semaphore_timedwait_trap + 8
1   libdispatch.dylib             0x1aa9a9de _os_semaphore_timedwait + 70 (lock.c:130)
2   libdispatch.dylib             0x1aa9a07e _dispatch_semaphore_wait_slow + 56 (semaphore.c:127)
3   libdispatch.dylib             0x1aa99462 _dispatch_worker_thread + 200 (queue.c:5616)
4   libsystem_pthread.dylib       0x1ac4093a _pthread_body + 216 (pthread.c:697)
5   libsystem_pthread.dylib       0x1ac4085c _pthread_start + 234 (pthread.c:744)
6   libsystem_pthread.dylib       0x1ac3e468 thread_start + 8


Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x10004005    r1: 0x07000806      r2: 0x00000000      r3: 0x00000c00
    r4: 0x00002703    r5: 0xffffffff      r6: 0x00000000      r7: 0x001fec9c
    r8: 0x00000000    r9: 0x5bfb3f2a     r10: 0x001fed4c     r11: 0xffffffff
    ip: 0xffffffe1    sp: 0x001fec60      lr: 0x1ab746e1      pc: 0x1ab74900
  cpsr: 0x60000010
This is still happening - any one got any ideas why?

This is still happening

Can you post a complete Apple crash report? Use the editor’s text attachment feature to avoid clogging up the timeline.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
I am getting a lot of these as well-

Code Block
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace RUNNINGBOARD, Code 0xdead10cc
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001c5123dd0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001c5123184 mach_msg + 76 (mach_msg.c:103)
2 CoreFoundation 0x0000000199192cf8 CFRunLoopServiceMachPort + 380 (CFRunLoop.c:2641)
3 CoreFoundation 0x000000019918cea8 CFRunLoopRun + 1216 (CFRunLoop.c:2974)
4 CoreFoundation 0x000000019918c4bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
5 Foundation 0x000000019a409e30 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:374)
6 Foundation 0x000000019a43c79c -[NSRunLoop(NSRunLoop) run] + 92 (NSRunLoop.m:399)
7 libxpc.dylib 0x00000001e079e428 _xpc_objc_main + 688 (main.m:265)
8 libxpc.dylib 0x00000001e07a0700 xpc_main + 180 (init.c:1198)
9 Foundation 0x000000019a43eaa8 -[NSXPCListener resume] + 316 (NSXPCListener.m:448)
10 PlugInKit 0x00000001c78cf564 -[PKService run] + 424 (PKService.m:186)
11 PlugInKit 0x00000001c78cf1a4 +[PKService main] + 576 (PKService.m:115)
12 PlugInKit 0x00000001c78cf970 +[PKService _defaultRun:arguments:] + 24 (PKService.m:233)
13 ExtensionKit 0x000000019d67d848 EXExtensionMain + 84 (EXExtensionMain.m:23)
14 Foundation 0x000000019a586b78 NSExtensionMain + 200 (NSExtensionMain.m:13)
15 libdyld.dylib 0x0000000198e53e60 start + 4

I responded on the other thread that you raised this on.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Same here,
crash log 1.:



crash log 2.(very similar):




Same here

Those crash reports seems to be missing a big chunk from the front. A typical crash report starts with a Process field and then has lots of other fields before the Exception Type field. Your crash reports both start with the Exception Type, so they’re missing critical information.

Do you still have an original crash report? If so, please post it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
I still have the same problem.
Is there a solution?



@Eskimo, here it is!


Consider this:

Code Block
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace RUNNINGBOARD, Code 0xdead10cc
Triggered by Thread: 0


The code value of 0xdead10cc expands to “deadlock”. See Understanding the Exception Types in a Crash Report for more on this.

Looking at thread 1 I see this:

Code Block
Thread 1:
0 libsystem_kernel.dylib … __guarded_open_dprotected_np + 8
1 libsystem_kernel.dylib … guarded_open_dprotected_np + 36 (guarded_open_dprotected_np.c:44)
2 libsqlite3.dylib … robust_open2 + 292 (sqlite3.c:36126)
3 libsqlite3.dylib … unixOpen + 2000 (sqlite3.c:44555)
4 libsqlite3.dylib … pager_write + 940 (sqlite3.c:23869)
5 libsqlite3.dylib … sqlite3BtreeDelete + 1160 (sqlite3.c:64920)
6 libsqlite3.dylib … sqlite3VdbeExec + 18100 (sqlite3.c:97509)
7 libsqlite3.dylib … sqlite3_step + 304 (sqlite3.c:90602)
8 libsqlite3.dylib … sqlite3_exec + 368 (sqlite3.c:130568)
9 WidgetExtension … -[AMPDatabaseHelper execSQLString:SQLString:] + 88 (AMPDatabaseHelper.m:215)
10 WidgetExtension … __49-[AMPDatabaseHelper removeEventsFromTable:maxId:]_block_invoke + 116 (AMPD…
11 WidgetExtension … __32-[AMPDatabaseHelper inDatabase:]_block_invoke + 104 (AMPDatabaseHelper.m:1…
12 libdispatch.dylib … _dispatch_client_callout + 20 (object.m:559)
13 libdispatch.dylib … _dispatch_lane_barrier_sync_invoke_and_complete + 60 (queue.c:998)
14 WidgetExtension … -[AMPDatabaseHelper inDatabase:] + 176 (AMPDatabaseHelper.m:156)
15 WidgetExtension … -[AMPDatabaseHelper removeEventsFromTable:maxId:] + 144 (AMPDatabaseHelper.m:5…
16 WidgetExtension … __82-[Amplitude makeEventUploadPostRequest:events:numEvents:maxEventId:maxIden…
17 CFNetwork … __40-[__NSURLSessionLocal taskForClassInfo:]_block_invoke + 540 (LocalSession.…
18 CFNetwork … __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 244 (Loca…
19 libdispatch.dylib … _dispatch_call_block_and_release + 32 (init.c:1454)


There’s a whole bunch of your code here (frames 16…14 and 11…9) and it’s clearly doing SQL work. It looks like your process got suspended in the middle of this work, resulting in the 0xdead10cc crash.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
@eskimo I removed the 3rd party library causing this, and the crashes are still occurring. We're doing no other SQL work either. I can't get the crash reports, because we are testing this via firebase.

Is it not recommended to use any 3rd party libraries in widgets at all? The only thing I can think of is that our network requests are potentially causing this crash - but if there are network request failures occurring, the crash reports are not catching them. What else can I do here?
@eskimo, is it not a good idea to have concurrent network requests for the widget while the phone is locked? Or in general?

I removed the 3rd party library causing this, and the crashes are
still occurring. We're doing no other SQL work either.

Well, if you’re seeing this crash then someone is doing SQLite work within your process.

I can't get the crash reports, because we are testing this via
firebase.

I recommend that you fix this first. I can’t see any reasonable way to debug this without a crash report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I encountered the same problem.

My Widget Extension opens a Realm database on init(). The database file located in the App Group, and later the Widget Extension receives 0xdead10cc error. I have never reproduced this problem in my own development environment, or test environment. But I can continue to collect this crash report from users.

There is still no solution.

PlugInKit crash on widget
 
 
Q