Conversation

Replying to and
It's a very common issue but the race condition often has a very low chance of happening in practice, so it mostly goes unnoticed. Users will notice that applications sometimes fail to start or perform an operation but it's hard for them to figure out what could be causing that.
1
2
Replying to and
Even with malloc, applications often don't trigger the race condition regularly. In our experience some cases only happen 1/20 times, etc. Android uses a fork-based spawning model by default and they had to make everything used by the app runtime work, but not beyond that.
1
1
What we dislike about the Zygote spawning model existing is that it makes it easy for them to implement optimizations simply by loading libraries and doing initialization in the Zygote. Since they only run the code once per architecture during boot, it's not as heavily optimized.
1