firebase-ios-sdk: Crash when user Terminate App

Incident Identifier: 4A17CAE9-0EF0-4FFB-8A9E-CA9C1EC8027A
Hardware Model:      iPhone11,2
Process:             ABT [54970]
Path:                /private/var/containers/Bundle/Application/A0DE28AE-C2EE-4499-B7EC-C0E8C267801C/ABT.app/ABT
Identifier:          xxx.xxx.ios
Version:             2.10.1 (94)
AppStoreTools:       13F15
AppVariant:          1:iPhone11,2:15
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           xxx.xxx.ios [1315]

Date/Time:           2022-05-21 21:28:13.4043 +0800
Launch Time:         2022-05-18 22:49:39.3786 +0800
OS Version:          iPhone OS 15.4.1 (19E258)
Release Type:        User
Baseband Version:    4.03.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<xxx.xxx.ios>:54970] failed to terminate gracefully after 5.0s
ProcessVisibility: Unknown
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 18.870 (user 18.870, system 0.000), 61% CPU",
"Elapsed application CPU time (seconds): 2.852, 9% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0


Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001d8b26bdc kevent_id + 8
1   libdispatch.dylib             	0x00000001a0e471fc _dispatch_kq_poll + 228 (event_kevent.c:750)
2   libdispatch.dylib             	0x00000001a0e47c20 _dispatch_event_loop_wait_for_ownership + 444 (event_kevent.c:2209)
3   libdispatch.dylib             	0x00000001a0e33f54 __DISPATCH_WAIT_FOR_QUEUE__ + 328 (queue.c:1690)
4   libdispatch.dylib             	0x00000001a0e33b28 _dispatch_sync_f_slow + 144 (queue.c:1774)
5   ABT                      	0x00000001032b1794 -[GDTCORRegistrar appWillTerminate:] + 540 (GDTCORRegistrar.m:152)
6   ABT                      	0x00000001032af650 -[GDTCORLifecycle applicationWillTerminateNotification:] + 472 (GDTCORLifecycle.m:114)
7   CoreFoundation                	0x00000001a114f324 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
8   CoreFoundation                	0x00000001a11ebac4 ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
9   CoreFoundation                	0x00000001a11becc0 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
10  CoreFoundation                	0x00000001a116539c _CFXNotificationPost + 728 (CFNotificationCenter.c:1147)
11  Foundation                    	0x00000001a292c704 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
12  ABT                      	0x00000001032b0424 -[GDTCORApplication iOSApplicationWillTerminate:] + 108 (GDTCORPlatform.m:590)
13  CoreFoundation                	0x00000001a114f324 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
14  CoreFoundation                	0x00000001a11ebac4 ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
15  CoreFoundation                	0x00000001a11becc0 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
16  CoreFoundation                	0x00000001a116539c _CFXNotificationPost + 728 (CFNotificationCenter.c:1147)
17  Foundation                    	0x00000001a292c704 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
18  UIKitCore                     	0x00000001a44eed28 -[UIApplication _terminateWithStatus:] + 300 (UIApplication.m:6950)
19  UIKitCore                     	0x00000001a3bcad20 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:806)
20  UIKitCore                     	0x00000001a3dc0528 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 224 (_UISceneLifecycleMultiplexer.m:480)
21  UIKitCore                     	0x00000001a44eb06c -[UIApplication workspaceShouldExit:withTransitionContext:] + 224 (UIApplication.m:3846)
22  FrontBoardServices            	0x00000001b3361fec __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:331)
23  FrontBoardServices            	0x00000001b331d308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
24  FrontBoardServices            	0x00000001b3361f84 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132 (FBSWorkspaceScenesClient.m:328)
25  libdispatch.dylib             	0x00000001a0e24a2c _dispatch_client_callout + 20 (object.m:560)
26  libdispatch.dylib             	0x00000001a0e284e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
27  FrontBoardServices            	0x00000001b331ec70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
28  FrontBoardServices            	0x00000001b331e040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
29  FrontBoardServices            	0x00000001b3322700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
30  CoreFoundation                	0x00000001a11dff04 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
31  CoreFoundation                	0x00000001a11f0c90 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
32  CoreFoundation                	0x00000001a112a184 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053)
33  CoreFoundation                	0x00000001a112fb4c __CFRunLoopRun + 828 (CFRunLoop.c:2951)
34  CoreFoundation                	0x00000001a11436b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
35  GraphicsServices              	0x00000001bd1dd374 GSEventRunModal + 164 (GSEvent.c:2200)
36  UIKitCore                     	0x00000001a3aa8e88 -[UIApplication _run] + 1100 (UIApplication.m:3511)
37  UIKitCore                     	0x00000001a382a5ec UIApplicationMain + 364 (UIApplication.m:5064)
38  libswiftUIKit.dylib           	0x00000001b8e1fecc UIApplicationMain(_:_:_:_:) + 104 (UIKit.swift:530)
39  ABT                      	0x0000000102914f5c main + 276 (main.swift:30)
40  dyld                          	0x0000000104755ce4 start + 520 (dyldMain.cpp:879)

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

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib        	0x00000001d8b26a6c __semwait_signal + 8
1   libsystem_c.dylib             	0x00000001ac2850dc nanosleep + 220 (nanosleep.c:104)
2   Foundation                    	0x00000001a298cd68 +[NSThread sleepForTimeInterval:] + 160 (NSThread.m:504)
3   ABT                      	0x0000000103b3b058 0x10290c000 + 19066968
4   libdispatch.dylib             	0x00000001a0e22e68 _dispatch_call_block_and_release + 32 (init.c:1517)
5   libdispatch.dylib             	0x00000001a0e24a2c _dispatch_client_callout + 20 (object.m:560)
6   libdispatch.dylib             	0x00000001a0e2c124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
7   libdispatch.dylib             	0x00000001a0e2cc80 _dispatch_lane_invoke + 392 (queue.c:3944)
8   libdispatch.dylib             	0x00000001a0e37500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
9   libsystem_pthread.dylib       	0x00000002121420bc _pthread_wqthread + 288 (pthread.c:2599)
10  libsystem_pthread.dylib       	0x0000000212141e5c start_wqthread + 8

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib        	0x00000001d8b26a6c __semwait_signal + 8
1   libsystem_c.dylib             	0x00000001ac2850dc nanosleep + 220 (nanosleep.c:104)
2   libsystem_c.dylib             	0x00000001ac285e0c usleep + 68 (usleep.c:52)
3   ABT                      	0x00000001037504a4 closure #1 in FoundationStream.connect(url:port:timeout:ssl:completion:) + 140 (WebSocket.swift:221)
4   ABT                      	0x0000000102aa3f80 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
5   libdispatch.dylib             	0x00000001a0e22e68 _dispatch_call_block_and_release + 32 (init.c:1517)
6   libdispatch.dylib             	0x00000001a0e24a2c _dispatch_client_callout + 20 (object.m:560)
7   libdispatch.dylib             	0x00000001a0e2c124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
8   libdispatch.dylib             	0x00000001a0e2cc80 _dispatch_lane_invoke + 392 (queue.c:3944)
9   libdispatch.dylib             	0x00000001a0e37500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
10  libsystem_pthread.dylib       	0x00000002121420bc _pthread_wqthread + 288 (pthread.c:2599)
11  libsystem_pthread.dylib       	0x0000000212141e5c start_wqthread + 8

