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

ANR on Rum.enable() #1926

Closed
fchristysen opened this issue Mar 21, 2024 · 7 comments
Closed

ANR on Rum.enable() #1926

fchristysen opened this issue Mar 21, 2024 · 7 comments
Assignees
Labels
crash SDK induced crash

Comments

@fchristysen
Copy link

Stack trace

  at com.datadog.android.core.internal.persistence.file.advanced.FeatureFileOrchestrator.<init> (FeatureFileOrchestrator.java:47)
  at com.datadog.android.core.internal.SdkFeature.createFileStorage (SdkFeature.java:262)
  at com.datadog.android.core.internal.SdkFeature.prepareStorage (SdkFeature.java:235)
  at com.datadog.android.core.internal.SdkFeature.initialize (SdkFeature.java:80)
  at com.datadog.android.core.DatadogCore.registerFeature (DatadogCore.kt:134)
  at com.datadog.android.rum.Rum.enable (Rum.java:61)
  at com.datadog.android.rum.Rum.enable$default (Rum.java:35)
  at com.traveloka.android.datadog.DatadogUtil.initializeRUM (DatadogUtil.kt:106)
...

Reproduction steps

Initialized Datadog RUM by calling Rum.enable(config)

Volume

0.9%

Affected SDK versions

2.5.1

Latest working SDK version

2.5.1

Does the crash manifest in the latest SDK version?

Yes

Kotlin / Java version

No response

Gradle / AGP version

No response

Other dependencies versions

No response

Device Information

No response

Other relevant information

No response

@fchristysen fchristysen added the crash SDK induced crash label Mar 21, 2024
@mariusc83 mariusc83 self-assigned this Mar 21, 2024
@mariusc83
Copy link
Collaborator

Hi @fchristysen, thank you for taking the time for reporting this issue. I am afraid we will need more information from your end in order to better understand what is going on. Can you please provide us with the following information :

  • a complete stack trace of the ANR error
  • how often this happens, what are the devices model and maybe some scenario through which you are able to reproduce the issue ?

Thanks !!

@fchristysen
Copy link
Author

Hi @mariusc83, Thanks for quick reply.

a complete stack trace of the ANR error

com.traveloka.android.datadog.DatadogUtil.initializeRUM
Input dispatching timed out (No focused window)
  at com.datadog.android.rum.internal.RumFeature.createDataWriter (RumFeature.kt:241)
  at com.datadog.android.rum.internal.RumFeature.onInitialize (RumFeature.kt:142)
  at com.datadog.android.core.internal.SdkFeature.initialize (SdkFeature.java:89)
  at com.datadog.android.core.DatadogCore.registerFeature (DatadogCore.kt:134)
  at com.datadog.android.rum.Rum.enable (Rum.java:61)
  at com.datadog.android.rum.Rum.enable$default (Rum.java:35)
  at com.traveloka.android.datadog.DatadogUtil.initializeRUM (DatadogUtil.kt:107)
  at com.traveloka.android.AppTravelokaApplicationListener.lambda$setupDatadogSDK$7 (AppTravelokaApplicationListener.java:272)
  at rx.internal.util.ActionSubscriber.onNext (ActionSubscriber.java:39)
  at rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134)
  at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call (OperatorObserveOn.java:224)
  at rx.android.schedulers.LooperScheduler$ScheduledAction.run (LooperScheduler.java:107)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:264)
  at android.app.ActivityThread.main (ActivityThread.java:8315)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:632)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049)

how often this happens, what are the devices model and maybe some scenario through which you are able to reproduce the issue?

Based on our play store metrics, 0.9% sessions of our users. We put our RUM.enable on our app startup, on our Application class onCreate.

@mariusc83
Copy link
Collaborator

Thank you for the stack trace and the related information. We will add a ticket on our end to investigate this and keep you updated on this thread.

@0xnm
Copy link
Contributor

0xnm commented Apr 11, 2024

Hello @fchristysen! We have additional questions to continue our investigations:

  • Is stacktrace you are posting coming from Play Store?
  • Stacktrace from your original message has different methods involved compared to the second stacktrace you've posted (there are some methods in former which don't exist in the latter) - can you give an explanation for this one / post relevant stacktrace?
  • Do you see any pattern in your application version (and thus in our SDK version) / OS version / device for the ANRs you are getting?

@fchristysen
Copy link
Author

Hi @0xnm , sorry for late reply

  • Is stacktrace you are posting coming from Play Store?
    Yes, it's from Play Store
  • Stacktrace from your original message has different methods involved compared to the second stacktrace you've posted (there are some methods in former which don't exist in the latter) - can you give an explanation for this one / post relevant stacktrace?
    Yes, stacktrace from Play Store are from specific user session, I probably copy-paste different one from the original message vs the second one.
  • Do you see any pattern in your application version (and thus in our SDK version) / OS version / device for the ANRs you are getting?
    No pattern in Application Version.
    From 89% ANRs are from Android 11 OS

@mariusc83
Copy link
Collaborator

Hi @fchristysen, sorry for the delay. We were not able to reproduce this issue on our end so far and we could not see it yet in our metrics. Looking in the provided stack trace I see that you are using RxAndroid and that you are initializing the Datadog SDK in a RX scheduler. The way I remember is that the stack traces in RX can be scattered due to the multi - threading chain of operation calls. I am wondering if this could be really caused by our SDK or it could be something else ? Is the initialize method called on a rx.android.schedulers.LooperScheduler running on the UI Thread ?

@mariusc83
Copy link
Collaborator

Closing this because we did not get any reply from the reporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash SDK induced crash
Projects
None yet
Development

No branches or pull requests

3 participants