Unable to configure camera: "Error while setting up the session. The app will try to recover."
Expected Behavior
I should be able to take pictures and videos with my rear camera.
Current Behavior
When using the rear camera, I only see a black preview screen in Aperture and a message "Error while setting up the session. The app will try to recover." However, switching to the selfie camera works.
Other apps that try to use the camera also only show a black preview.
This has been happening for three/four builds now. The last picture I took is from October 8, 2024.
Steps to Reproduce
Open any app that tries to use the rear camera.
Logs
Here are the Logcat logs of a recent Aperture run.
They contain this interesting (?) exception:
Unable to configure camera Camera@358e42e[id=0]
androidx.camera.camera2.internal.compat.CameraAccessExceptionCompat: CAMERA_ERROR (3): endConfigure:693: Camera 0: Error configuring streams: Broken pipe (-32)
at androidx.camera.camera2.internal.compat.CameraDeviceCompatApi28Impl.createCaptureSession(CameraDeviceCompatApi28Impl.java:44)
at androidx.camera.camera2.internal.compat.CameraDeviceCompat.createCaptureSession(CameraDeviceCompat.java:125)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.lambda$openCaptureSession$0(SynchronizedCaptureSessionBaseImpl.java:157)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.$r8$lambda$XjvrcUFCua2EgTHbVDsLePEYolE(SynchronizedCaptureSessionBaseImpl.java:0)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl$$ExternalSyntheticLambda4.attachCompleter(R8$$SyntheticClass:0)
at androidx.concurrent.futures.CallbackToFutureAdapter.getFuture(CallbackToFutureAdapter.java:102)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.openCaptureSession(SynchronizedCaptureSessionBaseImpl.java:147)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl.lambda$openCaptureSession$0(SynchronizedCaptureSessionImpl.java:117)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl.$r8$lambda$DLV9OUngVUZO74qZ3Jq0pc_mUKQ(SynchronizedCaptureSessionImpl.java:0)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl$$ExternalSyntheticLambda2.apply(R8$$SyntheticClass:0)
at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:201)
at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:229)
at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:171)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: android.os.ServiceSpecificException: endConfigure:693: Camera 0: Error configuring streams: Broken pipe (-32) (code 10)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3197)
at android.os.Parcel.createException(Parcel.java:3167)
at android.os.Parcel.readException(Parcel.java:3150)
at android.os.Parcel.readException(Parcel.java:3092)
at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.endConfigure(ICameraDeviceUser.java:703)
at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:112)
at android.hardware.camera2.impl.CameraDeviceImpl.configureStreamsChecked(CameraDeviceImpl.java:542)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:760)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:706)
at androidx.camera.camera2.internal.compat.CameraDeviceCompatApi28Impl.createCaptureSession(CameraDeviceCompatApi28Impl.java:42)
at androidx.camera.camera2.internal.compat.CameraDeviceCompat.createCaptureSession(CameraDeviceCompat.java:125)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.lambda$openCaptureSession$0(SynchronizedCaptureSessionBaseImpl.java:157)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.$r8$lambda$XjvrcUFCua2EgTHbVDsLePEYolE(SynchronizedCaptureSessionBaseImpl.java:0)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl$$ExternalSyntheticLambda4.attachCompleter(R8$$SyntheticClass:0)
at androidx.concurrent.futures.CallbackToFutureAdapter.getFuture(CallbackToFutureAdapter.java:102)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl.openCaptureSession(SynchronizedCaptureSessionBaseImpl.java:147)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl.lambda$openCaptureSession$0(SynchronizedCaptureSessionImpl.java:117)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl.$r8$lambda$DLV9OUngVUZO74qZ3Jq0pc_mUKQ(SynchronizedCaptureSessionImpl.java:0)
at androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl$$ExternalSyntheticLambda2.apply(R8$$SyntheticClass:0)
at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:201)
at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:229)
at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:171)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
and some lines that look even more scary:
11-02 14:41:19.432 18283 22042 E campf : 22760827296789 cammw_resource_manager.cpp (2273) 22042 E [CMW] [RSC] perf_lock_acq fail(No such file or directory)
11-02 14:41:19.588 18283 22044 E campf : 22760983416164 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 1, frameCount = 1
11-02 14:41:19.659 18283 22044 E campf : 22761053982831 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 2, frameCount = 2
11-02 14:41:19.727 18283 22044 E campf : 22761122637414 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 3, frameCount = 3
11-02 14:41:19.794 18283 22044 E campf : 22761189393091 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 4, frameCount = 4
11-02 14:41:19.864 18283 22044 E campf : 22761258812518 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 5, frameCount = 5
11-02 14:41:19.928 18283 22044 E campf : 22761323244550 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 6, frameCount = 6
11-02 14:41:19.994 18283 22044 E campf : 22761389466425 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 7, frameCount = 7
11-02 14:41:20.061 18283 22044 E campf : 22761456418039 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 8, frameCount = 8
11-02 14:41:20.128 18283 22044 E campf : 22761523722258 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 9, frameCount = 9
11-02 14:41:20.195 18283 22044 E campf : 22761590182050 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 10, frameCount = 10
11-02 14:41:20.263 18283 22044 E campf : 22761658024654 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 11, frameCount = 11
11-02 14:41:20.330 18283 22044 E campf : 22761725753977 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 12, frameCount = 12
11-02 14:41:20.398 18283 22044 E campf : 22761793451529 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 13, frameCount = 13
11-02 14:41:20.465 18283 22044 E campf : 22761860047362 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 14, frameCount = 14
11-02 14:41:20.532 18283 22044 E campf : 22761926917987 cammw_camera_client.cpp (7388) 22044 E [CMW] [CLI] There are no SensorSyncInfo. ispSofCount = 15, frameCount = 15
11-02 14:41:22.078 1724 1823 E system_server: Cannot read thread CPU times for PID 1724
11-02 14:41:24.114 18283 18331 E campf : 22765509596579 pal.cpp (722) 18331 E [PAL] Aborting .... !
11-02 14:41:24.115 18283 18331 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 18331 (HwBinder:18283_), pid 18283 (provider@1.0-se)
11-02 14:41:24.376 22098 22098 E DEBUG : failed to read process info: failed to open /proc/18283: No such file or directory
11-02 14:41:24.767 22098 22098 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-02 14:41:24.767 22098 22098 F DEBUG : LineageOS Version: '21.0-20241101-NIGHTLY-xz2c'
11-02 14:41:24.767 22098 22098 F DEBUG : Build fingerprint: 'Sony/H8324/H8324:10/52.1.A.3.49/052001A003004902006556692:user/release-keys'
11-02 14:41:24.767 22098 22098 F DEBUG : Revision: '0'
11-02 14:41:24.767 22098 22098 F DEBUG : ABI: 'arm'
11-02 14:41:24.767 22098 22098 F DEBUG : Timestamp: 2024-11-02 14:41:24.376241914+0100
11-02 14:41:24.767 22098 22098 F DEBUG : Process uptime: 0s
11-02 14:41:24.767 22098 22098 F DEBUG : Cmdline: /vendor/bin/hw/vendor.somc.hardware.camera.provider@1.0-service
11-02 14:41:24.767 22098 22098 F DEBUG : pid: 18283, tid: 18331, name: HwBinder:18283_ >>> /vendor/bin/hw/vendor.somc.hardware.camera.provider@1.0-service <<<
11-02 14:41:24.767 22098 22098 F DEBUG : uid: 1047
11-02 14:41:24.767 22098 22098 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-02 14:41:24.767 22098 22098 F DEBUG : r0 00000000 r1 0000479b r2 00000006 r3 ecf34a30
11-02 14:41:24.767 22098 22098 F DEBUG : r4 ecf34a40 r5 ecf34a28 r6 0000476b r7 0000016b
11-02 14:41:24.767 22098 22098 F DEBUG : r8 00000000 r9 ffffffff r10 ecf34a30 r11 00000005
11-02 14:41:24.767 22098 22098 F DEBUG : ip 0000479b sp ecf34a10 lr f37268ab pc f37268be
11-02 14:41:24.767 22098 22098 F DEBUG : 16 total frames
11-02 14:41:24.768 22098 22098 F DEBUG : backtrace:
11-02 14:41:24.768 22098 22098 F DEBUG : #00 pc 0005f8be /apex/com.android.runtime/lib/bionic/libc.so (abort+138) (BuildId: 26b1930031259c64cffc1e3fa68bfa03)
11-02 14:41:24.768 22098 22098 F DEBUG : #01 pc 000065bb /vendor/lib/libsomc_camerapal.so (PAL_MsgSendRecvWithTimeout+310) (BuildId: 240405203b1d0aa0ba95bed90b5bf094)
11-02 14:41:24.768 22098 22098 F DEBUG : #02 pc 00013401 /vendor/lib/libexcal_core.so (excalibur::Thread::sendMsg(excalibur::MsgBase*, excalibur::IMsgDispatcher*)+116) (BuildId: ede097b800349492b8a8004320fef4fe)
11-02 14:41:24.768 22098 22098 F DEBUG : #03 pc 00018859 /vendor/lib/libexcal_core.so (excalibur::CompBase::sendCommand(excalibur::CompCmdBase*)+40) (BuildId: ede097b800349492b8a8004320fef4fe)
11-02 14:41:24.768 22098 22098 F DEBUG : #04 pc 0006349d /vendor/lib/libsomc_camerahal.so (camerahal::ReqClient3::configureStreams(excal_pal::PtrLockListDel<camerahal::ReqClient3::Stream>*, excalibur::OperationMode)+88) (BuildId: 226308afe558bb32165e171bfb6f3311)
11-02 14:41:24.768 22098 22098 F DEBUG : #05 pc 000360ad /vendor/lib/libsomc_camerahal.so (camerahal::CameraDevice::configureStreams(camera3_stream_configuration*)+1244) (BuildId: 226308afe558bb32165e171bfb6f3311)
11-02 14:41:24.768 22098 22098 F DEBUG : #06 pc 00012c21 /vendor/lib/vendor.somc.camera.device@3.4-impl.so (vendor::somc::hardware::camera::device::V3_4::implementation::CameraDeviceSession::configureStreams_3_4(android::hardware::camera::device::V3_4::StreamConfiguration const&, std::__1::function<void (android::hardware::camera::common::V1_0::Status, android::hardware::camera::device::V3_4::HalStreamConfiguration const&)>)+416) (BuildId: 7da99d36c2ffa1218ca947077748b0a4)
11-02 14:41:24.768 22098 22098 F DEBUG : #07 pc 000153c9 /vendor/lib/vendor.somc.camera.device@3.4-impl.so (vendor::somc::hardware::camera::device::V3_4::implementation::CameraDeviceSession::TrampolineSessionInterface_3_4::configureStreams_3_4(android::hardware::camera::device::V3_4::StreamConfiguration const&, std::__1::function<void (android::hardware::camera::common::V1_0::Status, android::hardware::camera::device::V3_4::HalStreamConfiguration const&)>)+44) (BuildId: 7da99d36c2ffa1218ca947077748b0a4)
11-02 14:41:24.768 22098 22098 F DEBUG : #08 pc 00016ae7 /vendor/lib/android.hardware.camera.device@3.4.so (android::hardware::camera::device::V3_4::BnHwCameraDeviceSession::_hidl_configureStreams_3_4(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+210) (BuildId: 09c7b08cc7c05adb1f215f197922693f)
11-02 14:41:24.768 22098 22098 F DEBUG : #09 pc 00017209 /vendor/lib/android.hardware.camera.device@3.4.so (android::hardware::camera::device::V3_4::BnHwCameraDeviceSession::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+776) (BuildId: 09c7b08cc7c05adb1f215f197922693f)
11-02 14:41:24.768 22098 22098 F DEBUG : #10 pc 0003bd6d /vendor/lib/libhidlbase.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+96) (BuildId: 6f108d658beba26c7767b057adc20dc1)
11-02 14:41:24.768 22098 22098 F DEBUG : #11 pc 0003992b /vendor/lib/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+1266) (BuildId: 6f108d658beba26c7767b057adc20dc1)
11-02 14:41:24.768 22098 22098 F DEBUG : #12 pc 00039431 /vendor/lib/libhidlbase.so (android::hardware::PoolThread::threadLoop()+12) (BuildId: 6f108d658beba26c7767b057adc20dc1)
11-02 14:41:24.768 22098 22098 F DEBUG : #13 pc 0000becf /vendor/lib/libutils.so (android::Thread::_threadLoop(void*)+322) (BuildId: 7f0ea3daa90bfff6694cf5437a3aaa4a)
11-02 14:41:24.768 22098 22098 F DEBUG : #14 pc 0006aa33 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: 26b1930031259c64cffc1e3fa68bfa03)
11-02 14:41:24.768 22098 22098 F DEBUG : #15 pc 00061bb7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 26b1930031259c64cffc1e3fa68bfa03)
11-02 14:41:24.826 738 738 E tombstoned: Tombstone written to: tombstone_01
11-02 14:41:24.835 1724 2112 E NativeTombstoneManager: Tombstone's UID (1000) not an app, ignoring
Device information
/codename xz2c /version lineage-21 /date 2024-11-01 /kernel 4.9.227-perf+ #1 Fri Nov 1 01:07:55 UTC 2024 /baseband 845-sdm845.gen.prodQ-00052-48 /mods MindTheGapps
I have read the directions