Skip to content

Crashed: com.google.fira.worker EXC_BAD_ACCESS KERN_INVALID_ADDRESS #573

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

Closed
kafejo opened this issue Dec 16, 2017 · 7 comments
Closed

Crashed: com.google.fira.worker EXC_BAD_ACCESS KERN_INVALID_ADDRESS #573

kafejo opened this issue Dec 16, 2017 · 7 comments
Assignees

Comments

@kafejo
Copy link

kafejo commented Dec 16, 2017

[READ] Step 1: Are you in the right place?

Yes

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 9.2
  • Firebase SDK version: 4.7.0
  • Firebase Component: Core(4.0.12), DynamicLinks(2.3.0), Analytics(4.0.5), RemoteConfig(2.1.0)

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Users on iOS 9 experience crash every time they update to new version of our app.

Crash on

[FIRInstanceIDKeyPair cachedKeyRefWithTag:] 
Crashed: com.google.fira.worker
0  CoreFoundation                 0x183983ae8 CFDataGetBytePtr + 36
1  Security                       0x183ecc10c SecKeyCreateFromAttributeDictionary + 852
2  Security                       0x183eca350 SecTokenItemCreateFromAttributes + 348
3  Security                       0x183ec9ee0 SecItemResultCopyPrepared + 1432
4  Security                       0x183ec7dec SecItemResultProcess + 252
5  Security                       0x183ec8184 __SecItemCopyMatching_block_invoke_2 + 240
6  Security                       0x183ec95e8 __SecItemAuthDoQuery_block_invoke + 304
7  Security                       0x183ec6b1c SecItemAuthDo + 216
8  Security                       0x183ec7904 SecItemAuthDoQuery + 440
9  Security                       0x183ec8088 __SecItemCopyMatching_block_invoke + 116
10 Security                       0x183ec6664 SecOSStatusWith + 32
11 Security                       0x183ec7fcc SecItemCopyMatching + 404
12 <Appname>                       0x10048ca60 +[FIRInstanceIDKeyPair cachedKeyRefWithTag:] + 4299115104
13 <Appname>                       0x10048c638 +[FIRInstanceIDKeyPair keyPairForPrivateKeyTag:publicKeyTag:error:] + 4299114040
14 <Appname>                       0x10048de9c -[FIRInstanceIDKeyPairStore cachedKeyPairWithSubtype:error:] + 4299120284
15 <Appname>                       0x10048dd10 -[FIRInstanceIDKeyPairStore validCachedKeyPairWithSubtype:error:] + 4299119888
16 <Appname>                       0x10048d748 -[FIRInstanceIDKeyPairStore loadKeyPairWithError:] + 4299118408
17 <Appname>                       0x10048d53c -[FIRInstanceIDKeyPairStore appIdentityWithError:] + 4299117884
18 <Appname>                       0x10048111c -[FIRInstanceID(Private) appInstanceID:] + 4299067676
19 <Appname>                       0x100425f00 -[FIRAIdentity firebaseInstanceID] + 4298694400
20 <Appname>                       0x10042ffe8 -[FIRAMeasurement createRawEventMetadataWithUserAttributes:] + 4298735592
21 <Appname>                       0x10042da0c __43-[FIRAMeasurement writeEventOnWorkerQueue:]_block_invoke.1035 + 4298725900
22 <Appname>                       0x1004103e0 -[FIRASqliteStore performTransaction:] + 4298605536
23 <Appname>                       0x10042ca40 -[FIRAMeasurement writeEventOnWorkerQueue:] + 4298721856
24 <Appname>                       0x10042c33c -[FIRAMeasurement handleEventOnWorkerQueue:] + 4298720060
25 <Appname>                       0x10043e034 __52-[FIRAScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 4298793012
26 libdispatch.dylib              0x1834f9630 _dispatch_call_block_and_release + 24
27 libdispatch.dylib              0x1834f95f0 _dispatch_client_callout + 16
28 libdispatch.dylib              0x183505634 _dispatch_queue_drain + 864
29 libdispatch.dylib              0x1834fd0f4 _dispatch_queue_invoke + 464
30 libdispatch.dylib              0x183507504 _dispatch_root_queue_drain + 728
31 libdispatch.dylib              0x183507224 _dispatch_worker_thread3 + 112
32 libsystem_pthread.dylib        0x18370d470 _pthread_wqthread + 1092
33 libsystem_pthread.dylib        0x18370d020 start_wqthread + 4

Relevant Code:

Firebase.Analytics.logEvent(event.name, parameters: event.metadata) // Called on main thread
@ghost
Copy link

ghost commented Dec 25, 2017

This crash also occurs in our app.

@lee-jay
Copy link

lee-jay commented Dec 25, 2017

Our app aslo meets the same crash some time. But it is wired that, the crash log is different from before symbolicatecrash.
BTW, We use Flurry as bug reporting, not Firebase.
Firebase Component:

Firebase/Core (4.5.0), Firebase/DynamicLinks (4.5.0), Firebase/Messaging (4.5.0), FirebaseAnalytics (4.0.4), FirebaseCore (4.0.10), FirebaseDynamicLinks (2.1.0), FirebaseInstanceID (2.0.5), FirebaseMessaging (2.0.6).

Before symbolicatecrash:

Thread 6 Crashed:
0   libobjc.A.dylib                      0x0000000180f101a0 objc_retain + 16
1   <Appname>                            0x0000000100fae4a4 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1195188
2   CoreFoundation                       0x0000000181cb5cd0 __invoking___ + 140
3   CoreFoundation                       0x0000000181b9456c -[NSInvocation invoke] + 288
4   <Appname>                            0x0000000100fdc0d0 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1382624
5   <Appname>                            0x0000000100fdc284 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1383060
6   <Appname>                            0x0000000100fda074 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1374340
7   <Appname>                            0x0000000100fdb874 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1380484
8   <Appname>                            0x0000000100fdb02c plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1378364
9   <Appname>                            0x0000000100fdae3c plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1377868
10  <Appname>                            0x0000000100fcea10 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1327648
11  <Appname>                            0x0000000100f71bac plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 947132
12  <Appname>                            0x0000000100f7bc94 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 988324
13  <Appname>                            0x0000000100f796b8 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 978632
14  <Appname>                            0x0000000100f5bfa0 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 858032
15  <Appname>                            0x0000000100f786ec plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 974588
16  <Appname>                            0x0000000100f77fe8 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 972792
17  <Appname>                            0x0000000100f89ce0 plcrash::Flurry::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::Flurry::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 1045744
18  libdispatch.dylib                    0x000000018162aa54 _dispatch_call_block_and_release + 20
19  libdispatch.dylib                    0x000000018162aa14 _dispatch_client_callout + 12
20  libdispatch.dylib                    0x000000018163496c _dispatch_queue_serial_drain$VARIANT$mp + 524
21  libdispatch.dylib                    0x00000001816352fc _dispatch_queue_invoke$VARIANT$mp + 336
22  libdispatch.dylib                    0x0000000181635d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
23  libdispatch.dylib                    0x000000018163e03c _dispatch_workloop_worker_thread$VARIANT$mp + 640
24  libsystem_pthread.dylib              0x00000001818d2f1c _pthread_wqthread + 928
25  libsystem_pthread.dylib              0x00000001818d2b6c start_wqthread + 0

After symbolicatecrash:

Thread 6 Crashed:
0   libobjc.A.dylib                      0x0000000180f101a0 objc_retain + 16
1   <Appname>                            0x0000000100fae4a4 +[FIRLoggerWrapper logWithLevel:withService:withCode:withMessage:withArgs:] + 56
2   CoreFoundation                       0x0000000181cb5cd0 __invoking___ + 140
3   CoreFoundation                       0x0000000181b9456c -[NSInvocation invoke] + 288
4   <Appname>                            0x0000000100fdc0d0 +[FIRInstanceIDLogger logWithLevel:withService:withCode:withMessage:withArgs:] + 224
5   <Appname>                            0x0000000100fdc284 -[FIRInstanceIDLogger logFuncDebug:messageCode:msg:] + 128
6   <Appname>                            0x0000000100fda074 +[FIRInstanceIDKeyPair keyPairForPrivateKeyTag:publicKeyTag:error:] + 444
7   <Appname>                            0x0000000100fdb874 -[FIRInstanceIDKeyPairStore migrateKeyPairCacheIfNeeded] + 164
8   <Appname>                            0x0000000100fdb02c -[FIRInstanceIDKeyPairStore loadKeyPairWithError:] + 272
9   <Appname>                            0x0000000100fdae3c -[FIRInstanceIDKeyPairStore appIdentityWithError:] + 36
10  <Appname>                            0x0000000100fcea10 -[FIRInstanceID(Private) appInstanceID:] + 56
11  <Appname>                            0x0000000100f71bac -[FIRAIdentity firebaseInstanceID] + 72
12  <Appname>                            0x0000000100f7bc94 -[FIRAMeasurement createRawEventMetadataWithUserAttributes:] + 464
13  <Appname>                            0x0000000100f796b8 __43-[FIRAMeasurement writeEventOnWorkerQueue:]_block_invoke.1035 + 260
14  <Appname>                            0x0000000100f5bfa0 -[FIRASqliteStore performTransaction:] + 92
15  <Appname>                            0x0000000100f786ec -[FIRAMeasurement writeEventOnWorkerQueue:] + 1464
16  <Appname>                            0x0000000100f77fe8 -[FIRAMeasurement handleEventOnWorkerQueue:] + 380
17  <Appname>                            0x0000000100f89ce0 __52-[FIRAScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
18  libdispatch.dylib                    0x000000018162aa54 _dispatch_call_block_and_release + 20
19  libdispatch.dylib                    0x000000018162aa14 _dispatch_client_callout + 12
20  libdispatch.dylib                    0x000000018163496c _dispatch_queue_serial_drain$VARIANT$mp + 524
21  libdispatch.dylib                    0x00000001816352fc _dispatch_queue_invoke$VARIANT$mp + 336
22  libdispatch.dylib                    0x0000000181635d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
23  libdispatch.dylib                    0x000000018163e03c _dispatch_workloop_worker_thread$VARIANT$mp + 640
24  libsystem_pthread.dylib              0x00000001818d2f1c _pthread_wqthread + 928
25  libsystem_pthread.dylib              0x00000001818d2b6c start_wqthread + 0

@paulb777
Copy link
Member

@lee-jay Your issue looks like #502 that was addressed in the Firebase 4.8.0 release. Please use different issues to track different crash backtraces.

@paulb777
Copy link
Member

This may be related to #673 which crashes in FirebaseAnalytics before getting to InstanceID.

@lee-jay
Copy link

lee-jay commented Jan 25, 2018

@paulb777 Thank you. We will update Firebase to 4.8.0 release and then check if it will happen. But it needs a new version deployed in March.

@morganchen12
Copy link
Contributor

This stack trace is oddly similar to the one in #446. Are any of you only able to reproduce this issue on jailbroken devices?

@morganchen12
Copy link
Contributor

I'm going to close this since it's an obscure crash in the Security framework that may not actually be caused by Firebase and hasn't seen any new reports lately.

Feel free to re-open if this reappears.

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