Firebase-ios-sdk: Crash in com.google.GDTCOREventIDQueue

Created on 13 Jun 2020  路  4Comments  路  Source: firebase/firebase-ios-sdk

Step 0: Are you in the right place?

Yes, I think so :o)

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: Firebase iOS 6.26.0
  • Firebase Component: DataTransport
  • Component version: GoogleDataTransport (6.2.1), GoogleDataTransportCCTSupport (3.1.0)
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Crash on iOS 13.4.1 (17E262)
iPhone 8 Plus

Steps to reproduce:

Crashreport from Crashlytics

Relevant Code:

Crashed: com.google.GDTCOREventIDQueue
0  libsystem_malloc.dylib         0x1b0ebce84 nanov2_allocate_from_block$VARIANT$armv81.cold.1 + 36
1  libsystem_malloc.dylib         0x1b0ea50b8 nanov2_find_block_and_allocate$VARIANT$armv81 + 506
2  libsystem_malloc.dylib         0x1b0ea434c nanov2_allocate$VARIANT$armv81 + 124
3  libsystem_malloc.dylib         0x1b0ea4280 nanov2_malloc$VARIANT$armv81 + 60
4  libsystem_malloc.dylib         0x1b0eb16c0 malloc_zone_malloc + 156
5  CoreFoundation                 0x1b1140c0c _CFRuntimeCreateInstance + 616
6  CoreFoundation                 0x1b118ca90 _CFURLCreateWithFileSystemPath + 1872
7  Foundation                     0x1b1495114 -[NSURL(NSURL) initFileURLWithPath:isDirectory:] + 312
8  Foundation                     0x1b1494fd0 +[NSURL(NSURL) fileURLWithPath:isDirectory:] + 44
9  Foundation                     0x1b14bd10c -[NSFileManager _URLForReplacingItemAtURL:error:] + 1208
10 Foundation                     0x1b158f3fc _NSCreateTemporaryFile_Protected + 184
11 Foundation                     0x1b158fa84 _NSWriteDataToFileWithExtendedAttributes + 196
12 Foundation                     0x1b15a8af8 writeStringToURLOrPath + 220
13 appname                         0x1008604bc __26+[GDTCOREvent nextEventID]_block_invoke.9 + 55 (GDTCOREvent.m:55)
14 libdispatch.dylib              0x1b0e87524 _dispatch_client_callout + 16
15 libdispatch.dylib              0x1b0e6b1fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
16 appname                         0x100860254 +[GDTCOREvent nextEventID] + 62 (GDTCOREvent.m:62)
17 appname                         0x100860560 -[GDTCOREvent initWithMappingID:target:] + 73 (GDTCOREvent.m:73)
18 appname                         0x100860b18 -[GDTCOREvent initWithCoder:] + 203 (GDTCOREvent.m:203)
19 Foundation                     0x1b15760a8 _decodeObjectBinary + 2244
20 Foundation                     0x1b14cb198 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 852
21 Foundation                     0x1b1495ab4 -[NSDictionary(NSDictionary) initWithCoder:] + 180
22 Foundation                     0x1b15760a8 _decodeObjectBinary + 2244
23 Foundation                     0x1b1575564 _decodeObject + 340
24 Foundation                     0x1b1486208 -[NSKeyedUnarchiver decodeObjectForKey:] + 152
25 Foundation                     0x1b1486074 -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 352
26 appname                         0x100862fe0 -[GDTCORFlatFileStorage initWithCoder:] + 371 (GDTCORFlatFileStorage.m:371)
27 Foundation                     0x1b15760a8 _decodeObjectBinary + 2244
28 Foundation                     0x1b1575564 _decodeObject + 340
29 Foundation                     0x1b1486208 -[NSKeyedUnarchiver decodeObjectForKey:] + 152
30 Foundation                     0x1b1486074 -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 352
31 Foundation                     0x1b1485cd4 -[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:] + 100
32 Foundation                     0x1b1485c48 -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:] + 108
33 Foundation                     0x1b1484ec8 +[NSKeyedUnarchiver unarchivedObjectOfClasses:fromData:error:] + 128
34 Foundation                     0x1b14cab38 +[NSKeyedUnarchiver unarchivedObjectOfClass:fromData:error:] + 116
35 appname                         0x1008646f4 GDTCORDecodeArchive + 225 (GDTCORPlatform.m:225)
36 appname                         0x100862aa8 __43-[GDTCORFlatFileStorage appWillForeground:]_block_invoke + 303 (GDTCORFlatFileStorage.m:303)
37 libdispatch.dylib              0x1b0e869a8 _dispatch_call_block_and_release + 24
38 libdispatch.dylib              0x1b0e87524 _dispatch_client_callout + 16
39 libdispatch.dylib              0x1b0e64b3c _dispatch_lane_serial_drain$VARIANT$armv81 + 564
40 libdispatch.dylib              0x1b0e6554c _dispatch_lane_invoke$VARIANT$armv81 + 396
41 libdispatch.dylib              0x1b0e6e84c _dispatch_workloop_worker_thread + 580
42 libsystem_pthread.dylib        0x1b0ed8b74 _pthread_wqthread + 272
43 libsystem_pthread.dylib        0x1b0edb740 start_wqthread + 8
com.apple.main-thread
0  libsystem_kernel.dylib         0x1b0fb6b58 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1b0ed506c _pthread_cond_wait$VARIANT$armv81 + 672
2  JavaScriptCore                 0x1c006f974 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 152
3  JavaScriptCore                 0x1c0054940 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1908
4  WebKit                         0x1b86fac1c bool WTF::Condition::waitUntil<std::__1::unique_lock<WTF::Lock> >(std::__1::unique_lock<WTF::Lock>&, WTF::TimeWithDynamicClockType const&) + 164
5  WebKit                         0x1b86faa70 IPC::Connection::waitForMessage(IPC::StringReference, IPC::StringReference, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::WaitForOption>) + 728
6  WebKit                         0x1b89abedc bool IPC::Connection::waitForAndDispatchImmediately<Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree>(unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::WaitForOption>) + 96
7  WebKit                         0x1b89a9bec WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState(unsigned long long) + 116
8  WebKit                         0x1b8949b68 WebKit::WebPageProxy::dispatchActivityStateChange() + 792
9  WebKit                         0x1b86e0098 -[WKApplicationStateTrackingView _applicationWillEnterForeground] + 152
10 WebKit                         0x1b887b19c WebKit::ApplicationStateTracker::applicationWillEnterForeground() + 44
11 WebKit                         0x1b887ad0c invocation function for block in WebKit::ApplicationStateTracker::ApplicationStateTracker(UIView*, objc_selector*, objc_selector*, objc_selector*) + 188
12 Foundation                     0x1b14a3ae0 -[__NSObserver _doit:] + 316
13 CoreFoundation                 0x1b111d590 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
14 CoreFoundation                 0x1b111d5d8 ___CFXRegistrationPost1_block_invoke + 64
15 CoreFoundation                 0x1b111c930 _CFXRegistrationPost1 + 368
16 CoreFoundation                 0x1b111c608 ___CFXNotificationPost_block_invoke + 88
17 CoreFoundation                 0x1b10993a4 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1412
18 CoreFoundation                 0x1b111bf68 _CFXNotificationPost + 1236
19 Foundation                     0x1b147b524 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
20 UIKitCore                      0x1b4a0ee98 -[_UISceneLifecycleMonitor willEnterForeground] + 344
21 UIKitCore                      0x1b4a0ff3c __111-[_UIWindowSceneFBSSceneLifecycleMonitor transitionToTargetState:fromState:withTransitionContext:preparations:]_block_invoke_2.117 + 156
22 UIKitCore                      0x1b4ec0a38 _UIScenePerformActionsWithLifecycleActionMask + 100
23 UIKitCore                      0x1b4a0fd0c __111-[_UIWindowSceneFBSSceneLifecycleMonitor transitionToTargetState:fromState:withTransitionContext:preparations:]_block_invoke.116 + 168
24 UIKitCore                      0x1b4a1523c ___UISceneLifecycleSettingsUpdateBlockWithCanvasAndTransitionContext_block_invoke_2 + 356
25 UIKitCore                      0x1b4a0f764 -[_UIWindowSceneFBSSceneLifecycleMonitor transitionToTargetState:fromState:withTransitionContext:preparations:] + 868
26 UIKitCore                      0x1b4a14f7c ___UISceneLifecycleSettingsUpdateBlockWithCanvasAndTransitionContext_block_invoke + 340
27 UIKitCore                      0x1b4a15aa4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 136
28 UIKitCore                      0x1b4de4dd4 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 812
29 UIKitCore                      0x1b4ed9e7c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
30 UIKitCore                      0x1b4a15834 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 140
31 UIKitCore                      0x1b4ed9d78 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100
32 UIKitCore                      0x1b4a1569c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 376
33 UIKitCore                      0x1b4884f2c __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 636
34 UIKitCore                      0x1b4883acc -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
35 UIKitCore                      0x1b4884c64 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 220
36 UIKitCore                      0x1b4e0a6f4 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
37 FrontBoardServices             0x1b633bc98 -[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:] + 528
38 FrontBoardServices             0x1b6360274 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2 + 120
39 FrontBoardServices             0x1b63457ec -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232
40 FrontBoardServices             0x1b63601a8 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke + 184
41 libdispatch.dylib              0x1b0e87524 _dispatch_client_callout + 16
42 libdispatch.dylib              0x1b0e61808 _dispatch_block_invoke_direct$VARIANT$armv81 + 216
43 FrontBoardServices             0x1b6384440 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
44 FrontBoardServices             0x1b638410c -[FBSSerialQueue _queue_performNextIfPossible] + 404
45 FrontBoardServices             0x1b6384634 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
46 CoreFoundation                 0x1b113fb64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
47 CoreFoundation                 0x1b113fabc __CFRunLoopDoSource0 + 80
48 CoreFoundation                 0x1b113f244 __CFRunLoopDoSources0 + 184
49 CoreFoundation                 0x1b113a274 __CFRunLoopRun + 788
50 CoreFoundation                 0x1b1139c34 CFRunLoopRunSpecific + 424
51 GraphicsServices               0x1bb28338c GSEventRunModal + 160
52 UIKitCore                      0x1b526c22c UIApplicationMain + 1932
53 appname                         0x100707518 main + 226 (main.m:226)
54 libdyld.dylib                  0x1b0fc1800 start + 4



