Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf crash on 32-bit devices in PHTFlatFilePhenotype and Firestore (leveldb) #3851

Closed
fangyuxi opened this issue Sep 14, 2019 · 95 comments
Closed

Comments

@fangyuxi
Copy link

fangyuxi commented Sep 14, 2019

I'm using firebase 6.8.1
When new App is released at Appstore, I found more crashs appear in firebase dashboard. I do not use ProtoBuf directly
I updated all Pods, before upload package to Appstore. All componets are newest.

Crashed: PHTFlatFilePhenotype
0  Protobuf                       0x160efd8 GPBCodedInputStreamReadDouble + 88 (GPBUtilities_PackagePrivate.h:88)
1  Protobuf                       0x160efd1 GPBCodedInputStreamReadDouble + 103 (GPBCodedInputStream.m:103)
2  Protobuf                       0x1639fd1 -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 2143 (GPBMessage.m:2143)
3  Protobuf                       0x160f9c5 -[GPBCodedInputStream readMessage:extensionRegistry:] + 296 (GPBCodedInputStream.m:296)
4  Protobuf                       0x163a47f MergeRepeatedNotPackedFieldFromCodedInputStream + 2294 (GPBMessage.m:2294)
5  Protobuf                       0x1639f6b -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 2393 (GPBMessage.m:2393)
6  Protobuf                       0x160f9c5 -[GPBCodedInputStream readMessage:extensionRegistry:] + 296 (GPBCodedInputStream.m:296)
7  Protobuf                       0x163a47f MergeRepeatedNotPackedFieldFromCodedInputStream + 2294 (GPBMessage.m:2294)
8  Protobuf                       0x1639f6b -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 2393 (GPBMessage.m:2393)
9  Protobuf                       0x160f9c5 -[GPBCodedInputStream readMessage:extensionRegistry:] + 296 (GPBCodedInputStream.m:296)
10 Protobuf                       0x163a47f MergeRepeatedNotPackedFieldFromCodedInputStream + 2294 (GPBMessage.m:2294)
11 Protobuf                       0x1639f6b -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 2393 (GPBMessage.m:2393)
12 Protobuf                       0x1639647 -[GPBMessage mergeFromData:extensionRegistry:] + 1928 (GPBMessage.m:1928)
13 Protobuf                       0x1636d55 -[GPBMessage initWithData:extensionRegistry:error:] + 868 (GPBMessage.m:868)
14 Protobuf                       0x163971b +[GPBMessage parseFromData:extensionRegistry:error:] + 1957 (GPBMessage.m:1957)
15 Protobuf                       0x16396e5 +[GPBMessage parseFromData:error:] + 1951 (GPBMessage.m:1951)
16 SparkMusic                     0x526773 __69-[PHTHeterodyneSyncer syncAccount:syncedScopes:fetchReason:callback:]_block_invoke_2 + 4831091
17 libdispatch.dylib              0x1b461797 _dispatch_call_block_and_release + 10
18 libdispatch.dylib              0x1b46e59d _dispatch_queue_serial_drain + 854
19 libdispatch.dylib              0x1b464b71 _dispatch_queue_invoke + 886
20 libdispatch.dylib              0x1b46ea1f _dispatch_queue_override_invoke + 282
21 libdispatch.dylib              0x1b4701b5 _dispatch_root_queue_drain + 326
22 libdispatch.dylib              0x1b47000f _dispatch_worker_thread3 + 106
23 libsystem_pthread.dylib        0x1b61687d _pthread_wqthread + 1040
24 libsystem_pthread.dylib        0x1b61645c start_wqthread + 8

This is the details of the App that has Crash.

-Xcode Version 10.2.1 
-Base SDK iOS 12.2
-Crash iOS Version iOS9, iOS10 only.

The pod install info.

