Fuchsia Message Loop implementation is susceptible to idle wakes. #49330
Labels
customer: fuchsia
engine
flutter/engine repository. See also e: labels.
P2
Important issues not at the top of the work list
team-engine
Owned by Engine team
triaged-engine
Triaged by Engine team
This is being temporarily reverted in flutter/engine#15903. Once the underlying issue (described below) is patched, this patch can be re-landed. The original regression was introduced in flutter/engine#14007.
The message loop implementations may be asked to wake up multiple times at various points in the future. When the implementation is asked to wake up the thread at the new time-point, the previous request must be disregarded. Once the time-point it reached, the implementation must call RunExpiredTasksNow. In the reverted patch, the Fuchsia implementation was scheduling a task to be run in the future for each call to
MessageLoopImpl::WakeUp
. This did not take into account disregarding the previous requests. Other platforms use timer file descriptors that are continuously re-armed to implement this functionality. In the absence of this mechanism on Fuchsia, for each task posted to the target message loop (potentially many thousands), the message loop would wake up and end up doing no work. This would eventually cause CPU usage to spike and cause actual work to be deferred.The text was updated successfully, but these errors were encountered: