sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Xperia XZ1 Compact - Random Reboots #364

Closed wyzco closed 5 years ago

wyzco commented 5 years ago

Platform: Lilac Device: Xperia XZ1 Compact Kernel version: 4.9.162 Android version: 9.0

Description Random Reboot occurs during regular browsing and when device is unattended (sleeping) as well. I have attached the dmes, event, logcat and modem logs of my device between the time 13:04:39.712 to 13:04:40.737 there were calls which triggered a restart of the device (XZ1 Compact). dmesg.log event.log logcat.log modem.log

Symptoms Write the symptoms here.

How to reproduce Write how to reproduce here.

stefanhh0 commented 5 years ago

I can confirm this. After the zram fixes Yoshino/Lilac is a lot more stable in general but still it crashes and reboots from time to time which I have been ignoring and wanted to report only after availability of v8 in case it is still reproducible with it. However the crashes/reboots are not BT related, since it also happens when BT is deactivated. Currently I have no pstore logs available but will provide those infos as soon as I have them available for a more or less uptodate aosp with the current kernel (4.9.166).

YuriyMosiychuk commented 5 years ago

+1, Confirm on Suzu, Loire platform. I Think all devices affected.

stefanhh0 commented 5 years ago

Platform: Yoshino Device: Lilac Kernel version: 4.9.166-gb62e061b9a47 Android version: android-9.0.0_r35 OEM Image: SW_binaries_for_Xperia_Android_9.0_2.3.2_v7_yoshino.img Build: aosp_g8441-userdebug 9 PQ2A.190405.003 eng.stefan.20190402.235435 Version baseband: 1307-7511_47.1.A.16.20

Description An intermediate crash/reboot occurred. I haven't observed it since I was sleeping while it happened (it happened according to logcat around: 04-06 03:16:48), I have just realized this morning that the phone rebooted and saved the pstore contents. Please be aware that #343 could also be involved here, reason for that is that I have reported in that issue that the phone boots sometimes twice. I assume the double reboot because the vibrator is activated twice. So if that happened here as well, then the following would have happened if I am correct (pls tell me if I am wrong!):

  1. crash / reboot -> writing crash logs to pstore
  2. crash / reboot -> original pstore logs are wiped and crash logs in pstore are written from the 2nd crash

So I can't say whether or not the provided pstore is the one from the original crash/reboot or if the double reboot issue happened and is from the 2nd crash/reboot.

When it happened BT was deactivated, no music was playing and also no other active user interaction was ongoing since I was sleeping. WLAN and phone network / carrier was switched on. The Phone wasn't connected to USB. Probably it has to have happen while the phone was sleeping as well like me if it succesfully activated sleep which I can't say for sure.

Another interesting thing I found is that the logcat has entries at the beginning of the log from march that should not be there or are at least a surprise to me:

[...]
03-22 17:39:47.332   718   718 I wificond: wificond is starting up...
04-06 03:16:48.026   704   704 I installd: installd firing up
[...]

Between 22nd of march and 6th of april I rebooted several times and even flashed the phone several times (though never cleaned userdata) I am wondering where those entries come from. 22nd could very well be the day when I installed SW_binaries_for_Xperia_Android_9.0_2.3.2_v7_yoshino.img so maybe it is coming from that partition? At least I haven't touched the oem partition since then.

Symptoms crash /reboot and files can be found in /sys/fs/pstore

How to reproduce I don't know a recipe to trigger it explicitly it just happens sometimes.

Files pstore.tar.gz logcat.log

russel5 commented 5 years ago

This issue was here since android 9 was released in this aosp project, and no one know how to fix this

stefanhh0 commented 5 years ago

Today after another crash and reboot I have been able to save possibly more interesting pstore files as last time. See: pstore.tar.gz

This time the phone was not sleeping and in interactive use (I was writing a message). The phone was connected to the phone carrier but WLAN, BT, GPS, USB and Music playing were not involved. Same version as reported in my previous comment.

VictorRyabov commented 5 years ago

The issue confirmed by at least 6 users on 4pda forums including me. We are all using 16.20 firmware as @jerpelea advised

jerpelea commented 5 years ago

thanks for the report we are looking into it

djselbeck commented 5 years ago

