Loading
Fix deadlock between ActivityManager and BackupManager under some race conditions.
Deadlock may happen when bind backup agent under some race condition. If waiting for backup agent timeout, BackupManager will call to ActivityManager's clearPendingBackup with mAgentConnectLock held. During clearPendingBackup process, it will try to lock ActivityManager's main lock. If app started up timeout at the same time, ActivityManager will call to BackupManager's agentDisconnected with main lock held. During agentDisconnected process, it will try to lock mAgentConnectLock. Deadlock happened then. In bindToAgentSynchronous process, move clearPendingBackup out of lock area to fix this issue. Change-Id: Ic1acfe1df8fd83d4acff5ce518d86cea4b2fe18b Signed-off-by:lwan89 <liang.wang@intel.com> Signed-off-by:
Zhiquan Liu <zhiquan.liu@intel.com>