Installing AFNetworking (3.2.1)
Installing BoringSSL-GRPC (0.0.3)
Installing CYLTabBarController (1.28.3)
Installing Crashlytics (3.14.0)
Installing DeviceUtil (5.1.0)
Installing FBAudienceNetwork (5.5.0)
Installing FBSDKCoreKit (5.5.0)
Installing FBSDKLoginKit (5.5.0)
Installing Fabric (1.10.2)
Installing Firebase (6.8.1)
Installing FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.2.3)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.2.3)
Installing FirebaseCoreDiagnostics (1.0.1)
Installing FirebaseCoreDiagnosticsInterop (1.0.0)
Installing FirebaseDatabase (6.1.0)
Installing FirebaseFirestore (1.5.0)
Installing FirebaseInstanceID (4.2.5)
Installing FirebaseMessaging (4.1.4)
Installing FirebasePerformance (3.1.4)
Installing FirebaseRemoteConfig (4.4.0)
Installing FirebaseStorage (3.4.1)
Installing FirebaseUI (8.0.4)
Installing GTMSessionFetcher (1.2.2)
Installing Google-Mobile-Ads-SDK (7.49.0)
Installing GoogleAppMeasurement (6.1.1)
Installing GoogleDataTransport (1.2.0)
Installing GoogleDataTransportCCTSupport (1.0.3)
Installing GoogleMobileAdsMediationFacebook (5.5.0.0)
Installing GoogleSignIn (4.4.0)
Installing GoogleToolboxForMac (2.2.1)
Installing GoogleUtilities (6.2.5)
Installing IQKeyboardManager (6.4.2)
Installing KVOController (1.2.0)
Installing LEEAlert (1.2.8)
Installing MJRefresh (3.2.0)
Installing MOBFoundation (3.2.5)
Installing Masonry (1.1.0)
Installing NMEasyTipView (1.2)
Installing Protobuf (3.9.0)
Installing RTRootNavigationController (0.7.1)
Installing Reachability (3.2)
Installing ReactiveCocoa (2.5)
Installing SDWebImage (5.1.1)
Installing SJBaseVideoPlayer (2.7.1)
Installing SJUIKit (0.0.0.35)
Installing SVProgressHUD (2.2.5)
Installing TOWebViewController (2.2.8)
Installing TTGTagCollectionView (1.11.1)
Installing YYCache (1.0.4)
Installing YYCategories (1.0.4)
Installing YYModel (1.0.4)
Installing gRPC-C++ (0.0.9)
Installing gRPC-Core (1.21.0)
Installing leveldb-library (1.22)
Installing lottie-ios (2.5.3)
Installing mob_sharesdk (4.3.2)
Installing nanopb (0.3.901)
Installing youtube-ios-player-helper (0.1.6)
@google-oss-bot

This comment has been minimized.

@paulb777
Copy link
Member

Please share the Podfile and Podfile.lock. Also, any other patterns in where the crashes occur like iOS versions, etc.

@neilmorton
Copy link

neilmorton commented Sep 14, 2019

I am seeing the same crash on 2 apps.

@paulb777 The crashes I am seeing appear to be from iOS 9 and iOS 10 only on both apps.
Also, these builds were compiled with the Xcode 11 GM Seed.

@fangyuxi what version of Xcode did you compile the build with? (Just wondering if other users haven’t spotted this yet, or if it is an issue compiling against the Xcode 11 GM seed?)

@fangyuxi
Copy link
Author

@neilmorton The Xcode version is 10.3. Not Xcode 11 GM.
Now, this problem has caused a lot of Crash.
(Just wondering if other users haven’t spotted this yet)

@paulb777 The specific compilation environment and podfile or podfile lock will be available to you tomorrow.

@neilmorton
Copy link

@fangyuxi That’s interesting about the Xcode version.
Can you see what versions of iOS are affected for you? Are you seeing it limited to iOS 9 and 10?

@fangyuxi
Copy link
Author

@neilmorton Yes iOS 9 and iOS 10 Only

@fangyuxi
Copy link
Author

