Skip to content

ANR Caused by deadlock #162

@res0nance

Description

@res0nance

Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing [email protected].

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug
There seems to be a deadlock in LaunchDarkly's SDK code

To reproduce
Unable to provide direct steps to reproduce this issue but a stacktrace is provided below

Expected behavior
LD should not cause ANRs

Logs

These two stack traces block each other.

com.launchdarkly.sdk.android.Throttler.attemptRun (Throttler.java:40)
com.launchdarkly.sdk.android.ConnectivityManager.startUp (ConnectivityManager.java:297)
com.launchdarkly.sdk.android.ConnectivityManager$3.onSuccess (ConnectivityManager.java:341)
com.launchdarkly.sdk.android.ConnectivityManager$3.onSuccess (ConnectivityManager.java:338)
com.launchdarkly.sdk.android.ConnectivityManager.voidSuccess (ConnectivityManager.java:273)
com.launchdarkly.sdk.android.ConnectivityManager.stopStreaming (ConnectivityManager.java:194)
com.launchdarkly.sdk.android.ConnectivityManager.reloadUser (ConnectivityManager.java:338)
com.launchdarkly.sdk.android.LDClient.identifyInternal (LDClient.java:313)
com.launchdarkly.sdk.android.LDClient.identifyInstances (LDClient.java:335)
com.launchdarkly.sdk.android.LDClient.identify (LDClient.java:301)
com.launchdarkly.sdk.android.ConnectivityManager.lambda$new$0 (ConnectivityManager.java:59)
com.launchdarkly.sdk.android.ConnectivityManager.$r8$lambda$nWWvGCieHvstn5YcNkEA7rFcAHs (ConnectivityManager.java)
com.launchdarkly.sdk.android.ConnectivityManager$$InternalSyntheticLambda$0$6761b2069fd0126b9b6e516b99ae60d1488c7998e41b5b3a6b9d3e61ee6bcf3b$0.run (ConnectivityManager.java)
com.launchdarkly.sdk.android.Throttler.run (Throttler.java:36)
com.launchdarkly.sdk.android.Throttler.$r8$lambda$0hIZ81XyILcbRmSVeAlWXsmjPCE (Throttler.java)
com.launchdarkly.sdk.android.Throttler$$InternalSyntheticLambda$1$47657271ca77a10c09f298b0fc296b8a4869f692acbfbf01e4d849ee7f0d0a78$2.run (Throttler.java)

SDK version
3.1.4

Language version, developer tools
TargetSDK = 31
MinSDK = 21
KotlinVersion 1.6.10

OS/platform
Android 12 also happens on Android 11 but given this issue it might be possible on any android version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions