iOS 15 Watchdog crashes

Hi,

In our application we are facing lot of watchdog crashes after iOS 15 rollout. We are not able to identify the root cause for most of these crashes which are happening from applicationWillTerminate. Can someone please check the attached crash reports and lets us know how to identify the root cause for these crashes and then how to fix them?

0   libsystem_kernel.dylib        	0x00000001e0959f24 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000021a68f298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   UnityFramework                	0x0000000107c2922c il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 25334316 (PosixWaitObject.cpp:120)
3   UnityFramework                	0x0000000107c1fd3c il2cpp::os::Thread::Join() + 25296188 (Thread.cpp:207)
4   UnityFramework                	0x0000000107c4575c il2cpp::vm::Thread::KillAllBackgroundThreadsAndWaitForForegroundThreads() + 25450332 (Thread.cpp:315)
5   UnityFramework                	0x0000000107c4f820 il2cpp::vm::Runtime::Shutdown() + 25491488 (Runtime.cpp:395)
6   UnityFramework                	0x0000000107576f34 CleanupIl2Cpp + 18313012 (MonoManager_Il2Cpp.cpp:296)
7   UnityFramework                	0x00000001074a7afc PlayerCleanup + 17464060 (Player.cpp:627)
8   UnityFramework                	0x000000010777a358 UnityCleanup + 20423512 (LibEntryPoint.mm:220)
9   UnityFramework                	0x0000000106416540 -[UnityAppController applicationWillTerminate:] + 91456 (UnityAppController.mm:856)
10  UIKitCore                     	0x00000001ac1cab48 -[UIApplication _terminateWithStatus:] + 244 (UIApplication.m:6948)
11  UIKitCore                     	0x00000001ab8a6900 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:806)
12  UIKitCore                     	0x00000001aba9c3f8 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 224 (_UISceneLifecycleMultiplexer.m:480)
13  UIKitCore                     	0x00000001ac1c6ec4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 224 (UIApplication.m:3846)
14  FrontBoardServices            	0x00000001bb036fec __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:331)
15  FrontBoardServices            	0x00000001baff2308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
16  FrontBoardServices            	0x00000001bb036f84 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132 (FBSWorkspaceScenesClient.m:328)
17  libdispatch.dylib             	0x00000001a8af4a30 _dispatch_client_callout + 20 (object.m:560)
18  libdispatch.dylib             	0x00000001a8af84e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
19  FrontBoardServices            	0x00000001baff3c70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
20  FrontBoardServices            	0x00000001baff3040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
21  FrontBoardServices            	0x00000001baff7700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
22  CoreFoundation                	0x00000001a8eaf414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
23  CoreFoundation                	0x00000001a8ec01a0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
24  CoreFoundation                	0x00000001a8df96f8 __CFRunLoopDoSources0 + 368 (CFRunLoop.c:2061)
Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x000000020c5aaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x0000000245bcd2c4 _pthread_cond_wait + 1280 (pthread_cond.c:640)
2   UnityFramework                	0x00000001053551cc il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 25334220 (PosixWaitObject.cpp:153)
3   UnityFramework                	0x000000010534bd64 il2cpp::os::Thread::Join(unsigned int) + 25296228 (Thread.cpp:216)
4   UnityFramework                	0x00000001053721ac il2cpp::vm::Thread::Stop(Il2CppInternalThread*) + 25452972 (Thread.cpp:782)
5   UnityFramework                	0x0000000105393568 threadpool_ms_cleanup() + 25589096 (threadpool-ms.cpp:691)
6   UnityFramework                	0x000000010537b81c il2cpp::vm::Runtime::Shutdown() + 25491484 (Runtime.cpp:393)
7   UnityFramework                	0x0000000104ca2f34 CleanupIl2Cpp + 18313012 (MonoManager_Il2Cpp.cpp:296)
8   UnityFramework                	0x0000000104bd3afc PlayerCleanup + 17464060 (Player.cpp:627)
9   UnityFramework                	0x0000000104ea6358 UnityCleanup + 20423512 (LibEntryPoint.mm:220)
10  UnityFramework                	0x0000000103b42540 -[UnityAppController applicationWillTerminate:] + 91456 (UnityAppController.mm:856)
11  UIKitCore                     	0x00000001d7f72cf0 -[UIApplication _terminateWithStatus:] + 244 (UIApplication.m:6948)
12  UIKitCore                     	0x00000001d764ed20 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:806)
13  UIKitCore                     	0x00000001d7844528 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 224 (_UISceneLifecycleMultiplexer.m:480)
14  UIKitCore                     	0x00000001d7f6f06c -[UIApplication workspaceShouldExit:withTransitionContext:] + 224 (UIApplication.m:3846)
15  FrontBoardServices            	0x00000001e6de5fec __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:331)
16  FrontBoardServices            	0x00000001e6da1308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
17  FrontBoardServices            	0x00000001e6de5f84 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132 (FBSWorkspaceScenesClient.m:328)
18  libdispatch.dylib             	0x00000001d48a8a2c _dispatch_client_callout + 20 (object.m:560)
19  libdispatch.dylib             	0x00000001d48ac4e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
20  FrontBoardServices            	0x00000001e6da2c70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
21  FrontBoardServices            	0x00000001e6da2040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
22  FrontBoardServices            	0x00000001e6da6700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
23  CoreFoundation                	0x00000001d4c63f04 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
24  CoreFoundation                	0x00000001d4c74c90 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)

Regards, Eshwar

Both your crash reports contain this line:

Termination Reason: FRONTBOARD 2343432205 

This translates to 0x8badf00d, which is a watchdog crash report as discussed in Addressing Watchdog Terminations.

Looking at the main thread backtrace I see this:

0  libsystem_kernel.dylib  … __psynch_cvwait + 8
1  libsystem_pthread.dylib … _pthread_cond_wait + 1236 …
2  UnityFramework          … il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 25334316 …
3  UnityFramework          … il2cpp::os::Thread::Join() + 25296188 …
4  UnityFramework          … il2cpp::vm::Thread::KillAllBackgroundThreadsAndWaitForForegroundThreads() + 25450332 …
5  UnityFramework          … il2cpp::vm::Runtime::Shutdown() + 25491488 …
6  UnityFramework          … CleanupIl2Cpp + 18313012 …
7  UnityFramework          … PlayerCleanup + 17464060 …
8  UnityFramework          … UnityCleanup + 20423512 …
9  UnityFramework          … -[UnityAppController applicationWillTerminate:] + 91456 …
10 UIKitCore               … -[UIApplication _terminateWithStatus:] + 244 …

Frame 10 is iOS trying to terminate your app cleanly. That calls the -applicationWillTerminate: delegate method, frame 9. At that point your third-party runtime takes over and it seems to have blocked trying to clean up. I’ve no idea why it’s doing that. I encourage you to escalate this via its support channel.

Share and Enjoy

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

One of the threads is doing some heavy work and after marking that thread as BackgroundThread, this issue is resolved for us. Looks like, while app is terminating Watchdog does not wait for background threads to complete their work but it waits for normal threads to finish their work. If they can't complete work in 5sec they app will crash.

iOS 15 Watchdog crashes
 
 
Q