-
Notifications
You must be signed in to change notification settings - Fork 333
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 issue with forwardSelector:arguments:options: method #683
Comments
Thanks for the report! @tonyxiao is looking into this. |
FYI I tried a different approach using serial dispatch queues & a serial |
@bbernberg I'm trying to investigate this right now. Do you happen to have a minimal example that you can put on github reproducing this issue? |
This regularly reproduces it on my iPhone 7 Plus from backgrounding and foregrounding the app a couple times: https://gist.github.com/raylillywhite/cb74d4d1b9325bfcde94119170be55ec In the app where I'm experiencing it, we're obviously not sending anywhere near that many events, and it happens every time we turn on airplane mode, launch the app, background it, turn off airplane mode, foreground the app. I wasn't able to successfully reproduce that with a minimal example though. |
@raylillywhite 's example looks perfect. It definitely seems to be the App State Notifications deadlocking with other events fired from the main thread. |
@bbernberg @raylillywhite we've got a fix on |
That branch does fix the issue in our main app as well 🎉 Thanks for making this fix a priority! |
@tonyxiao this unfortunately did not fix the issue for us. Here's a stack trace from that branch: |
@bbernberg my best guess right now is that Taplytics tries to dispatch to the main thread synchronously within their |
@tonyxiao any update on this? We are still seeing this issue in production unfortunately. |
@bbernberg We reached out to Taplytics but have not heard back yet. In the meantime I'm going to add a workaround in the core library. |
@tonyxiao did we add a workaround here? |
on the roadmap, will circle back to this next week. |
Any more updates on this? We are about to launch a feature that is seeing this issue at a very high rate. My previous attempts at workarounds are no longer working. |
@bbernberg Sorry for the delay here. I'm going to reach out to Taplytics again and see if they can jump in and help out. Will update as soon as I have more. |
@bbernberg we got in touch with the Taplytics team and are sorting out the right solution together. |
@bbernberg I apologize for the delay again. We decided to change our Taplytics integration to call Taplytics asynchronously rather than have Taplytics/Segment modify the core SDK. Since this issue is outside the scope of our core SDK, I will close this here and track this issue internally in addition to the Taplytics repo for you to follow: |
We are seeing a repeatable deadlock issue due to the
@synchronized(self)
lock inSEGIntegrationsManager.m
'sforwardSelector:arguments:options:
method. We are seeing the issue when the app becomes active and thehandleAppStateNotification
path is executed.The text was updated successfully, but these errors were encountered: