Camera: Avoid possible deadlock when closing advanced extension session
The advanced extension session request processor must not hold the 'mInterfaceLock' when calling the camera device implementation as it could result in a deadlock with the camera device close that can run at the same time and try to acquire the same locks in reverse order. The request processor will only read from 'mCameraConfigMap' which is initialized only once during session setup and will not change during the session lifetime. A sample stack trace will look like this: Service thread: 1) android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating 2) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl$RequestProcessor.stopRepeating Client thread: 1) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl.release 2) android.hardware.camera2.impl.CameraDeviceImpl.close Bug: 202074988 Test: Manual using application, Camera CTS Change-Id: If992667a7d7e54be5bea1fcc4b1d71ec1b895ca0
Loading
Please register or sign in to comment