@neilmorton Now I am concerned about whether this Crash will cause iOS 9 and iOS 10 users to not use the App properly(I don't have an iPhone for iOS9 or iOS 10 to test.). If the user only occasionally encounters this Crash, then we still have time to fix it.

@neilmorton
Copy link

@fangyuxi ok. I was limiting Firebase to 6.5.0 before my latest build due to a previous issue. I thought that was fixed, but seems there is now a new issue.
I am going to limit the pod file back to 6.5.0 and resubmit whilst this gets figured out.

@neilmorton
Copy link

@fangyuxi Looking at the data in Fabric I am sufficiently concerned by the number of iOS 9 / 10 users affected that I am reverting to the Firebase build that I had limited to due to the past issues.

Podfile update:
pod 'Firebase/Core', '~> 6.5.0'

@fangyuxi
Copy link
Author

@neilmorton Please check to see if these versions are stable? Thank you very much !

Installing AFNetworking (3.2.1)
Installing AppLovinSDK (6.8.0)
Installing BoringSSL-GRPC (0.0.3)
Installing CYLTabBarController (1.28.3)
Installing Crashlytics (3.14.0)
Installing DeviceUtil (5.1.0)
Installing FBAudienceNetwork (5.5.0)
Installing FBSDKCoreKit (5.6.0)
Installing FBSDKLoginKit (5.6.0)
Installing Fabric (1.10.2)
Installing Firebase (6.5.0)
Installing FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics (6.0.4)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.2.1)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.1.0)
Installing FirebaseDatabase (6.0.0)
Installing FirebaseFirestore (1.4.2)
Installing FirebaseInstanceID (4.2.5)
Installing FirebaseMessaging (4.1.1)
Installing FirebasePerformance (3.1.1)
Installing FirebaseRemoteConfig (4.2.1)
Installing FirebaseStorage (3.4.1)
Installing FirebaseUI (8.0.4)
Installing Flurry-iOS-SDK (9.3.1)
Installing GTMSessionFetcher (1.2.2)
Installing Google-Mobile-Ads-SDK (7.49.0)
Installing GoogleAppMeasurement (6.0.4)
Installing GoogleMobileAdsMediationAppLovin (6.8.0.0)
Installing GoogleMobileAdsMediationFacebook (5.5.0.0)
Installing GoogleMobileAdsMediationInMobi (7.3.2.0)
Installing GoogleMobileAdsMediationMoPub (5.7.1.0)
Installing GoogleSignIn (4.4.0)
Installing GoogleToolboxForMac (2.2.1)
Installing GoogleUtilities (6.2.5)
Installing IQKeyboardManager (6.4.2)
Installing InMobiSDK (7.3.2)
Installing KVOController (1.2.0)
Installing LEEAlert (1.2.8)
Installing MJRefresh (3.2.0)
Installing MOBFoundation (3.2.5)
Installing Masonry (1.1.0)
Installing NMEasyTipView (1.2)
Installing Protobuf (3.9.0)
Installing RTRootNavigationController (0.6.7)
Installing Reachability (3.2)
Installing ReactiveCocoa (2.5)
Installing SDWebImage (5.1.1)
Installing SJBaseVideoPlayer (2.7.1)
Installing SJUIKit (0.0.0.35)
Installing SVProgressHUD (2.2.5)
Installing TOWebViewController (2.2.8)
Installing TTGTagCollectionView (1.11.1)
Installing YYCache (1.0.4)
Installing YYCategories (1.0.4)
Installing YYModel (1.0.4)
Installing gRPC-C++ (0.0.9)
Installing gRPC-Core (1.21.0)
Installing leveldb-library (1.22)
Installing lottie-ios (2.5.3)
Installing mob_sharesdk (4.3.2)
Installing mopub-ios-sdk (5.7.1)
Installing nanopb (0.3.901)

@neilmorton
Copy link

@fangyuxi
I am not sure what you want me to check, but what I can say is that the current config (with the issue) is:

Installing Firebase 6.8.1 (was 6.5.0)
Installing FirebaseABTesting 3.1.1 (was 3.1.0)
Installing FirebaseAnalytics 6.1.1 (was 6.0.4)
Using FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseCore 6.2.3 (was 6.1.0)
Installing FirebaseCoreDiagnostics (1.0.1)
Installing FirebaseCoreDiagnosticsInterop (1.0.0)
Installing FirebaseInstanceID 4.2.5 (was 4.2.3)
Installing FirebasePerformance 3.1.4 (was 3.1.1)
Installing FirebaseRemoteConfig 4.4.0 (was 4.2.1)
Using GTMSessionFetcher (1.2.2)
Installing GoogleAppMeasurement 6.1.1 (was 6.0.4)
Installing GoogleDataTransport (1.2.0)
Installing GoogleDataTransportCCTSupport (1.0.3)
Using GoogleToolboxForMac (2.2.1)
Using GoogleUtilities (6.2.5)
Using Protobuf (3.9.0)
Using nanopb (0.3.901)

I have now locked Firebase back to 6.5.0 (reverted to what I was running previously):

Installing Firebase 6.5.0 (was 6.8.1)
Using FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics 6.0.4 (was 6.1.1)
Using FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseCore 6.1.0 (was 6.2.3)
Using FirebaseInstanceID (4.2.5)
Installing FirebasePerformance 3.1.1 (was 3.1.4)
Installing FirebaseRemoteConfig 4.2.1 (was 4.4.0)
Using GTMSessionFetcher (1.2.2)
Installing GoogleAppMeasurement 6.0.4 (was 6.1.1)
Using GoogleToolboxForMac (2.2.1)
Using GoogleUtilities (6.2.5)
Using Protobuf (3.9.0)
Using nanopb (0.3.901)
Removing FirebaseCoreDiagnostics
Removing FirebaseCoreDiagnosticsInterop
Removing GoogleDataTransport
Removing GoogleDataTransportCCTSupport

I have done this as there wasn't an issue previously and I want the iOS 9 and iOS 10 users back up and running.

Looking at your information, it seems that you have Installing FirebaseCore (6.1.0) shown.

Have you added the pod 'Firebase/Core', '~> 6.5.0' to your Podfile instead of the default and run pod update to get to this config? If so, then looking at the associated versions, then this looks to match with mine.

I hope this helps.

@fangyuxi
Copy link
Author

@neilmorton OK Thank you.

@paulb777
Copy link
Member

I believe that the backtrace shown would only come from FirebasePerformance. Would you confirm if removing FirebasePerformance makes the crash stop occurring?

@fangyuxi
Copy link
Author

@paulb777

It seems that this Crash only come from FirebasePerformance, but now I am ready to roll back the version to 6.7.0. Because there are too many users showing this Crash.I guess that after removing FirebasePerformance, the Crash should not appear, but updating the app version takes time, affects many users, so dare not try to remove FirebasePerformance.

Thank you.

Also, if this is configured(pod 'Firebase/Core', '~> 6.7.0'), will all the dependent Pods roll back to 6.7.0?

Installing Fabric (1.10.2)
Installing Firebase (6.7.0)
Installing FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.2.3)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.2.1)
Installing FirebaseCoreDiagnostics (1.0.1)
Installing FirebaseCoreDiagnosticsInterop (1.0.0)
Installing FirebaseDatabase (6.1.0)
Installing FirebaseFirestore (1.4.5)
Installing FirebaseInstanceID (4.2.5)
Installing FirebaseMessaging (4.1.4)
Installing FirebasePerformance (3.1.2)
Installing FirebaseRemoteConfig (4.3.0)
Installing FirebaseStorage (3.4.1)
Installing FirebaseUI (8.0.4)
Installing Flurry-iOS-SDK (9.3.1)
Installing GTMSessionFetcher (1.2.2)
Installing Google-Mobile-Ads-SDK (7.49.0)
Installing GoogleAppMeasurement (6.1.1)
Installing GoogleDataTransport (1.2.0)
Installing GoogleDataTransportCCTSupport (1.0.4)
Installing GoogleMobileAdsMediationAppLovin (6.8.0.0)
Installing GoogleMobileAdsMediationFacebook (5.5.0.0)
Installing GoogleMobileAdsMediationInMobi (7.3.2.0)
Installing GoogleMobileAdsMediationMoPub (5.7.1.0)
Installing GoogleSignIn (4.4.0)
Installing GoogleToolboxForMac (2.2.1)
Installing GoogleUtilities (6.2.5)

Thank you again.

@neilmorton
Copy link

@neilmorton OK Thank you.

You are welcome @fangyuxi

@neilmorton
Copy link

I believe that the backtrace shown would only come from FirebasePerformance. Would you confirm if removing FirebasePerformance makes the crash stop occurring?

@paulb777 Unfortunately I am in the same position as @fangyuxi. I had issues after moving up past 6.5.0 previously in that I was seeing a raft of GDTUploadCoordinator.m crashes. At that point there was a comment from yourself that suggested reverting to 6.5.0 #3547 (comment).

I had just made the decision to lift that version hold with this latest release to now experience this new issue across 4 apps with the latest builds ready for iOS 13.

I don't really want to risk just removing FirebasePerformance in case there is still an issue.

Rather I have, as mentioned above, locked them all back to 6.5.0. In the meantime I shall consider the options!

@neilmorton
Copy link

Also, if this is configured(pod 'Firebase/Core', '~> 6.7.0'), will all the dependent Pods roll back to 6.7.0?

@fangyuxi If you run pod update after making the change in the Podfile, then it should manage the dependencies, yes.

@paulb777
Copy link
Member

If you run pod install, versions of existing pods won't necessarily change.

if you run pod update, versions will update to the latest unless there are version specifications in the Podfile.

pod 'Firebase/Core', '~> 6.7.0' indicates to use the latest Firebase pod at version 6.7.*. The Firebase pod specifies that its dependencies can do patch updates.

