Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 61231a5e authored by riddle_hsu's avatar riddle_hsu
Browse files

Avoid deadlock between ActivityManagerService and ProcessStatsService.

Root Cause:
Case 1
getStatsOverTime(#483) // lock mWriteLock, wait AMS
async performWriteState(#269) // lock mPendingWriteLock, wait mWriteLock
writeStateLocked(#218) // lock AMS, wait mPendingWriteLock

Case 2
getStatsOverTime(#483) // lock mWriteLock, wait AMS
writeStateSyncLocked,writeStateLocked(#269) // lock AMS, wait mWriteLock

Solution:
Reduce nested lock.

Others also post the same solution:
I437a5cedceb34292a6bd1d9e7610f52b1478e424

Change-Id: Ie9395f3f6359fe59e2282674fcfec9d123e53f25
parent 5e6cf242
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment