Ignore the system uid to avoid deadlocks
The ActivityManagerService can acquire or release wake locks with the
ActivityManagerService locked. Now that the PowerManagerService
notifies it of wakelocks, this can cause a deadlock. Prevent this
situation by ignoring wakelocks from the system uid, which should be
never be killed anyway.
The deadlock occurs when the ActivityManagerService is locked and
the WakeLock acquire/release locks PowerManagerService.mLocks. Another
thread may have locked them in a different order at the same time.
Signed-off-by:
Christopher Lais <chris+android@zenthought.org>
Loading