firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Firebase/Crashlytics 8.8.0 ======FIRCLSContextInitialize + 764 (FIRCLSContext.m:254) crash

Open 405092901 opened this issue 2 years ago • 5 comments

pod 'Firebase/Crashlytics', '8.8.0' pod 'Firebase/Core', '8.8.0' pod 'Firebase/RemoteConfig', '8.8.0' pod 'Firebase/Performance', '8.8.0'

it is crash log, fix it crash as soon as possible please

Hardware Model:      iPhone8,1
Process:             Xxxxx [2915]
Path:                /private/var/containers/Bundle/Application/182A0C05-4DC8-40AE-91E1-1AD3E9EA6B2B/Xxxxx.app/Xxxxx
Identifier:          Xxxx
Version:             4.6.0 (3691)
AppStoreTools:       13F15
AppVariant:          1:iPhone8,1:15
Code Type:           ARM-64 (Native)
Role:                Non UI
Parent Process:      launchd [1]
Coalition:           Xxxx [484]

Date/Time:           2022-05-23 03:13:20.5195 +0530
Launch Time:         2022-05-23 03:13:15.5994 +0530
OS Version:          iPhone OS 15.4.1 (19E258)
Release Type:        User
Baseband Version:    9.01.00
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:scene-create watchdog transgression: application<Xxxx>:2915 exhausted CPU time allowance of 4.81 seconds
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: scene-create
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 8.270 (user 8.270, system 0.000), 99% CPU",
"Elapsed application CPU time (seconds): 5.215, 63% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001baf74688 __ulock_wait + 8
1   libdispatch.dylib             	0x00000001804b0d58 _dlock_wait + 52 (lock.c:326)
2   libdispatch.dylib             	0x00000001804b0aa0 _dispatch_wait_on_address$VARIANT$mp + 136 (lock.c:366)
3   libdispatch.dylib             	0x00000001804b10e4 _dispatch_group_wait_slow + 52 (semaphore.c:214)
4   Xxxxx                          	0x0000000103372ae4 FIRCLSContextInitialize + 764 (FIRCLSContext.m:254)
5   Xxxxx                          	0x0000000103389eb4 -[FIRCLSReportManager startCrashReporterWithProfilingMark:report:] + 88 (FIRCLSReportManager.m:420)
6   Xxxxx                          	0x00000001033892ac -[FIRCLSReportManager startWithProfilingMark:] + 328 (FIRCLSReportManager.m:294)
7   Xxxxx                          	0x0000000103393424 -[FIRCrashlytics initWithApp:appInfo:installations:analytics:] + 964 (FIRCrashlytics.m:161)
8   Xxxxx                          	0x000000010339391c __38+[FIRCrashlytics componentsToRegister]_block_invoke + 348 (FIRCrashlytics.m:195)
9   Xxxxx                          	0x0000000103367710 -[FIRComponentContainer instantiateInstanceForProtocol:withBlock:] + 68 (FIRComponentContainer.m:148)
10  Xxxxx                          	0x00000001033678c8 -[FIRComponentContainer instanceForProtocol:] + 224 (FIRComponentContainer.m:182)
11  Xxxxx                          	0x0000000103367608 -[FIRComponentContainer instantiateEagerComponents] + 200 (FIRComponentContainer.m:125)
12  Xxxxx                          	0x00000001033640a4 +[FIRApp configureWithName:options:] + 744 (FIRApp.m:212)
13  Xxxxx                          	0x0000000103363cf8 +[FIRApp configureWithOptions:] + 96 (FIRApp.m:151)
14  Xxxxx                          	0x0000000103363c84 +[FIRApp configure] + 124 (FIRApp.m:137)
15  Xxxxx                          	0x000000010177a38c AppDelegate.setupFireBase() + 204 (AppDelegate.swift:774)
16  Xxxxx                          	0x00000001017766e0 AppDelegate.application(_:didFinishLaunchingWithOptions:) + 3280 (AppDelegate.swift:277)
17  Xxxxx                          	0x000000010177a940 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 196 (<compiler-generated>:0)
18  UIKitCore                     	0x0000000182df99b4 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 336 (UIApplication.m:2334)
19  UIKitCore                     	0x0000000182fcdf74 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3508 (UIApplication.m:2754)
20  UIKitCore                     	0x0000000182fb765c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1176 (UIApplication.m:4491)
21  UIKitCore                     	0x0000000182e2556c -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 148 (_UISceneLifecycleMultiplexer.m:450)
22  UIKitCore                     	0x0000000182c8c56c _UIScenePerformActionsWithLifecycleActionMask + 96 (_UISceneLifecycleState.m:109)
23  UIKitCore                     	0x0000000182daee34 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 188 (_UISceneLifecycleMultiplexer.m:563)
24  UIKitCore                     	0x0000000182ec4264 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 368 (_UISceneLifecycleMultiplexer.m:515)
25  UIKitCore                     	0x00000001830ec604 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 744 (_UISceneLifecycleMultiplexer.m:562)
26  UIKitCore                     	0x000000018307c36c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 336 (_UISceneLifecycleMultiplexer.m:468)
27  UIKitCore                     	0x0000000182c8d2b8 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 188 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
28  UIKitCore                     	0x0000000182d48d54 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 812 (BSAnimationSettings+UIKit.m:50)
29  UIKitCore                     	0x0000000182c8f048 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 248 (_UISceneSettingsDiffAction.m:23)
30  UIKitCore                     	0x0000000182d7358c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 356 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:58)
31  UIKitCore                     	0x00000001831c9070 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.578 + 772 (UIScene.m:1825)
32  UIKitCore                     	0x0000000182cbccf0 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248 (UIScene.m:1526)
33  UIKitCore                     	0x0000000182cfe944 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 264 (UIScene.m:1792)
34  UIKitCore                     	0x0000000182e29fd4 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 560 (UIApplication.m:3955)
35  UIKitCore                     	0x0000000182d719a8 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 360 (UIApplicationSceneClientAgent.m:45)
36  FrontBoardServices            	0x00000001918ffc50 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 412 (FBSScene.m:439)
37  FrontBoardServices            	0x0000000191921f98 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.180 + 100 (FBSWorkspaceScenesClient.m:384)
38  FrontBoardServices            	0x00000001918e2bdc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232 (FBSWorkspace.m:352)
39  FrontBoardServices            	0x00000001918e3fd4 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 312 (FBSWorkspaceScenesClient.m:383)
40  libdispatch.dylib             	0x0000000180510094 _dispatch_client_callout + 16 (object.m:560)
41  libdispatch.dylib             	0x00000001804b314c _dispatch_block_invoke_direct$VARIANT$mp + 220 (queue.c:501)
42  FrontBoardServices            	0x00000001918e42ac __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40 (FBSSerialQueue.m:157)
43  FrontBoardServices            	0x00000001918e37c0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 176 (FBSSerialQueue.m:181)
44  FrontBoardServices            	0x00000001918e7960 -[FBSSerialQueue _performNextFromRunLoopSource] + 24 (FBSSerialQueue.m:194)
45  CoreFoundation                	0x000000018086feec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1972)
46  CoreFoundation                	0x000000018088001c __CFRunLoopDoSource0 + 204 (CFRunLoop.c:2016)
47  CoreFoundation                	0x00000001807c2214 __CFRunLoopDoSources0 + 256 (CFRunLoop.c:2053)
48  CoreFoundation                	0x00000001807c78e8 __CFRunLoopRun + 768 (CFRunLoop.c:2951)
49  CoreFoundation                	0x00000001807dac30 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
50  GraphicsServices              	0x00000001a11d1988 GSEventRunModal + 160 (GSEvent.c:2200)
51  UIKitCore                     	0x0000000182fd5c50 -[UIApplication _run] + 1080 (UIApplication.m:3511)
52  UIKitCore                     	0x0000000182d6f3d0 UIApplicationMain + 336 (UIApplication.m:5064)
53  Xxxxx                          	0x00000001002acd50 0x1000a8000 + 2116944
54  dyld                          	0x00000001073a03d0 start + 444 (dyldMain.cpp:879)

405092901 avatar May 26 '22 12:05 405092901

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar May 26 '22 12:05 google-oss-bot

This crash is a result of watchdog termination during Crashlytics initialization. The dispatch_group_wait that caused this crash is here.

Crashlytics uses a timeout to skip init and error out if initialization takes too long, set to 5 seconds here.

The watchdog terminated the app after 4.8 seconds.

morganchen12 avatar May 26 '22 18:05 morganchen12

how to fix this watchdog

songzhiming avatar Jun 17 '22 08:06 songzhiming

In the short term, you can manually edit the Crashlytics source and set the timeout to a shorter interval, like 3.5 seconds.

In the long term the Firebase team needs to investigate why this hangs on startup to determine if it's a locking issue or simply too many initialization tasks on a slow device.

morganchen12 avatar Jun 17 '22 17:06 morganchen12

@morganchen12 startup in subthread may fix this

songzhiming avatar Jun 21 '22 01:06 songzhiming

Close this issue because there hasn't been any activity for a few months. Please make sure to update to the latest sdk version and check if that solves the issue. Feel free to open a new one if you still experience this problem.

themiswang avatar Jan 17 '23 21:01 themiswang