Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUNNINGBOARD 0xdead10cc crash when inside a Notification Extension #601

Open
RamblinWreck77 opened this issue Apr 28, 2023 · 3 comments
Open

Comments

@RamblinWreck77
Copy link
Contributor

Mixpanel SDK: 4.1.0
Xcode: 14.3
iOS: Seems to happen on 16.0+

So we've been noticing a crash inside our notification service extension, which is very simple/only a few lines of code but it does setup the Mixpanel SDK in order to send events that the user has received a push notification successfully.

Looking into the stack trace this stood out:

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: RUNNINGBOARD 0xdead10cc 

Triggered by Thread:  0


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001f8a73ff0 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	0x00000001f8a85ad8 mach_msg2_internal + 76 (mach_msg.c:201)
2   libsystem_kernel.dylib        	0x00000001f8a85d78 mach_msg_overwrite + 484 (mach_msg.c:0)
3   libsystem_kernel.dylib        	0x00000001f8a744e4 mach_msg + 20 (mach_msg.c:323)
4   CoreFoundation                	0x00000001be2802b8 __CFRunLoopServiceMachPort + 156 (CFRunLoop.c:2622)
5   CoreFoundation                	0x00000001be281450 __CFRunLoopRun + 1208 (CFRunLoop.c:3005)
6   CoreFoundation                	0x00000001be285e90 CFRunLoopRunSpecific + 584 (CFRunLoop.c:3418)
7   Foundation                    	0x00000001b85f2218 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208 (NSRunLoop.m:373)
8   Foundation                    	0x00000001b85f20c4 -[NSRunLoop(NSRunLoop) run] + 60 (NSRunLoop.m:398)
9   libxpc.dylib                  	0x0000000207f11840 _xpc_objc_main + 492 (main.m:246)
10  libxpc.dylib                  	0x0000000207f13968 xpc_main + 152 (init.c:1258)
11  Foundation                    	0x00000001b86358c4 -[NSXPCListener resume] + 260 (NSXPCListener.m:460)
12  PlugInKit                     	0x00000001e2255058 -[PKService run] + 328 (PKService.m:197)
13  PlugInKit                     	0x00000001e2242998 +[PKService main] + 532 (PKService.m:119)
14  PlugInKit                     	0x00000001e2241d44 +[PKService _defaultRun:arguments:] + 12 (PKService.m:244)
15  ExtensionFoundation           	0x00000001cab0fca0 EXExtensionMain + 248 (EXExtensionMain.m:34)
16  Foundation                    	0x00000001b8675858 NSExtensionMain + 176 (NSExtensionMain.m:14)
17  dyld                          	0x00000001db98b344 start + 1860 (dyldMain.cpp:1165)

Which lead me to here:

https://developer.apple.com/forums/thread/111259

The exception code

0xdead10cc
indicates that an application has been terminated by the OS because it held on to a file lock or sqlite database lock during suspension. If your application is performing operations on a locked file or sqlite database at suspension time, it must [request additional background execution time](https://developer.apple.com/reference/uikit/uiapplication/1623051-beginbackgroundtask) to complete those operations and relinquish the lock before suspending.“

Our app doesn't use sqlite at all, and we're down to just Mixpanel and Lottie as dependencies (Lottie is a UI animation library, so no sqlite there, also it's not imported/part of the notification extension) so I'm 99.9% sure it's in the Mixpanel SDK.

I've never heard a of crash like this (requiring you to release a lock on a resource before suspension, or crash?!), so it's possible this could be the root cause of a lot of "weird" crashes that are otherwise hard to pin down.

@RamblinWreck77
Copy link
Contributor Author

Another useful thread:

https://developer.apple.com/forums/thread/126438

@RamblinWreck77
Copy link
Contributor Author

Also, while this is happening for us inside a Notification Extension I don't see any reason why it would be limited to that.

@jaredmixpanel
Copy link
Contributor

@RamblinWreck77 Hmm, first I've heard of it... not clear to me what the right approach is to prevent that exception. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants