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

Crash in FIRAIdentity updateIdentifiers #1059

Closed
patpawasantanon opened this issue Apr 10, 2018 · 13 comments
Closed

Crash in FIRAIdentity updateIdentifiers #1059

patpawasantanon opened this issue Apr 10, 2018 · 13 comments
Assignees

Comments

@patpawasantanon
Copy link

patpawasantanon commented Apr 10, 2018

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 9.2
  • Firebase SDK version: 4.8.2
  • Firebase Component: Core, Messaging
  • Component version:
  • Firebase/AdMob (4.8.2):
    • Firebase/Core
    • Google-Mobile-Ads-SDK (= 7.27.0)
    • Firebase/Core (4.8.2):
      • FirebaseAnalytics (= 4.0.9)
      • FirebaseCore (= 4.0.14)
    • Firebase/Messaging (4.8.2):
      • Firebase/Core
      • FirebaseMessaging (= 2.0.8)
    • Firebase/RemoteConfig (4.8.2):
      • Firebase/Core
      • FirebaseRemoteConfig (= 2.1.1)
    • FirebaseABTesting (1.0.0):
      • FirebaseCore (~> 4.0)
      • Protobuf (~> 3.1)
    • FirebaseAnalytics (4.0.9):
      • FirebaseCore (~> 4.0)
      • FirebaseInstanceID (~> 2.0)
      • GoogleToolboxForMac/NSData+zlib (~> 2.1)
      • nanopb (~> 0.3)
    • FirebaseCore (4.0.14):
      • GoogleToolboxForMac/NSData+zlib (~> 2.1)
    • FirebaseInstanceID (2.0.8):
      • FirebaseCore (~> 4.0)
    • FirebaseMessaging (2.0.8):
      • FirebaseAnalytics (~> 4.0)
      • FirebaseCore (~> 4.0)
      • FirebaseInstanceID (~> 2.0)
      • GoogleToolboxForMac/Logger (~> 2.1)
      • Protobuf (~> 3.1)
    • FirebaseRemoteConfig (2.1.1):
      • FirebaseABTesting (~> 1.0)
      • FirebaseAnalytics (~> 4.0)
      • FirebaseCore (~> 4.0)
      • FirebaseInstanceID (~> 2.0)
      • GoogleToolboxForMac/NSData+zlib (~> 2.1)
      • Protobuf (~> 3.1)

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

there is a crashlytics report here http://crashes.to/s/bb80f189760

@morganchen12
Copy link
Contributor

This suggests something weird going on in your app and may not be caused by Firebase, since NSDate timeIntervalSinceNow should definitely not be causing crashes in objc_msgSend.

We won't be able to effectively debug this crash without repro steps.

@morganchen12 morganchen12 self-assigned this Apr 10, 2018
@baolocdo
Copy link

Track internal bug at b/78059673

@petrpavlik
Copy link

I have managed to find someone else reporting this exact stack trace on the Internet, which gives me certain amount of confidence that they may not necessarily be something weird going on with our app https://gist.github.com/plu/8eae8472fa458b8fc52ed032139b4ce8#file-gistfile6-md.

Furthermore, this crash seems to be represented as 4+ different crashes based on fabric and some traces look like this

Crashed: com.google.fira.worker
0  libobjc.A.dylib                0x184f54430 objc_msgSend + 16
1  GetHornet-AppStore             0x1015d2f94 -[FIRAIdentity updateIdentifiers] + 471584
2  GetHornet-AppStore             0x1015d2aa8 -[FIRAIdentity appInstanceID] + 470324
3  GetHornet-AppStore             0x1015dd4e4 -[FIRAMeasurement createRawEventMetadataWithUserAttributes:] + 513904
4  GetHornet-AppStore             0x1015db0cc __43-[FIRAMeasurement writeEventOnWorkerQueue:]_block_invoke.1042 + 504664
5  GetHornet-AppStore             0x1015bc3e8 -[FIRASqliteStore performTransaction:] + 378484
6  GetHornet-AppStore             0x1015d9f24 -[FIRAMeasurement writeEventOnWorkerQueue:] + 500144
7  GetHornet-AppStore             0x1015d981c -[FIRAMeasurement handleEventOnWorkerQueue:] + 498344
8  GetHornet-AppStore             0x1015ebbe8 __52-[FIRAScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 573044
9  libdispatch.dylib              0x185676a54 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x185676a14 _dispatch_client_callout + 16
11 libdispatch.dylib              0x18568096c _dispatch_queue_serial_drain$VARIANT$mp + 528
12 libdispatch.dylib              0x1856812fc _dispatch_queue_invoke$VARIANT$mp + 340
13 libdispatch.dylib              0x185681d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
14 libdispatch.dylib              0x18568a03c _dispatch_workloop_worker_thread$VARIANT$mp + 644
15 libsystem_pthread.dylib        0x18591ef1c _pthread_wqthread + 932
16 libsystem_pthread.dylib        0x18591eb6c start_wqthread + 4

So pointing to NSDate timeIntervalSinceNow may be just an error in the symbolization or something.

I'd suggest looking for something like calling UIKit methods on a background thread, because it looks kind of similar to this other Firebase analytics crash we're seeing http://crashes.to/s/ab0ceee4b0a (will report as a separate issue).

@baolocdo
Copy link

Thanks for more information, @petrpavlik. It could be but from the stack trace and the Fabric link you provided, I think they could be different issues. The crash occurred on different queues. Regarding the UIKit methods, we have determined that it is a bug from Apple but we also have a potential work around for it (see #431).

@morganchen12
Copy link
Contributor

Closing this issue since it's staled and seen no new reports.

@morganchen12
Copy link
Contributor

We've seen some internal reports of this issue from a partner; reopening to investigate.

@CheneyZJ
Copy link

We've seen some internal reports of this issue from a partner; reopening to investigate.

Hi, did you have some clues for this issue.This crash now rank first in our crash list.

@morganchen12
Copy link
Contributor

@CheneyZJ this crash seemingly only appears in older versions of Firebase. Have you tried upgrading?

@CheneyZJ
Copy link

@CheneyZJ this crash seemingly only appears in older versions of Firebase. Have you tried upgrading?

Still facing this crash with lastest version(5.16.0).

@morganchen12
Copy link
Contributor

Can you share a stack trace?

@CheneyZJ
Copy link

#0Crashed: com.google.fira.workerEXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000c8da06f18 Raw Text

0 | libobjc.A.dylib | objc_msgSend + 16
1 | CoreFoundation | -[NSDate timeIntervalSinceNow] + 28
2 | BeautyPlus | -[APMIdentity updateIdentifiers] + 1207032
3 | BeautyPlus | -[APMIdentity resettableDeviceID] + 1205440
4 | BeautyPlus | -[APMIdentity identifierForVendor] + 1206432
5 | BeautyPlus | -[APMMeasurement createRawEventMetadataWithUserAttributes:] + 1256584
6 | BeautyPlus | __42-[APMMeasurement writeEventOnWorkerQueue:]_block_invoke.1150 + 1245104
7 | BeautyPlus | -[APMSqliteStore performTransaction:] + 1399596
8 | BeautyPlus | -[APMMeasurement writeEventOnWorkerQueue:] + 1241020
9 | BeautyPlus | -[APMMeasurement handleEventOnWorkerQueue:] + 1238948
10 | BeautyPlus | -[APMMeasurement reportSessionStartOnWorkerQueueWithTimestamp:] + 1221776
11 | BeautyPlus | -[APMMeasurement reportFirstOpenOnWorkerQueue] + 1223356
12 | BeautyPlus | __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 1219964
13 | libdispatch.dylib | _dispatch_client_callout + 16
14 | libdispatch.dylib | _dispatch_once_callout + 28
15 | BeautyPlus | -[APMMeasurement startMeasurementOnWorkerQueue] + 1217996
16 | BeautyPlus | -[APMMeasurement setEnabledOnWorkerQueue:] + 1216828
17 | BeautyPlus | __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 1318724
18 | libdispatch.dylib | _dispatch_call_block_and_release + 24
19 | libdispatch.dylib | _dispatch_client_callout + 16
20 | libdispatch.dylib | _dispatch_lane_serial_drain$VARIANT$mp + 592
21 | libdispatch.dylib | _dispatch_lane_invoke$VARIANT$mp + 428
22 | libdispatch.dylib | _dispatch_workloop_worker_thread + 596
23 | libsystem_pthread.dylib | _pthread_wqthread + 304
24 | libsystem_pthread.dylib | start_wqthread + 4

@morganchen12 ,Hi, see the log above. Thank you in advance.

@morganchen12
Copy link
Contributor

The crash in -[NSDate timeIntervalSinceNow] isn't indicative of an issue in Analytics. Can you share a sample that reproduces this crash?

@CheneyZJ
Copy link

CheneyZJ commented Apr 21, 2019

The crash in -[NSDate timeIntervalSinceNow] isn't indicative of an issue in Analytics. Can you share a sample that reproduces this crash?

@morganchen12 Hi, thank you for ur reply. we can't reproduce this crash in our end. But we notice that this crash's count of crash session nearly equal to count fo crash user, means a user only suffered once this crash. So, I think it just happened on first app's launch after upgrading app or installing app.. Even though, we just can't reproduces this crash and hope this clue is helpful for investigating. Thank you again.

@firebase firebase locked and limited conversation to collaborators Nov 5, 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

6 participants