If IOKit is busy, any attempt to rebuild the MobileGestalt cache will likely fail after a timeout. To avoid blocking the main thread in the UI process, skip rebuilding the MobileGestalt cache if IOKit is busy.
rdar://problem/65882633
Created attachment 404954 [details] Patch
Today, if the MG cache is invalid, we get hang reports about it. That's not the best signal, but it's some signal nonetheless. I can see how this patch would make the hang go away, but the next thing that will happen is a mysterious failure in the WebContent process (most likely a failure to play media). Is that an improvement? Did we find to what exactly what keeping IOKit busy on the device that triggered this hang?
Comment on attachment 404954 [details] Patch r- because of red EWS, but yes, what Geoff said.