Firebase-ios-sdk: FPRNetworkTrace sessions crash

Created on 19 Oct 2020  Â·  7Comments  Â·  Source: firebase/firebase-ios-sdk

Step 1: Describe your environment

  • Xcode version: 12.0.1
  • Firebase SDK version: 6.34.0
  • Firebase Component: Performance
  • Component version: Performance 3.3.1
  • Installation method: CocoaPods

Step 2: Describe the problem

Steps to reproduce:

Crash while using the application

Relevant Code:

From Firebase Crashlytics

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000893a18890
__27-[FPRNetworkTrace sessions]_block_invoke

Crashed: com.google.perf.sessionIds.networkTrace
0  libobjc.A.dylib                0x194a15190 objc_msgSend + 16
1  CARDplus                       0x102b91dfc __27-[FPRNetworkTrace sessions]_block_invoke + 4298382844
2  libdispatch.dylib              0x1949be184 _dispatch_client_callout + 16
3  libdispatch.dylib              0x19497100c _dispatch_sync_invoke_and_complete_recurse + 64
4  libdispatch.dylib              0x194970b1c _dispatch_sync_f_slow + 168
5  CARDplus                       0x102b91d64 -[FPRNetworkTrace sessions] + 4298382692
6  CARDplus                       0x102b9bbb0 FPRGetNetworkRequestMetric + 4298423216
7  CARDplus                       0x102b89890 __29-[FPRClient logNetworkTrace:]_block_invoke + 4298348688
8  libdispatch.dylib              0x1949bd610 _dispatch_call_block_and_release + 24
9  libdispatch.dylib              0x1949be184 _dispatch_client_callout + 16
10 libdispatch.dylib              0x19496a598 _dispatch_lane_serial_drain$VARIANT$mp + 916
11 libdispatch.dylib              0x19496ae58 _dispatch_lane_invoke$VARIANT$mp + 420
12 libdispatch.dylib              0x194974340 _dispatch_workloop_worker_thread + 588
13 libsystem_pthread.dylib        0x194a0dfa4 _pthread_wqthread + 276
14 libsystem_pthread.dylib        0x194a10ae0 start_wqthread + 8
performance needs-attention

Most helpful comment

We removed FirebasePerformance 3.3.1 and the crashes seem to be gone. The latest crash-free version had Xcode 12.0 and FirebasePerformance 3.3.0

All 7 comments

Might be related to #6734. Does going back to 6.33.0 make a difference?

@paulb777 This is not related to #6734 . Quite possible that this crash existed even earlier.

@andr3a88 Can you provide some more details about the crash?

  1. Do you know if this issue was there even earlier or did this start only after the newer version update?
  2. Can you also provide the information about other threads during the crash.
  3. Is this crash happening on a specific version of iOS?
  4. Is this crash happening only on foreground or both foreground/background?

Might be related to #6734. Does going back to 6.33.0 make a difference?

same crash here also if return back to 6.33.0. it's seems random crashes

Screenshot at Oct 20 09-19-22

I have the same problem since updating to 6.34.0 – crashes skyrocketed. Nothing specific, this is the best stack trace i could find

Crashed: com.google.fira.worker
0  libobjc.A.dylib                0x1a1b3b53c objc_msgSend + 28
1  Foundation                     0x1a33994a0 NSKeyValueWillChange + 488
2  Foundation                     0x1a33990f4 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 464
3  Foundation                     0x1a32eb634 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68
4  Foundation                     0x1a3394b44 _NSSetLongLongValueAndNotify + 268
5  CFNetwork                      0x1a2efca8c -[__NSCFURLSessionTask resume] + 104
6  DromAuto                       0x1011e2e94 -[_AFURLSessionTaskSwizzling af_resume] + 430 (AFURLSessionManager.m:430)
7  DromAuto                       0x101544c58 -[GULNetworkURLSession sessionIDFromAsyncPOSTRequest:completionHandler:] + 180 (GULNetworkURLSession.m:180)
8  DromAuto                       0x101542ffc -[GULNetwork postURL:payload:queue:usingBackgroundSession:completionHandler:] + 143 (GULNetwork.m:143)
9  DromAuto                       0x101a7958c -[APMMeasurement uploadData] + 1336900
10 DromAuto                       0x101a7f56c __49-[APMMeasurement handleAppWillResignActiveEvent:]_block_invoke_3 + 1361444
11 DromAuto                       0x101a88428 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 1397984
12 libdispatch.dylib              0x1a2388a38 _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x1a23897d4 _dispatch_client_callout + 16
14 libdispatch.dylib              0x1a2332324 _dispatch_lane_serial_drain$VARIANT$mp + 592
15 libdispatch.dylib              0x1a2332e40 _dispatch_lane_invoke$VARIANT$mp + 428
16 libdispatch.dylib              0x1a233b4ac _dispatch_workloop_worker_thread + 596
17 libsystem_pthread.dylib        0x1a256a114 _pthread_wqthread + 304
18 libsystem_pthread.dylib        0x1a256ccd4 start_wqthread + 4

@visumickey

  • the problem appearead with a new version of our application built with Xcode 12.0.1, in this version we passed from firebase 6.31.1 to 6.34.0
  • Crash happens both with iOS 12,13 and 13
  • Crash happens both foreground and background

The last version was built with Xcode 12.7. We tried new build with Xcode 12.0 and Xcode 12.1 seed crashes continue to happen

We removed FirebasePerformance 3.3.1 and the crashes seem to be gone. The latest crash-free version had Xcode 12.0 and FirebasePerformance 3.3.0

This looks related to KVO and #6734 based on the stacktrace from https://github.com/firebase/firebase-ios-sdk/issues/6768#issuecomment-712651140 and being crash-free with Firebase Performance 3.3.0 (https://github.com/firebase/firebase-ios-sdk/issues/6768#issuecomment-712727254).

We have a fix coming out in a few days https://github.com/firebase/firebase-ios-sdk/issues/6734#issuecomment-713909166 that contains a potential fix.

Duplicate of #6734

Was this page helpful?
0 / 5 - 0 ratings