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

Deadlock in IdentityManager #1434

Open
vegaro opened this issue Nov 3, 2023 · 2 comments
Open

Deadlock in IdentityManager #1434

vegaro opened this issue Nov 3, 2023 · 2 comments

Comments

@vegaro
Copy link
Contributor

vegaro commented Nov 3, 2023

main (blocked):tid=1 systid=9933 | waiting to lock <0x0018fbd2> (com.revenuecat.purchases.identity.IdentityManager) held by thread 40
       at com.revenuecat.purchases.identity.IdentityManager.currentUserIsAnonymous(IdentityManager.kt)
       at com.revenuecat.purchases.PurchasesOrchestrator.getAllowSharingPlayStoreAccount(PurchasesOrchestrator.kt)
       at com.revenuecat.purchases.PurchasesOrchestrator$1.onConnected(PurchasesOrchestrator.kt)
       at com.revenuecat.purchases.google.BillingWrapper.onBillingSetupFinished$lambda$25(BillingWrapper.kt)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:368)
       at android.app.ActivityThread.main(ActivityThread.java:7710)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
DefaultDispatcher-worker-6 (blocked):tid=40 systid=10096 | waiting to lock <0x0dc964a3> (com.revenuecat.purchases.PurchasesOrchestrator) held by thread 1
       at com.revenuecat.purchases.PurchasesOrchestrator$logOut$1.invoke(PurchasesOrchestrator.kt:411)
       at com.revenuecat.purchases.PurchasesOrchestrator$logOut$1.invoke(PurchasesOrchestrator.kt:407)
       at com.revenuecat.purchases.identity.IdentityManager$logOut$1.invoke(IdentityManager.kt:116)
       at com.revenuecat.purchases.identity.IdentityManager$logOut$1.invoke(IdentityManager.kt:113)
       at com.revenuecat.purchases.subscriberattributes.SubscriberAttributesManager$synchronizeSubscriberAttributesForAllUsers$1.invoke(SubscriberAttributesManager.kt:69)
       at com.revenuecat.purchases.subscriberattributes.SubscriberAttributesManager$synchronizeSubscriberAttributesForAllUsers$1.invoke(SubscriberAttributesManager.kt:60)
       at com.revenuecat.purchases.subscriberattributes.SubscriberAttributesManager$ObtainDeviceIdentifiersObservable.waitUntilIdle(SubscriberAttributesManager.kt)
       at com.revenuecat.purchases.subscriberattributes.SubscriberAttributesManager.synchronizeSubscriberAttributesForAllUsers(SubscriberAttributesManager.kt)
       at com.revenuecat.purchases.identity.IdentityManager.logOut(IdentityManager.kt)
       at com.revenuecat.purchases.PurchasesOrchestrator.logOut(PurchasesOrchestrator.kt)
       at com.revenuecat.purchases.Purchases.logOut(Purchases.kt:379)
       at com.revenuecat.purchases.Purchases.logOut$default(Purchases.kt)
       at xxx.RevenueCatDataSource$watchUserState$1$1.emit(RevenueCatDataSource.kt)
       at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt)
       at xxx.RevenueCatDataSource$watchUserState$1.invokeSuspend(RevenueCatDataSource.kt)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt)
       at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt)

There is a dead lock between thread 1 (main thread) and thread 40

Originally posted by @rantianhua in #580 (comment)

@RCGitBot
Copy link
Contributor

RCGitBot commented Nov 3, 2023

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@rantianhua
Copy link

Any updates?

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

No branches or pull requests

3 participants