My lilac device just froze and never recovered. Was stuck at the sony logo (black on white) and rebooted.

I tried to reflash all AOSP images (including oem and userdata) and nothing helped.

Finally emma reflash helped and the device bootet up with stock firmware

djselbeck commented 5 years ago

Reflashing AOSP does also not work after I flashed stock rom.

VictorRyabov commented 5 years ago

My lilac device just froze and never recovered. Was stuck at the sony logo (black on white) and rebooted.

I tried to reflash all AOSP images (including oem and userdata) and nothing helped.

Finally emma reflash helped and the device bootet up with stock firmware

BTW This also happened to me twice.

djselbeck commented 5 years ago

But i am unable to boot my last built AOSP (4th april), doing a rebuild and a reinstall then

djselbeck commented 5 years ago

It was stuck trying to boot, reboot into fastboot and then the same again.

Now I connected it to an power supply and the device bootet AOSP. Very strange behavior, never observed this before

VictorRyabov commented 5 years ago

It was stuck trying to boot, reboot into fastboot and then the same again.

Now I connected it to an power supply and the device bootet AOSP. Very strange behavior, never observed this before

Yep, the device will boot into OS only when plugged in. Try to flash 16.20 using newflasher\Flashtool, set it up and reflash AOSP. I've managed to correctly flash and boot AOSP after randomly trying for 3 weeks-it was very inconsistent for me.

djselbeck commented 5 years ago

16.20 flashed with emma works just fine. Power off, reboot everything. I will try AOSP again and if it is not working I will suspend the lilac device for some time as I have to go to a business trip :D

djselbeck commented 5 years ago

I got into recovery and there were a lot of errors that it cannot mount any partition, maybe this is related?

djselbeck commented 5 years ago

For no reasons the device will now boot again without power plugged in. This is really spooky behavior. I will better use my kagura for the time being

djselbeck commented 5 years ago

The device is not booting again. It is practically dead for the use with AOSP. If I can help debugging I am willing to. But it looks like the kernel is not even booting android as it reboots after the sony logo before the android logo. Perhaps some storage issue. It boots reliable with power connected (from a real supply not from PC)

stefanhh0 commented 5 years ago

@djselbeck Sorry to hear that, however this seems to me like something different than the random reboot issue and I guess it would make sense to report it in a dedicated issue.

Just throwing in some ideas:

Alin always mentions to boot with a sim card inserted after flashing the stock. But if I remember correctly it has just a cosmetical effect and sets the version baseband correctly in case one has changed it before.

stefanhh0 commented 5 years ago

@djselbeck okay, some of my points on the check list do not apply since it works sometimes for you.... sorry for not having read it closely...

djselbeck commented 5 years ago

@stefanhh0 Thanks for your reply. Regardings the thins related to AOSP build process. The image that is not booting anymore, booted before for days and I tried older images from March 8th which also booted at the time. They all don't work anymore.

I flashed cache but I always did. But I also tried formatting cache with fastboot etc. It all does not change a thing. The device boots if connected to power supply but fails to boot if connected to a PC or not at all.

358 is not related I guess, as I also tried booting the device without an SD and without an SIM, without any changes. If it is a storage problem, it is only related to the internal flash. From what I can say, I suspect it is a problem of the 4.9 AOSP kernel, as TWRP (boots via fastboot boot twrp-sth.img) is probably using an older kernel (it was a twrp build by XDA user modpunk) and Stock also uses 4.4 kernel.

jerpelea commented 5 years ago

@djselbeck v8 is released ! please rebuild and test

stefanhh0 commented 5 years ago

No random reboot after uptime >18h. I'll give an update later as 18h is not that much yet.

But it is a good start, since the reboots have been a lot more frequent with the other more recent AOSP builds.

stefanhh0 commented 5 years ago

Since 18.04. (v8) I haven't experienced any other crashes + random reboots. I have only observed those related to:

So from my point of view this here seems to be fixed.

YuriyMosiychuk commented 5 years ago

Not fixed on suzu, loire platform. Build from 20 april + v8. I have two reboots the last day.

stefanhh0 commented 5 years ago

@YuriyMosiychuk you should open then a new loire/suzu specific case with your findings (pstore logs of the crash and what you did when the crash occurred).