md5-8f7007ac2d92aa1809c5382e0ae939ae



com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1b0f95198 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1b0f9460c mach_msg + 72
2  CoreFoundation                 0x1b113f3b4 __CFRunLoopServiceMachPort + 148
3  CoreFoundation                 0x1b113a3e8 __CFRunLoopRun + 1160
4  CoreFoundation                 0x1b1139c34 CFRunLoopRunSpecific + 424
5  Foundation                     0x1b147cbcc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228
6  Foundation                     0x1b147caac -[NSRunLoop(NSRunLoop) runUntilDate:] + 88
7  UIKitCore                      0x1b530e160 -[UIEventFetcher threadMain] + 152
8  Foundation                     0x1b15ab9d0 __NSThread__start__ + 848
9  libsystem_pthread.dylib        0x1b0ed7d98 _pthread_start + 156
10 libsystem_pthread.dylib        0x1b0edb74c thread_start + 8
GoogleDataTransport

Most helpful comment

@maksymmalyhin

Many thanks for your reply.

The issue is extremely rare, we saw it only once on a iOS 13.4.1 device. I think we should just close the issue unless we see it again. :o)

All 4 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@skuske I'm sorry you have the issue. It looks like the application crashed while trying to allocate memory for an NSURL object that may point out to the application being killed by iOS watchdog (possible due to lack of the device memory). Also, it looks like the main thread of the application was blocked waiting for some WebKit operations to complete. Could you provide the following information that can help understand the nature of the crash:

  1. Does the crash happen mostly on particular devices? (e.g. only on old iPhones)
  2. Does the crash happen on a particular iOS versions? Are there crash free iOS versions?
  3. Do you know what WebKit operations are blocking the main thread? May it also be related to increased memory consumption?

