GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
363 stars 21 forks source link

Camera use causes crash and reboot #4323

Open CoffeeMan1ac opened 1 week ago

CoffeeMan1ac commented 1 week ago

The system crashes and the phone reboots randomly when camera is opened. When trying to take pictures/record videos (any camera app; native or gcam), opening qr code scanner app (uses camera), recording video in Telegram, starting video calls through Telegram, trying to rent a bike by scanning qr code within bike renting app etc. The screen just goes black for a while, then the phone reboots.

I have made three bug reports right after the phone rebooted from these crashes and able to attach them if needed. I am also able to make it crash and reboot and then share the logs.

Unable to find any reason why this started happening. Did not mess with camera settings. The last thing involving camera use right before the crashes started happening was id verificarion through Persona in Firefox browser.

I have tinkered a bit, but it did not help. I tried to install Pixel Camera Services from Google Play (it shows already installed in the settings, but does not show installed on Google Play), but it returned an error. I uninstalled gcam (and could not install it back from Google Play - returns an error), but crash-reboots still persist.

Phone: Pixel 8 Pro, Android 15 Build: 2024110700

thestinger commented 1 week ago

I have tinkered a bit, but it did not help. I tried to install Pixel Camera Services from Google Play (it shows already installed in the settings, but does not show installed on Google Play), but it returned an error. I uninstalled gcam (and could not install it back from Google Play - returns an error), but crash-reboots still persist.

Tinkering with things is a likely source of an issue since it works by default and this isn't happening for others.

thestinger commented 1 week ago

Pixel Camera Services is already included in the OS and doesn't need to be installed. Installing Pixel Camera will work fine. Perhaps you have a modded Pixel Camera app installed in other profiles or you have a newer version than what the Play Store is giving you in another profile.

CoffeeMan1ac commented 1 week ago

I have tinkered a bit, but it did not help. I tried to install Pixel Camera Services from Google Play (it shows already installed in the settings, but does not show installed on Google Play), but it returned an error. I uninstalled gcam (and could not install it back from Google Play - returns an error), but crash-reboots still persist.

Tinkering with things is a likely source of an issue since it works by default and this isn't happening for others.

I ment, I tried to solve the crash-reboots by trying to install Pixel Camera Services from Google Play, but it could not install. I then uninstalled gcam, and tried to reinstall it from Google Play, but it returns an error just like that for Pixel Camera Services

CoffeeMan1ac commented 1 week ago

Pixel Camera Services is already included in the OS and doesn't need to be installed. Installing Pixel Camera will work fine. Perhaps you have a modded Pixel Camera app installed in other profiles or you have a newer version than what the Play Store is giving you in another profile.

I dont have multiple users enabled. I have a work profile, but only ever installed Aurora Store, Instagram and WhatsApp there, so nothing like Camera Services. My gcam was installed from google play, as well, I have never installed anything outside Google Play, Aurora or F-Droid stores. The gcam is not the main issue. The crash-reboots persist even without gcam installed.

jmvermeulen commented 1 week ago

Reported the same issue:

https://github.com/GrapheneOS/os-issue-tracker/issues/3840 https://github.com/GrapheneOS/os-issue-tracker/issues/3761 https://github.com/GrapheneOS/os-issue-tracker/issues/3823

This does happens to others too.

thestinger commented 1 week ago

@jmvermeulen Those are each people reporting a hardware issue which is only resolved by a new device unless it was a temporary hardware glitch fixed by powering off.

thestinger commented 1 week ago

@CoffeeMan1ac You can try resetting app preferences in case you broke it changing a setting.

CoffeeMan1ac commented 6 days ago

@jmvermeulen update. The camera is still broken, whenever I use it in any app, it may work, but the odds are that it's going to crash, and reboot after ~30 seconds. Until today, I haven't gotten any crash messages (I guess the system doesn't have time to notify of crash as the phone is immediately shut off). Today, I don't know why or how, I haven't used the camera (too paranoid), I did get a crash notification and it looks similar to ones in #3840, #3761 and #3823. Here:

type: crash
osVersion: google/akita/akita:14/AP2A.240705.005/2024071200:user/release-keys
uid: 1000 (u:r:hal_camera_default:s0)
cmdline: /apex/com.google.pixel.camera.hal/bin/hw/android.hardware.camera.provider@2.7-service-google
processUptime: 0s

abortMessage: Check failed: it != this->end() 

signal: 6 (SIGABRT), code -1 (SI_QUEUE)
threadName: RunnerN:P+:A:0
MTE: not enabled

backtrace:
    /apex/com.android.runtime/lib64/bionic/libc.so (abort+168, pc 66ac8)
    /system/lib64/liblog.so (__android_log_default_aborter+16, pc 6360)
    /apex/com.google.pixel.camera.hal/lib64/libbase.so (android::base::LogMessage::~LogMessage()+352, pc 171a0)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b4b9d0)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b49354)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b48d64)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b466b4)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b3a0b4)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc b3a348)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc e529b8)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc e4f184)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc f002b0)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc f34e54)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc f368d8)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc edb510)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc a397a0)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc 59a7a8)
    /apex/com.google.pixel.camera.hal/lib64/liblyric_hwl.so (pc 59a6e8)
    /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204, pc 795dc)
    /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68, pc 69fa4)

Does it mean the phone has to be repaired?

Aquathing commented 4 days ago

My phone is currently in the RMA process for this exact error. Google couldn't diagnose it and emailed me asking me what the problem was, I replied with the crash log and how to reproduce, and I'm waiting for them to get back to me.

Aquathing commented 3 days ago

Google just cancelled the repair order, stating that the phone has no issues. image

UPDATE Google Support escalated the issue and will get back to me in 24-48 hours.

Aquathing commented 3 days ago

@thestinger while they analyze my report, could this be caused by one of the following?

thestinger commented 3 days ago

@Aquathing The issue often occurs randomly due to a hardware glitch so they may think it's just a software bug that will rarely happen. However, the same crash can be caused by a hardware failure and that's why it would happen repeatedly.

Camera app downloaded from Aurora Store (even though I recall this happening on Telegram too, which shouldn't use the Camera app directly)

It's an OS service crashing due to failure to communicate with hardware.

You probably just said something that caused them to wrongly believe it's only a software issue that will go away.

Aquathing commented 3 days ago

You probably just said something that caused them to wrongly believe it's only a software issue that will go away.

I have told them that the issue happens daily and provided them with the crash logs.

My guess is that they couldn't reproduce it for some reason. If you remember my other issue, this stopped happening for two days after updating to Android 15 and I could reproduce it only after opening the camera hundreds of times, after which it became daily again. Perhaps reinstalling the Stock OS is causing the same issue, and they do not have the time to reproduce it like I did. Sounds strange, but I'm really out of guesses.

I'll keep this ticket updated with what Google says in hope to help others too, if this is not an issue for you.

thestinger commented 3 days ago

It only happens for a tiny number of users. It happens rarely for some users and very commonly for others. In the past, we've had it confirmed that it kept happening for people with the stock OS. However, since it's intermittent, it can go away for a while. We think it's a hardware issue rather than a software bug. People with a severe case of it have checked stock OS and confirmed it is broken there too. For people where it only happens intermittently, it's hard to get reliable info since it can stop happening for a while. If it's something like a loose connection, it can come and go and the device being shaken, etc. might temporarily "fix" it.

Aquathing commented 3 days ago

I understand, I have suggested the person at Google who first contacted me asking for details that there could be some loose connection which causes the issues only in specific positions or movements. I will keep you updated.

Thank you for your fast answer, I will donate to the project as soon as it becomes financially viable for me!

Aquathing commented 2 days ago

Got back from Google.

Escalation team says this was done because they could not find an issue with the phone, which we already knew.

I replied to them asking to please have a more in-depth check, specifying that this started happening after I got the phone back from Google themselves from my first RMA!

thestinger commented 2 days ago

@Aquathing Tell them you think it's a loose connection to the camera and it only occurs intermittently.

Aquathing commented 2 days ago

This is what I told them. image

(I just noticed the extra "not" in the last phrase of the third paragraph, but they'll probably understand what I'm saying anyway or not even notice it at all.)

Aquathing commented 2 days ago

Got back from Google, here's their email: image

It looks like we're moving somewhere. I asked them to make sure that they will properly check the phone next time and provided them with my postal code.

I'm waiting for them to answer me back.

Aquathing commented 1 day ago

Update: Got back from Google again.

I now have another support agent (this is getting frustrating), who asked me if I want to proceed with mail-in repair. I have replied, asking them if they understood what's going on and provided them with a small recap, and asked them if they can provide this detailed information to the repair team. I'm waiting for them to come back.

Aquathing commented 1 day ago

I just received my phone, I'll take this as a chance to see if this happens with StockOS too.