Bug 214650 - [iOS] Avoid rebuilding MobileGestalt cache if IOKit is busy
Summary: [iOS] Avoid rebuilding MobileGestalt cache if IOKit is busy
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-22 12:52 PDT by Per Arne Vollan
Modified: 2020-07-23 17:45 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.18 KB, patch)
2020-07-22 13:03 PDT, Per Arne Vollan
ap: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2020-07-22 12:52:59 PDT
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.
Comment 1 Per Arne Vollan 2020-07-22 12:53:43 PDT
rdar://problem/65882633
Comment 2 Per Arne Vollan 2020-07-22 13:03:06 PDT
Created attachment 404954 [details]
Patch
Comment 3 Geoffrey Garen 2020-07-22 13:24:11 PDT
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 4 Alexey Proskuryakov 2020-07-23 17:45:37 PDT
Comment on attachment 404954 [details]
Patch

r- because of red EWS, but yes, what Geoff said.