@maksymmalyhin

Many thanks for your reply.

The issue is extremely rare, we saw it only once on a iOS 13.4.1 device. I think we should just close the issue unless we see it again. :o)

Same issue happened for me on iPhone 11 Pro Max running on iOS version 13.5.1

#

Crash Info: malloc: Non-aligned pointer 0x1159f8b50 being freed (2)
Stack Trace:
Crashed: com.google.GDTCOREventIDQueue
0 libsystem_kernel.dylib 0x196c02df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x196b22930 pthread_kill + 228
2 libsystem_c.dylib 0x196ab0ba4 abort + 104
3 libsystem_malloc.dylib 0x196b13fdc _malloc_put + 562
4 libsystem_malloc.dylib 0x196b14268 malloc_zone_error + 104
5 libsystem_malloc.dylib 0x196afb344 szone_free + 480
6 CoreFoundation 0x196db7e90 __CFStringDeallocate + 192
7 CoreFoundation 0x196d99274 _CFRelease + 252
8 CoreFoundation 0x196dbc840 _CFStringCreateWithFormatAndArgumentsAux2 + 228
9 Foundation 0x1970e2e4c -[NSString initWithFormat:] + 60
10 Foundation 0x19711cdb4 -[NSFileManager _URLForReplacingItemAtURL:error:] + 968
11 Foundation 0x1971f7360 _NSCreateTemporaryFile_Protected + 188
12 Foundation 0x1971f79f4 _NSWriteDataToFileWithExtendedAttributes + 200
13 Foundation 0x197211c30 writeStringToURLOrPath + 224
14 Elsie 0x104cf67e8 __26+[GDTCOREvent nextEventID]_block_invoke.9 + 55 (GDTCOREvent.m:55)
15 libdispatch.dylib 0x196abc33c _dispatch_client_callout + 20
16 libdispatch.dylib 0x196ac91f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
17 Elsie 0x104cf6580 +[GDTCOREvent nextEventID] + 62 (GDTCOREvent.m:62)
18 Elsie 0x104cf688c -[GDTCOREvent initWithMappingID:target:] + 73 (GDTCOREvent.m:73)
19 Elsie 0x104cf6e44 -[GDTCOREvent initWithCoder:] + 203 (GDTCOREvent.m:203)
20 Foundation 0x1971dd1fc _decodeObjectBinary + 2248
21 Foundation 0x19712b6f0 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 868
22 Foundation 0x19710257c -[NSSet(NSSet) initWithCoder:] + 176
23 Foundation 0x1971dd1fc _decodeObjectBinary + 2248
24 Foundation 0x1971dc69c _decodeObject + 344
25 Foundation 0x1970e4684 -[NSKeyedUnarchiver decodeObjectForKey:] + 156
26 Foundation 0x1970e44e8 -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 356
27 Elsie 0x104d01b88 -[GDTCCTPrioritizer initWithCoder:] + 326 (GDTCCTPrioritizer.m:326)
28 Foundation 0x1971dd1fc _decodeObjectBinary + 2248
29 Foundation 0x1971dc69c _decodeObject + 344
30 Foundation 0x1970e4684 -[NSKeyedUnarchiver decodeObjectForKey:] + 156
31 Foundation 0x1970e44e8 -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 356
32 Foundation 0x1970e4144 -[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:] + 108
33 Foundation 0x1970e40b0 -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:] + 124
34 Foundation 0x1970e3310 +[NSKeyedUnarchiver unarchivedObjectOfClasses:fromData:error:] + 132
35 Foundation 0x19712b070 +[NSKeyedUnarchiver unarchivedObjectOfClass:fromData:error:] + 120
36 Elsie 0x104cfaa6c GDTCORDecodeArchive + 225 (GDTCORPlatform.m:225)
37 Elsie 0x104d01d78 __39-[GDTCCTPrioritizer appWillForeground:]_block_invoke + 364 (GDTCCTPrioritizer.m:364)
38 libdispatch.dylib 0x196abaec4 _dispatch_call_block_and_release + 32
39 libdispatch.dylib 0x196abc33c _dispatch_client_callout + 20
40 libdispatch.dylib 0x196ac285c _dispatch_lane_serial_drain + 568
41 libdispatch.dylib 0x196ac3290 _dispatch_lane_invoke + 400
42 libdispatch.dylib 0x196acc928 _dispatch_workloop_worker_thread + 584
43 libsystem_pthread.dylib 0x196b23714 _pthread_wqthread + 276
44 libsystem_pthread.dylib 0x196b299c8 start_wqthread + 8

#

Here are my cocoa pods version for Firebase:
Using Firebase (6.26.0)
Using FirebaseABTesting (3.2.0)
Using FirebaseAnalytics (6.6.0)
Using FirebaseAnalyticsInterop (1.5.0)
Using FirebaseCore (6.7.2)
Using FirebaseCoreDiagnostics (1.3.0)
Using FirebaseCoreDiagnosticsInterop (1.2.0)
Using FirebaseCrashlytics (4.1.1)
Using FirebaseInstallations (1.3.0)
Using FirebaseInstanceID (4.3.4)
Using FirebaseMessaging (4.4.1)
Using FirebasePerformance (3.1.11)
Using FirebaseRemoteConfig (4.5.0)
Using GTMSessionFetcher (1.4.0)
Using GoogleAppMeasurement (6.6.0)
Using GoogleDataTransport (6.2.1)
Using GoogleDataTransportCCTSupport (3.1.0)
Using GoogleToolboxForMac (2.2.2)
Using GoogleUtilities (6.6.0)

Was this page helpful?
0 / 5 - 0 ratings