firebase-ios-sdk: GULNetworkURLSession crash
Environment
Xcode version: 10.2 Firebase/Google Pod Instal log:
Using Firebase (6.2.0)
Using FirebaseABTesting (3.0.0)
Using FirebaseAnalytics (6.0.1)
Using FirebaseAnalyticsInterop (1.2.0)
Using FirebaseCore (6.0.2)
Using FirebaseDynamicLinks (4.0.0)
Using FirebaseInstanceID (4.1.1)
Using FirebaseMLCommon (0.16.0)
Using FirebaseMLVision (0.16.0)
Using FirebaseMLVisionBarcodeModel (0.16.0)
Using FirebasePerformance (3.0.0)
Using FirebaseRemoteConfig (4.0.0)
Using GTMSessionFetcher (1.2.2)
Using GoogleAPIClientForREST (1.3.9)
Using GoogleAnalytics (3.17.0)
Using GoogleAppMeasurement (6.0.1)
Using GoogleMobileVision (1.6.0)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleTagManager (7.1.2)
Using GoogleToolboxForMac (2.2.1)
Using GoogleUtilities (6.2.0)
Using GoogleUtilitiesLegacy (1.3.2)
Problem
App crashes in GULNetworkURLSession, line 172. Code:
Steps to reproduce
We cannot reproduce it but about 8k users are affected.
Crash log from Firebase Crashlytics:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x181a75d04 __exceptionPreprocess
1 libobjc.A.dylib 0x180cc4528 objc_exception_throw
2 CoreFoundation 0x181a831c8 __methodDescriptionForSelector
3 CoreFoundation 0x181a7b6b0 ___forwarding___
4 CoreFoundation 0x18196101c _CF_forwarding_prep_0
5 libobjc.A.dylib 0x180cc543c CALLING_SOME_+initialize_METHOD
6 libobjc.A.dylib 0x180cc5804 _class_initialize
7 libobjc.A.dylib 0x180ce0c34 objc_loadWeakRetained
8 libobjc.A.dylib 0x180ce0d3c objc_loadWeak
9 Foundation 0x18239daa4 readARCWeakAt
10 Foundation 0x1823854dc -[NSConcreteMapTable grow]
11 Foundation 0x182365bc0 -[NSConcreteMapTable setObject:forKey:]
12 GoogleUtilities 0x101fa199c +[GULNetworkURLSession setSessionInFetcherMap:forSessionID:] (GULNetworkURLSession.m:699)
13 GoogleUtilities 0x101f9f688 -[GULNetworkURLSession sessionIDFromAsyncPOSTRequest:completionHandler:] (GULNetworkURLSession.m:172)
14 GoogleUtilities 0x101f9d744 -[GULNetwork postURL:payload:queue:usingBackgroundSession:completionHandler:] (GULNetwork.m:143)
15 XXXXX 0x10418a668 -[FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:]
16 XXXXX 0x10418a8d0 __65-[FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:]_block_invoke
17 libdispatch.dylib 0x1813f9088 _dispatch_call_block_and_release
18 libdispatch.dylib 0x1813f9048 _dispatch_client_callout
19 libdispatch.dylib 0x181406378 _dispatch_root_queue_drain
20 libdispatch.dylib 0x181405f10 _dispatch_worker_thread3
21 libsystem_pthread.dylib 0x18169f120 _pthread_wqthread
22 libsystem_pthread.dylib 0x18169ec20 start_wqthread
TagManagerContainerQueue
0 JavaScriptCore 0x1ba9b1160 Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController(JSC::JSGlobalObject&) + 906
1 JavaScriptCore 0x1bac53af8 JSC::JSGlobalObject::init(JSC::VM&) + 268
2 JavaScriptCore 0x1bac6b3c4 JSC::JSGlobalObject::finishCreation(JSC::VM&) + 104
3 JavaScriptCore 0x1bac6b320 JSC::JSGlobalObject::create(JSC::VM&, JSC::Structure*) + 160
4 JavaScriptCore 0x1ba4e93f4 JSGlobalContextCreateInGroup + 316
5 JavaScriptCore 0x1ba2a05e8 -[JSContext initWithVirtualMachine:] + 108
6 VinID 0x100eb2728 -[TAGRuntime initWithContainerId:resource:hitStore:dispatchScheduler:] + 4311426856
7 VinID 0x100ea8d38 __55-[TAGContainer handleLoadOfContainerData:errorMessage:]_block_invoke + 4311387448
8 libdispatch.dylib 0x1b2bd0a38 _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x1b2bd17d4 _dispatch_client_callout + 16
10 libdispatch.dylib 0x1b2b7a320 _dispatch_lane_serial_drain$VARIANT$mp + 592
11 libdispatch.dylib 0x1b2b7ae3c _dispatch_lane_invoke$VARIANT$mp + 428
12 libdispatch.dylib 0x1b2b834a8 _dispatch_workloop_worker_thread + 596
13 libsystem_pthread.dylib 0x1b2db1114 _pthread_wqthread + 304
14 libsystem_pthread.dylib 0x1b2db3cd4 start_wqthread + 4
GULMutableDictionary
0 libsystem_kernel.dylib 0x1b2d2e9d4 __ulock_wait + 8
1 libsystem_platform.dylib 0x1b2d9f348 _os_unfair_lock_lock_slow + 220
2 libobjc.A.dylib 0x1b2384604 objc_destroyWeak + 144
3 libobjc.A.dylib 0x1b236a7cc object_cxxDestructFromClass(objc_object*, objc_class*) + 148
4 libobjc.A.dylib 0x1b237a6b8 objc_destructInstance + 68
5 libobjc.A.dylib 0x1b237a720 object_dispose + 16
6 GoogleUtilities 0x1018aec4c -[GULObjectSwizzler dealloc] (GULObjectSwizzler.m:155)
7 libobjc.A.dylib 0x1b2380754 _object_remove_assocations + 468
8 libobjc.A.dylib 0x1b237a6d4 objc_destructInstance + 96
9 libobjc.A.dylib 0x1b237a720 object_dispose + 16
10 libdispatch.dylib 0x1b2bd0a38 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x1b2bd17d4 _dispatch_client_callout + 16
12 libdispatch.dylib 0x1b2b7a320 _dispatch_lane_serial_drain$VARIANT$mp + 592
13 libdispatch.dylib 0x1b2b7ae3c _dispatch_lane_invoke$VARIANT$mp + 428
14 libdispatch.dylib 0x1b2b834a8 _dispatch_workloop_worker_thread + 596
15 libsystem_pthread.dylib 0x1b2db1114 _pthread_wqthread + 304
16 libsystem_pthread.dylib 0x1b2db3cd4 start_wqthread + 4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 19 (10 by maintainers)
The issue should not be reproducible after #3322, but I’ll keep the issue open until #3300 landed.
The changes from #3322 are available at GoogleUtilities 6.2.2 that has been published recently. @HyunjoonKo @dangthaison91 would you have chance to test the issue from your side and confirm if the change fixes the crash?
@maksymmalyhin Fortunately we temporary remove
Firebase Performancefor another reason from 2 release versions ago. Your assumption may be true as the crash goes away completely.We will wait for the fix to add
Firebase Performanceagain.@HyunjoonKo Thanks for your very helpful info.
Yes, They are some of call-stacks of other threads at the time it crashs @maksymmalyhin