fix: deadlock pattern in dynamic sdk-name assignment#857
fix: deadlock pattern in dynamic sdk-name assignment#857supervacuus wants to merge 3 commits intomasterfrom
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #857 +/- ##
==========================================
+ Coverage 82.57% 82.59% +0.02%
==========================================
Files 53 53
Lines 7368 7372 +4
Branches 1186 1187 +1
==========================================
+ Hits 6084 6089 +5
+ Misses 1175 1174 -1
Partials 109 109 |
markushi
left a comment
There was a problem hiding this comment.
Nice catch, thanks for getting this fixed. Can you estimate how severe this issue is for mobile SDKs? If this has a bigger impact I'm happy to help you getting this shipped for all relevant mobile SDKs.
It is hard to say, but I don't think this will affect many. The How realistic this is on the Mobile SDKs depends on how they interact with the Native SDK (threads already running that could access scope-related functions before another thread calls In any case, we can release it immediately, but I am unsure if it is urgent. The other aspect is that with the current change, you must ensure that the global scope hasn't been touched before We can change this by not setting the dynamic SDK name in |
Just in case it is unclear: this would mean we would have to keep the |
We recently introduced a deadlock in
sentry_init()when implementing dynamic SDK names. This was the reason for the uptick in build timeouts in the CI (which was almost exclusively due toTEST(concurrent_init)being stuck). Sorry, I missed that during the review.I also increased the concurrency in the test so that there is a higher chance of triggering such cases. The current level should be high enough for CI. I need to up that considerably on my machines to catch the issue.