CachedAppOptimizer: update pending freeze inside the process lock
Only update pending freeze once mProcLock has been acquired. If this doesn't happen, the following is possible: 1. FreezeHandler calls setPendingFreeze(false) 2. FreezeHandler blocks on mProcLock, held by someone 3. BroadcastQueue calls notifyStartedRunning 4. BroadcastQueue calls unfreezeTemporarily, which grabs mProcLock 5. BQ wins mProcLock race and sees opt.isPendingFreeze == false and opt.isFrozen == false so skips unfreeze 6. FreezeHandler wakes up, grabs mProcLock, and freezes the process Test: boots Bug: 267949291 Change-Id: I52ab99f3b838e86d187a5a2a27652f78896ffaa4
Loading
Please register or sign in to comment