GoogleDataTransport (~> 9.1)
FirebaseAnalytics (8.15.0):
    - FirebaseAnalytics/AdIdSupport (= 8.15.0)
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (~> 2.30908.0)
  - FirebaseAnalytics/AdIdSupport (8.15.0):
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleAppMeasurement (= 8.15.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (~> 2.30908.0)
  - FirebaseAuth (8.15.0):
    - FirebaseCore (~> 8.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/Environment (~> 7.7)
    - GTMSessionFetcher/Core (~> 1.5)
  - FirebaseCore (8.15.0):
    - FirebaseCoreDiagnostics (~> 8.0)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Logger (~> 7.7)
  - FirebaseCoreDiagnostics (8.15.0):
    - GoogleDataTransport (~> 9.1)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Logger (~> 7.7)
    - nanopb (~> 2.30908.0)
  - FirebaseCrashlytics (8.15.0):
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleDataTransport (~> 9.1)
    - GoogleUtilities/Environment (~> 7.7)
    - nanopb (~> 2.30908.0)
    - PromisesObjC (< 3.0, >= 1.2)
  - FirebaseInstallations (8.15.0):
    - FirebaseCore (~> 8.0)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/UserDefaults (~> 7.7)
    - PromisesObjC (< 3.0, >= 1.2)
  - FirebaseMessaging (8.15.0):
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleDataTransport (~> 9.1)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Reachability (~> 7.7)
    - GoogleUtilities/UserDefaults (~> 7.7)
    - nanopb (~> 2.30908.0)
  - FirebasePerformance (8.15.0):
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - FirebaseRemoteConfig (~> 8.0)
    - GoogleDataTransport (~> 9.1)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/ISASwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - nanopb (~> 2.30908.0)
  - FirebaseRemoteConfig (8.15.0):
    - FirebaseABTesting (~> 8.0)
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleUtilities/Environment (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
  - FMDB (2.7.5):
    - FMDB/standard (= 2.7.5)
  - FMDB/standard (2.7.5)
  - GoogleAppMeasurement (8.15.0):
    - GoogleAppMeasurement/AdIdSupport (= 8.15.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 25 (8 by maintainers)

Most upvoted comments

Hi @maopenglin, are you still seeing these crashes? Likewise, for you @iamjcabarra?

So far, I am no longer seeing this crash.

Still seeing this warning: Background Task 26 (“GDTCCTUploader-upload”), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_😃 for your task in a timely manner to avoid this.

I have some ideas on how to reproduce the state that it may be crashing in. If it is a regression, I’m not sure when it would have been introduced as GDT has not had a release that touched that code in some time. I will investigate and report back!

Hi everyone, GoogleDataTransport 9.3.0 has been released. This release contains a fix from https://github.com/google/GoogleDataTransport/pull/111.

Please update the dependency by running pod update GoogleDataTransport for CocoaPods, or selecting File -> Packages -> Update to Latest Package Versions within Xcode for SwiftPM users.

This release should address the 0x8BADF00D crash during app termination.

@ncooke3 can you take another look at this? The background task crash may be a regression.

@ncooke3 Will you take a look? Maybe a deadlock on the storageQueue?