Thus if you do a pod update with pod 'Firebase/Core', '~> 6.7.0' you will get `FirebasePerformance 3.1.4 even though 6.7.0 released with 3.1.3.

@fangyuxi It looks like you still have 3.1.2. Please confirm the issue is still occurring with 3.1.4.

@fangyuxi
Copy link
Author

Hi @paulb777

I have obtained the details of this app build binary. Hope to help.

This is the details of the App that has Crash.

-Xcode Version 10.2.1 
-Base SDK iOS 12.2
-Crash iOS Version iOS9, iOS10 only.

The pod install info.

Installing AFNetworking (3.2.1)
Installing BoringSSL-GRPC (0.0.3)
Installing CYLTabBarController (1.28.3)
Installing Crashlytics (3.14.0)
Installing DeviceUtil (5.1.0)
Installing FBAudienceNetwork (5.5.0)
Installing FBSDKCoreKit (5.5.0)
Installing FBSDKLoginKit (5.5.0)
Installing Fabric (1.10.2)
Installing Firebase (6.8.1)
Installing FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.2.3)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.2.3)
Installing FirebaseCoreDiagnostics (1.0.1)
Installing FirebaseCoreDiagnosticsInterop (1.0.0)
Installing FirebaseDatabase (6.1.0)
Installing FirebaseFirestore (1.5.0)
Installing FirebaseInstanceID (4.2.5)
Installing FirebaseMessaging (4.1.4)
Installing FirebasePerformance (3.1.4)
Installing FirebaseRemoteConfig (4.4.0)
Installing FirebaseStorage (3.4.1)
Installing FirebaseUI (8.0.4)
Installing GTMSessionFetcher (1.2.2)
Installing Google-Mobile-Ads-SDK (7.49.0)
Installing GoogleAppMeasurement (6.1.1)
Installing GoogleDataTransport (1.2.0)
Installing GoogleDataTransportCCTSupport (1.0.3)
Installing GoogleMobileAdsMediationFacebook (5.5.0.0)
Installing GoogleSignIn (4.4.0)
Installing GoogleToolboxForMac (2.2.1)
Installing GoogleUtilities (6.2.5)
Installing IQKeyboardManager (6.4.2)
Installing KVOController (1.2.0)
Installing LEEAlert (1.2.8)
Installing MJRefresh (3.2.0)
Installing MOBFoundation (3.2.5)
Installing Masonry (1.1.0)
Installing NMEasyTipView (1.2)
Installing Protobuf (3.9.0)
Installing RTRootNavigationController (0.7.1)
Installing Reachability (3.2)
Installing ReactiveCocoa (2.5)
Installing SDWebImage (5.1.1)
Installing SJBaseVideoPlayer (2.7.1)
Installing SJUIKit (0.0.0.35)
Installing SVProgressHUD (2.2.5)
Installing TOWebViewController (2.2.8)
Installing TTGTagCollectionView (1.11.1)
Installing YYCache (1.0.4)
Installing YYCategories (1.0.4)
Installing YYModel (1.0.4)
Installing gRPC-C++ (0.0.9)
Installing gRPC-Core (1.21.0)
Installing leveldb-library (1.22)
Installing lottie-ios (2.5.3)
Installing mob_sharesdk (4.3.2)
Installing nanopb (0.3.901)
Installing youtube-ios-player-helper (0.1.6)

@bill350
Copy link

bill350 commented Sep 15, 2019

Same issue here :'(

iOS 10 only, Firebase dependencies:

pod 'Firebase/Core', '= 6.8.1'
pod 'Firebase/Analytics', '= 6.8.1'
pod 'Firebase/Performance', '= 6.8.1'

image

@neilmorton
Copy link

@bill350 Is your lowest platform supported iOS 10?

@bill350
Copy link

bill350 commented Sep 15, 2019

@bill350 Is your lowest platform supported iOS 10?

Yes, iOS 10 -> iOS 13

@paulb777
Copy link
Member

Thanks for the additional data about iOS versions.

It seems that this is an issue for iOS 9 and iOS 10. Maybe also iOS 8?

@neilmorton
Copy link

My lowest supported build is iOS 9, and iOS 9 and 10 are affected for me. As you say, it could be for 8 too, but I can’t say, sorry.

@patrickmarshall
Copy link

patrickmarshall commented Sep 16, 2019

Hello,
We are also got same issue here.
We haven't change firebase version since 3 months ago and the problem just start occurred since September 13th.
Is it possible that the problem is from BE side?

pod 'Firebase/Core', '= 6.2.0'
pod 'Firebase/Analytics', '= 6.2.0'
pod 'Firebase/Performance', '= 6.2.0'

My lowest platform support is iOS 10.

@paulb777

@andrew-muzz
Copy link

Hello,
Same issue here but ours is also impacting iOS 11 and 12.
Having said that it's massively skewed towards iOS 10 (67%), not sure about iOS 9.x (we only support 10.2 and above).
Looking at the device range affected it's 70% iPhone 5 series.
These are always aligned so hard to tell if it's the device or the OS making it more likely to happen.

It only started occurring for us when we released custom tracing for the first time on 14th September. It hasn't happened for any other versions, this would seem to indicate something wrong with custom performance tracing. The following are the Firebase versions we're using:

    pod 'Firebase/Analytics', '~> 6.2.0'
    pod 'Firebase/Core', '~> 6.2.0'
    pod 'Firebase/Performance', '~> 6.2.0'
    pod 'Firebase/RemoteConfig', '~> 6.2.0'

We're going to remove custom tracing until we can figure out what this issue is.

thomasvl added a commit to thomasvl/protobuf that referenced this issue Sep 19, 2019
The code in question hasn't change in a long time so the cause of
firebase/firebase-ios-sdk#3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.
@paulb777
Copy link
Member

We're continuing to investigate. The initial proposed Protobuf PR (see above) still causes an alignment exception. The best known workaround is still to use the volatile change documented above.

Also, even though the initial bug report says Xcode 10 was used, we're only able to reproduce with Xcode 11 builds. Is anyone else seeing the issue from an Xcode 10 build?

@neilmorton
Copy link

@paulb777 I saw one instance in an app which was dated around the 8th and was on an Xcode 10 build. But looking now I can't see it in Fabric. So, I think it may have been an anomaly. The rest of mine were with Xcode 11.

@Strate
Copy link

Strate commented Sep 19, 2019

@paulb777 I use xCode 10 right now. Can confirm crash & workaround.

@Nishant-goibibo
Copy link

Yes, we are getting this issue with Xcode 10.2.1 also.

@Nishant-goibibo
Copy link

We are getting same crash on iOS 11 and 12 with 64 Bit Devices.

@simonbengtsson
Copy link

simonbengtsson commented Sep 20, 2019

Our production build that crashes is built with Xcode 10.3. We don't have any builds in production with Xcode 11 yet.

@thomasvl
Copy link
Contributor

We are getting same crash on iOS 11 and 12 with 64 Bit Devices.

@Nishant-goibibo what specific device? I didn't think arm64 had unaligned memory issues. Or are you maybe build 32bit only and running that on arm64?

thomasvl added a commit to protocolbuffers/protobuf that referenced this issue Sep 20, 2019
…6672)

The code in question hasn't change in a long time so the cause of
firebase/firebase-ios-sdk#3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.

Cleanup along the way for #6679
@paulb777
Copy link
Member

The protobuf fix is in progress at protocolbuffers/protobuf#6678

thomasvl added a commit to thomasvl/protobuf that referenced this issue Sep 20, 2019
…rotocolbuffers#6672)

The code in question hasn't change in a long time so the cause of
firebase/firebase-ios-sdk#3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.

Cleanup along the way for protocolbuffers#6679
thomasvl added a commit to thomasvl/protobuf that referenced this issue Sep 20, 2019
…rotocolbuffers#6672)

The code in question hasn't change in a long time so the cause of
firebase/firebase-ios-sdk#3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.

Cleanup along the way for protocolbuffers#6679
@alexanderkhitev
Copy link

hey everyone! when will be update?

@paulb777
Copy link
Member

Protobuf 3.9.2 has now been published to CocoaPods with the fix.

pod update to pick it up.

@paulb777
Copy link
Member

Thanks to everyone who contributed to this thread with backtraces and detailed crash information that helped us track this one down!

@datalogen
Copy link

@paulb777 any timeline for a carthage update including the fix?

@paulb777
Copy link
Member

@datalogen Are you seeing the crash with a Carthage distribution?

@datalogen
Copy link

@paulb777 Yes, we are seeing a similar crash with a Carthage distribution. We have quite a few customers running on older devices - iOS 9 and 10.

Crashed: com.google.firebase.firestore
0 DomainServices 0x102f91c GPBCodedInputStreamReadDouble + 19
1 DomainServices 0x102f915 GPBCodedInputStreamReadDouble + 12
2 DomainServices 0x105b135 -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 9112
3 DomainServices 0x1030315 -[GPBCodedInputStream readMessage:extensionRegistry:] + 1406
4 DomainServices 0x1036e33 ReadValue + 1148
5 DomainServices 0x1036a93 GPBDictionaryReadEntry + 220
6 DomainServices 0x103039d -[GPBCodedInputStream readMapEntry:extensionRegistry:field:parentMessage:] + 1542
7 DomainServices 0x105b0ab -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 8974
8 DomainServices 0x1030315 -[GPBCodedInputStream readMessage:extensionRegistry:] + 1406
9 DomainServices 0x105b2b3 -[GPBMessage mergeFromCodedInputStream:extensionRegistry:] + 9494
10 DomainServices 0x105a7ab -[GPBMessage mergeFromData:extensionRegistry:] + 6670
11 DomainServices 0x1057e99 -[GPBMessage initWithData:extensionRegistry:error:] + 768
12 DomainServices 0x105a87f +[GPBMessage parseFromData:extensionRegistry:error:] + 6882
13 DomainServices 0x105a849 +[GPBMessage parseFromData:error:] + 6828
14 DomainServices 0xcb2669 firebase::firestore::local::LevelDbRemoteDocumentCache::DecodeMaybeDocument(absl::string_view, firebase::firestore::model::DocumentKey const&) + 200
15 DomainServices 0xcb2fcf firebase::firestore::local::LevelDbRemoteDocumentCache::GetMatching(firebase::firestore::core::Query const&) + 370
16 DomainServices 0xcb6e55 firebase::firestore::local::LocalDocumentsView::GetDocumentsMatchingCollectionQuery(firebase::firestore::core::Query const&) + 44
17 DomainServices 0xcb65b1 firebase::firestore::local::LocalDocumentsView::GetDocumentsMatchingQuery(firebase::firestore::core::Query const&) + 56
18 DomainServices 0xc6bd5d -[FSTLocalStore executeQuery:] + 115832
19 DomainServices 0xc8a6ef -[FSTSyncEngine initializeViewAndComputeSnapshotForQueryData:] + 241162
20 DomainServices 0xc89ffd -[FSTSyncEngine listenToQuery:] + 239384
21 DomainServices 0xc1baef firebase::firestore::core::EventManager::AddQueryListener(std::__1::shared_ptrfirebase::firestore::core::QueryListener) + 754
22 DomainServices 0xc44fdd std::__1::__function::__func<firebase::firestore::core::FirestoreClient::ListenToQuery(firebase::firestore::core::Query, firebase::firestore::core::ListenOptions, std::__1::shared_ptr<firebase::firestore::core::EventListenerfirebase::firestore::core::ViewSnapshot >&&)::$_11, std::__1::allocator<firebase::firestore::core::FirestoreClient::ListenToQuery(firebase::firestore::core::Query, firebase::firestore::core::ListenOptions, std::__1::shared_ptr<firebase::firestore::core::EventListenerfirebase::firestore::core::ViewSnapshot >&&)::$_11>, void ()>::operator()() + 21996
23 DomainServices 0xbfa9bd firebase::firestore::util::AsyncQueue::ExecuteBlocking(std::__1::function<void ()> const&) + 112
24 DomainServices 0xc1e3b3 firebase::firestore::util::internal::DispatchAsync(NSObject<OS_dispatch_queue>, std::__1::function<void ()>&&)::$_0::__invoke(void) + 474
25 libdispatch.dylib 0x1dff659d _dispatch_queue_serial_drain + 854
26 libdispatch.dylib 0x1dfecb71 _dispatch_queue_invoke + 886
27 libdispatch.dylib 0x1dff6a1f _dispatch_queue_override_invoke + 282
28 libdispatch.dylib 0x1dff81b5 _dispatch_root_queue_drain + 326
29 libdispatch.dylib 0x1dff800f _dispatch_worker_thread3 + 106
30 libsystem_pthread.dylib 0x1e19e87d _pthread_wqthread + 1040
31 libsystem_pthread.dylib 0x1e19e45c start_wqthread + 8

@datalogen
Copy link

@paulb777 Debug builds are not showing the issue - release builds however are consistently crashing on my 32-bit device running iOS 9.3.5.

@paulb777
Copy link
Member

Thanks @datalogen. The fix will be included in the Firebase 6.9.0 Carthage (and zip) release that is planned to go out early in the week.

@paulb777 paulb777 added this to the 6.9.0 milestone Sep 22, 2019
@patrickmarshall
Copy link

Hello,
We have release our apps since september 27th and the problem doesn't seems to be appear anymore.
We just want to say thanks to @paulb777 @visumickey and other google team that help to fixed this issue.

@firebase firebase locked as resolved and limited conversation to collaborators Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests