Closed juancampa closed 2 years ago
Thank you, @juancampa, for the detailed report. We will investigate this.
Filed internally as 154701.
Hi @juancampa , the 2.4.5 release should fix the deadlock. Please re-test and let me know if the issue is resolved.
I'm going to go ahead and close this issue as the fix has been released. If you still have any problems, please feel free to open another issue.
Thanks!
Is this a support request? No
Describe the bug This SDK can deadlock because a couple of rwlocks are being acquired in reverse order.
The two rwlocks involved are:
sharedUserLock
clientLock
The deadlock occurs if
LDClientIdentify
runs concurrently withLDi_readstream
orLDi_fetchfeaturemap
. Because:LDClientIdentify
acquires (1) and then (2)LDi_readstream
acquires (2) and then (1). Same withLDi_fetchfeaturemap
If both functions are running simultaneously, there's a probability of a deadlock ☠️
Here's an instance where we found that happening:
To reproduce Be unlucky enough to have the above two functions running at the same time
Expected behavior Not to deadlock
Logs N/A
SDK version 2.4.4
Language version, developer tools C/C++
OS/platform Ubuntu 16.04
Additional context N/A