Source of deadlock between PlayerBase.mLock and
PlaybackActivityMonitor.mPlayerLock: android.media.MediaPlayer.release() > android.media.PlayerBase.baseRelease() > synchronized (mLock) > com.android.server.audio.PlaybackActivityMonitor.releasePlayer() > synchronized(mPlayerLock) and: com.android.server.audio.PlaybackActivityMonitor.unmutePlayersForCall() > synchronized (mPlayerLock) > android.media.PlayerProxy.setVolume() > android.media.PlayerBase$IPlayerWrapper.setVolume() > android.media.PlayerBase.baseSetVolume() > synchronized (mLock) playerSetVolume() Since system_server can have its own players, the calls to AudioService from PlayerBase can be synchronous, hence the deadlock. The fix consists in never holding the lock in PlayerBase while calling into AudioService. Refactor the playstate update into a method used for start / stop / pause. Bug: 72294559 Test: see bug Change-Id: Ib41045de124683a7484184cf63577bd2412d1362
Loading
Please register or sign in to comment