CarthageI've been experiencing some intermittent crashes when running my app's tests. The crash dump points to:
Crashed Thread: 11 Dispatch queue: com.apple.dt.xctest.xctwaiter
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
...
Thread 11 Crashed:: Dispatch queue: com.apple.dt.xctest.xctwaiter
0 libsystem_kernel.dylib 0x00007fff51af733a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff51ba1e60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff51a868f6 __abort + 139
3 libsystem_c.dylib 0x00007fff51a8686b abort + 135
4 com.apple.dt.XCTest 0x000000011a3c9360 +[XCTWaiter handleStalledWaiter:] + 224
Whenever this happens, I see two other threads stuck in a wait state inside +[FPRRemoteConfigFlags sharedInstance] (or somewhere deeper in the stack), such as:
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff51af255e __ulock_wait + 10
1 libdispatch.dylib 0x00007fff5197a0cc _dlock_wait + 44
2 libdispatch.dylib 0x00007fff5197a04b _dispatch_once_wait + 80
3 redacted 0x0000000111ab5201 +[FPRRemoteConfigFlags sharedInstance] + 45
4 redacted 0x0000000111aa49e0 -[FPRConfigurations setupRemoteConfigFlags] + 140
5 redacted 0x0000000111aa491b -[FPRConfigurations update] + 71
6 com.apple.CoreFoundation 0x00007fff23d68d0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 com.apple.CoreFoundation 0x00007fff23d68185 _CFXRegistrationPost1 + 421
8 com.apple.CoreFoundation 0x00007fff23d67ef1 ___CFXNotificationPost_block_invoke + 193
9 com.apple.CoreFoundation 0x00007fff23e652d3 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1795
10 com.apple.CoreFoundation 0x00007fff23d67846 _CFXNotificationPost + 950
11 com.apple.Foundation 0x00007fff2590de2b -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
...
Thread 6:: Dispatch queue: com.google.perf.FPREventsQueue
0 libsystem_kernel.dylib 0x00007fff51af3882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff51ba2425 _pthread_cond_wait + 698
2 com.apple.Foundation 0x00007fff25913646 -[NSOperation waitUntilFinished] + 706
3 com.apple.Foundation 0x00007fff2590d65d -[__NSObserver _doit:] + 232
4 com.apple.CoreFoundation 0x00007fff23d68d0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
5 com.apple.CoreFoundation 0x00007fff23d68185 _CFXRegistrationPost1 + 421
6 com.apple.CoreFoundation 0x00007fff23d67ef1 ___CFXNotificationPost_block_invoke + 193
7 com.apple.CoreFoundation 0x00007fff23e652d3 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1795
8 com.apple.CoreFoundation 0x00007fff23d67846 _CFXNotificationPost + 950
9 com.apple.Foundation 0x00007fff2590de2b -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
10 redacted 0x0000000111af511c -[RCNUserDefaultsManager resetInstanceUserDefaults] + 210
11 redacted 0x0000000111af05ee -[RCNConfigSettings initWithDatabaseManager:namespace:firebaseAppName:googleAppID:] + 682
12 redacted 0x0000000111ae3282 -[FIRRemoteConfig initWithAppName:FIROptions:namespace:DBManager:configContent:analytics:] + 331
13 redacted 0x0000000111ae677c -[FIRRemoteConfigComponent remoteConfigForNamespace:] + 771
14 redacted 0x0000000111ae3006 +[FIRRemoteConfig remoteConfigWithFIRNamespace:app:] + 133
15 redacted 0x0000000111ab5250 __38+[FPRRemoteConfigFlags sharedInstance]_block_invoke + 76
16 libdispatch.dylib 0x00007fff519798cb _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff5197ab02 _dispatch_once_callout + 20
18 redacted 0x0000000111ab5201 +[FPRRemoteConfigFlags sharedInstance] + 45
19 redacted 0x0000000111aa49e0 -[FPRConfigurations setupRemoteConfigFlags] + 140
20 redacted 0x0000000111aa491b -[FPRConfigurations update] + 71
21 redacted 0x0000000111aa2e7b __42-[FPRClient startWithConfiguration:error:]_block_invoke + 140
...
This happens intermittently when running tests in Jenkins CI builds. CI nodes are running Mac OS X 10.15.5 (19F101). I haven't seen it on my local machine, nor when running the app normally.
The failing test targets use the main app as a host so we can take UI snapshots. Unit tests without the host app appear unaffected. It seems to happen much more frequently since I updated from Fabric Crashlytics to Firebase Crashlytics; maybe that's affecting the timing somehow?
I'd appreciate any help/workarounds or a bug fix. Thanks!
Hello @mike-kerley, thank you for reporting this issue and providing us with the snippets and environment details!
While we work on investigating and narrowing down a root cause, it would be helpful to know what iOS version you're seeing this issue occur within. If you're able to provide this information, please do so -- otherwise we'll continue investigating without it.
Thanks again
Sure - it was with iOS 13.4. Thanks for looking into it!
Great, thank you!
note: this issue is being tracked internally at b/165809929
Just an update, we found the race condition that caused the issue. Will fix it soon.
This issue is fixed and will be released in the upcoming release.
Closing. Please watch the Firebase 7 Milestone to track availability.