Skip to content

crash on com.google.fira.worker thread in apmpb_encode_repeated_user_attribute #2252

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
RamblinWreck77 opened this issue Jan 11, 2019 · 10 comments

Comments

@RamblinWreck77
Copy link

Describe your environment

  • Xcode version: 10.1
  • Firebase SDK version: 5.15.0
  • Firebase Component: Core
  • Component version: 5.1.992

Describe the problem

Rare-ish crash in production, seems to only happen when the app is launched in the background from a significant location change event. Crash occurs essentially right at app launch so there's little/no logging.

Steps to reproduce:

Currently not reproducible, seems to take out 0.5-1% of sessions after millions of background wake up events.

Relevant Code:

Crashed: com.google.fira.worker: EXC_BAD_INSTRUCTION 0x0000000000000000

0  App                           0x104dfe45c apmpb_encode_repeated_user_attribute + 4386448476
1  App                           0x1054cdf1c pb_encode (pb_encode.c:510)
2  App                           0x104e0879c nano_two_pass_encoding + 4386490268
3  App                           0x104dfd878 apmpb_encode_measurement_bundle + 4386445432
4  App                           0x104dfff54 -[APMPBMeasurementBundle protoBuffer] + 4386455380
5  App                           0x104da6410 -[APMDatabase insertIfNotExistsRawEventMetadata:error:] + 4386087952
6  App                           0x104dbc884 __42-[APMMeasurement writeEventOnWorkerQueue:]_block_invoke.1146 + 4386179204
7  App                           0x104de21b8 -[APMSqliteStore performTransaction:] + 4386333112
8  App                           0x104dbb864 -[APMMeasurement writeEventOnWorkerQueue:] + 4386175076
9  App                           0x104dbb04c -[APMMeasurement handleEventOnWorkerQueue:] + 4386173004
10 App                           0x104dce6d0 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 4386252496
11 libdispatch.dylib              0x1cd3cd6c8 _dispatch_call_block_and_release + 24
12 libdispatch.dylib              0x1cd3ce484 _dispatch_client_callout + 16
13 libdispatch.dylib              0x1cd3a8fa0 _dispatch_lane_serial_drain$VARIANT$armv81 + 548
14 libdispatch.dylib              0x1cd3a9ae4 _dispatch_lane_invoke$VARIANT$armv81 + 412
15 libdispatch.dylib              0x1cd3b1f04 _dispatch_workloop_worker_thread + 584
16 libsystem_pthread.dylib        0x1cd5b10dc _pthread_wqthread + 312
17 libsystem_pthread.dylib        0x1cd5b3cec start_wqthread + 4
@paulb777
Copy link
Member

@htcgh Could be related to #2070 - added this info to b/120167700

@hansemannn
Copy link

Is this being worked on? We see the same crashes in Crashlytics.

@morganchen12
Copy link
Contributor

This bug is unrelated to #2070; this one's caused by protobuf and there's no sqlite3 calls in the stack. @hansemannn @RamblinWreck77 does this issue still occur on Firebase 6+?

@morganchen12
Copy link
Contributor

Closing since there haven't been any responses on this issue.

@milo-
Copy link

milo- commented Jun 20, 2019

@morganchen12 we've just seen the same crash in Crashyltics with Firebase 6.0:

Xcode version: 10.2.1
iOS version: 12.2.0
Firebase SDK version: 6.0.0
Firebase Component: Core
Component version: 6.0.0

#4. Crashed: com.google.fira.worker
0  App                      0x1009d1a40 apmpb_encode_repeated_user_attribute + 4308998720
1  nanopb                         0x101a64f74 encode_field (pb_encode.c:409)
2  nanopb                         0x101a64edc pb_encode (pb_encode.c:510)
3  App                      0x1009dbd20 nano_two_pass_encoding + 4309040416
4  App                      0x1009d0da0 apmpb_encode_measurement_bundle + 4308995488
5  App                      0x1009d34ec -[APMPBMeasurementBundle protoBuffer] + 4309005548
6  App                      0x100978c48 -[APMDatabase insertIfNotExistsRawEventMetadata:error:] + 4308634696
7  App                      0x10098f8bc __42-[APMMeasurement writeEventOnWorkerQueue:]_block_invoke.1174 + 4308727996
8  App                      0x1009b583c -[APMSqliteStore performTransaction:] + 4308883516
9  App                      0x10098e89c -[APMMeasurement writeEventOnWorkerQueue:] + 4308723868
10 App                      0x10098e088 -[APMMeasurement handleEventOnWorkerQueue:] + 4308721800
11 App                      0x100989a74 -[APMMeasurement reportSessionStartOnWorkerQueueWithTimestamp:] + 4308703860
12 App                      0x10098a0a4 -[APMMeasurement reportFirstOpenOnWorkerQueue] + 4308705444
13 App                      0x100989360 __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 4308702048
14 libdispatch.dylib              0x1969707d4 _dispatch_client_callout + 16
15 libdispatch.dylib              0x196913eb4 _dispatch_once_callout + 28
16 App                      0x100988ba4 -[APMMeasurement startMeasurementOnWorkerQueue] + 4308700068
17 App                      0x10098871c -[APMMeasurement setEnabledOnWorkerQueue:] + 4308698908
18 App                      0x1009a1d54 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 4308802900
19 libdispatch.dylib              0x19696fa38 _dispatch_call_block_and_release + 24
20 libdispatch.dylib              0x1969707d4 _dispatch_client_callout + 16
21 libdispatch.dylib              0x196919320 _dispatch_lane_serial_drain$VARIANT$mp + 592
22 libdispatch.dylib              0x196919e3c _dispatch_lane_invoke$VARIANT$mp + 428
23 libdispatch.dylib              0x1969224a8 _dispatch_workloop_worker_thread + 596
24 libsystem_pthread.dylib        0x196b50114 _pthread_wqthread + 304
25 libsystem_pthread.dylib        0x196b52cd4 start_wqthread + 4

Let me know if there's any more info you need, thanks!

@morganchen12 morganchen12 reopened this Jun 20, 2019
@dhiren92

This comment has been minimized.

@morganchen12
Copy link
Contributor

@dhiren92 your crash is not the same as the one reported in this issue. Please file a new issue.

@morganchen12
Copy link
Contributor

Hey all, we still haven't been able to reproduce this crash, but we recently (in 6.12.0) updated the version of nanopb that Firebase is using. Please update your dependencies and let us know if the issue is still reproducible.

@google-oss-bot
Copy link

Hey @RamblinWreck77. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@RamblinWreck77 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Jan 24, 2020
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

7 participants