• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [ROM] Quattrimus JB (CM10, AOKP41)

Found some suspicious mutex code in the jb update that rmcc applied from CAF. Naturally, I enabled the mutex debugging options in the kernel to see what happens... and what happens is that the msm framebuffer code panics the kernel, for some reason that is not readily apparent. Apparently there's some really bad mojo in there that's going to be a huge pain in the backside to diagnose and fix. At this point, I don't even know who to blame... Qualcomm, LG, or CAF. :mad:
 
I fixed two mutex issues in the MDP (display) code. If anyone is running into bsod issues, please try these. All I ask is to report back on whether the fix worked, and to check if either of the below messages shows up in the kernel log (dmesg) at least a couple times per day. Simply run "adb shell dmesg | grep mutex" from your computer, or open a shell and run "dmesg | grep mutex" directly on the phone.

Diagnostic messages:

mdp4_overlay_play: mutex double unlock avoided

mdp4_dtv_overlay: spurious mutex_unlock avoided

Instructions:

1. You should be running Quattrimus CM10 or AOKP41 rc1, rc2, or rc3.
2. Download the appropriate boot image for your device from below.
3. Name the image boot.img
4. Reboot into recovery.
5. Run these commands exactly as shown:
adb push boot.img /
adb shell dd if=/boot.img of=/dev/block/mmcblk0p8 bs=4096
adb reboot

Index of /roms/quattrimus/iproj

dc5027c302f0b6e59c7d1d4ce9936c49 boot-i_atnt-aokp41.img
91d79518f4c7d6881a0e019ce9a3eba2 boot-i_atnt-cm10.img
64e148431d7c72d3282c7211f2ab3fcb boot-i_vzw-aokp41.img
3743619538ac87bede47494032cb840e boot-i_vzw-cm10.img
 
Would it be worth it to change to this boot image even if we haven't noticed a bsod? I've been working in the yard an average of 4-5 hours most days playing music through double twist on my phone so if its sound related... I should see something fairly quick. I could flash this if your just data mining right now.

If of course any data from someone who isn't experiencing bsods would be helpful.

Sent from my VS920 4G using Tapatalk 2
 
Would it be worth it to change to this boot image even if we haven't noticed a bsod? I've been working in the yard an average of 4-5 hours most days playing music through double twist on my phone so if its sound related... I should see something fairly quick. I could flash this if your just data mining right now.

If of course any data from someone who isn't experiencing bsods would be helpful.

Sent from my VS920 4G using Tapatalk 2

Sure, it wouldn't hurt.
 
I think I just witnessed a bsod happening real-time this morning.

I unlocked my phone and went to pull up an app, and the screen froze. No response from anything except the power button. But pressing the power button did turn off the screen, and then turn it back on again. I even waited about 10 seconds to check if the lock screen would engage, but it didn't. So I had some other things to do for the next 20 minutes and left it alone.

Then I picked it up again and the screen won't come on when I press the power button. adb connects, and it's got that weird issue where "ps" hangs. But the app is different (it's Google+ this time). Any attempt to access anything under /proc/<pid> that deals with the VM hangs. This includes cmdline and maps. But surprisingly, stat, statm, and status are okay....

# cat /proc/24462/stat
24462 (droid.apps.plus) D 205 205 0 0 -1 4196672 29250 0 24 0 381 87 0 0 20 0 18 0 8775412 497606656 24216 4294967295 32768 37120 3203951632 3203950500 1074693472 0 4612 0 38120 4294967295 0 0 17 1 0 0 0 0 0
# cat /proc/24462/statm
121486 24216 3868 2 0 6739 0
# cat /proc/24462/status
Name:droid.apps.plus
State&#65532; (disk sleep)
Tgid:24462
Pid:24462
PPid:205
TracerPid:0
Uid:10008100081000810008
Gid:10008100081000810008
FDSize:256
Groups:1006 1015 1028 3002 3003
VmPeak: 489976 kB
VmSize: 485944 kB
VmLck: 0 kB
VmHWM: 96864 kB
VmRSS: 96864 kB
VmData: 26820 kB
VmStk: 136 kB
VmExe: 8 kB
VmLib: 28092 kB
VmPTE: 194 kB
VmSwap: 0 kB
Threads:18
SigQ:0/5924
SigPnd:0000000000000000
ShdPnd:0000000000000000
SigBlk:0000000000001204
SigIgn:0000000000000000
SigCgt:00000002000094e8
CapInh:0000000000000000
CapPrm:0000000000000000
CapEff:0000000000000000
CapBnd:ffffffffffffffff
Cpus_allowed:3
Cpus_allowed_list:0-1
voluntary_ctxt_switches:228
nonvoluntary_ctxt_switches:285

So next I killed surfaceflinger and the bootanim comes up, but won't go away. And that pesky 24462 process is still hanging around causing trouble.

Tried to run "sync". It hangs.

Tried to unmount filesystems. Seems like ext4 read/write filesystems hang (/mpt, /tombstones) but readonly fat filesystems don't (/firmware).

It seems like there is a lock that is held but never released. Possibly in the filesystem code. But I'm sure it won't be easy to find.

I think I had close to the same issue. My phone was on the charger while I took a nap. When I got up, I went to see if I had missed any calls or texts and the screen was black. I tried power a couple times no dice. I forced it off and still couldn't get it back. pulled battery. rebooted got the boot animation issue where I couldn't get into user space. Hard reboot via power and left the phone by itself and it booted. scary
 
Same issue on my phone yesterday, black screen, tried the power button, finally just pulled the battery, and it booted after a bit.
 
Sure, it wouldn't hurt.

Incorrect. Apparently it did hurt :p

So I flashed the new boot.img. This gave me the hanging boot animation (odd since I'd had it disabled unless the boot.img affected that somehow). I went ahead and ADB'd in and did a dmesg dump. Being that the only thing that changed was this new boot.img I then took the original boot.img (from the downloaded zip) and moved that back over then did another dmesg dump.

I'm unsure if these will help at all or if there's something else I should be looking at to provide you more information.

I was going to just post the compare changes, but there seems to be a lot of them.
New Boot:
New_Boot - Pastebin.com
Original Boot:
Original Boot - Pastebin.com

I'd mess with it more, but I use my phone as my alarm clock so I don't want to brick it for the night.

*edit*
Ok, maybe this isn't necessarily related to the new boot.img. I was playing with bootanimations by pushing them to /data/local/bootanimation.zip to get rid of the pink unicorn and everytime I put a new bootanimation in there it does the same bootanimation loop thing, even with the original boot.img. Not sure why, but figured it might be worth mentioning. Also, anytime it bootanimation loops, the screen will timeout and the power button brings it back to the bootanimation. Removing the /data/local/bootanimation.zip through adb and rebooting through adb makes it boot perfectly fine again.
 
Incorrect. Apparently it did hurt :p

So I flashed the new boot.img. This gave me the hanging boot animation (odd since I'd had it disabled unless the boot.img affected that somehow). I went ahead and ADB'd in and did a dmesg dump. Being that the only thing that changed was this new boot.img I then took the original boot.img (from the downloaded zip) and moved that back over then did another dmesg dump.

I'm unsure if these will help at all or if there's something else I should be looking at to provide you more information.

I was going to just post the compare changes, but there seems to be a lot of them.
New Boot:
New_Boot - Pastebin.com
Original Boot:
Original Boot - Pastebin.com

I'd mess with it more, but I use my phone as my alarm clock so I don't want to brick it for the night.

*edit*
Ok, maybe this isn't necessarily related to the new boot.img. I was playing with bootanimations by pushing them to /data/local/bootanimation.zip to get rid of the pink unicorn and everytime I put a new bootanimation in there it does the same bootanimation loop thing, even with the original boot.img. Not sure why, but figured it might be worth mentioning. Also, anytime it bootanimation loops, the screen will timeout and the power button brings it back to the bootanimation. Removing the /data/local/bootanimation.zip through adb and rebooting through adb makes it boot perfectly fine again.

So... are you able to run the test kernel now, or did you give up?

And has anyone else used this successfully yet?
 
So... are you able to run the test kernel now, or did you give up?

And has anyone else used this successfully yet?

Give up? Nah. I don't know how much anything I can provide could really help. But, I did end up getting it to boot with the test kernel. Didn't do anything different, just re-copied it over. Kinda odd.

This line in my dmesg for boot changed, even with the last time I had flashed it when it looped on the animation, this line was the same as the original kernel (changed from 4 to 2 not 2 to 1). Only thing I've noticed so far.
<6>[ 72.812347] mdp4_overlay_mdp_perf_upd mdp bw is changed [1] from 2 to 1


However, I'm headed to bed. I'll look for the mutex dmesg entries throughout tomorrow and post anything I get. However, I hadn't been having any bsods. So I can't gurantee any useful info.
 
  • Like
Reactions: tdm
I fixed two mutex issues in the MDP (display) code. If anyone is running into bsod issues, please try these. All I ask is to report back on whether the fix worked, and to check if either of the below messages shows up in the kernel log (dmesg) at least a couple times per day. Simply run "adb shell dmesg | grep mutex" from your computer, or open a shell and run "dmesg | grep mutex" directly on the phone.

Diagnostic messages:

mdp4_overlay_play: mutex double unlock avoided

mdp4_dtv_overlay: spurious mutex_unlock avoided

I put the new boot.img on the phone. The phone had CM10 rc3 and I had not seen the black screen failure. I did have the black screen issue right after I put CM10 rc1 on the phone. rc3 has been on the phone since the day you put the link and I've not had any problems. booted right up first time.

I am not seeing any mutex lines in dmesg. I will keep checking.

Thank you TDM for all you do! :)
 
  • Like
Reactions: tdm
It doesn't list vs920. Are you indicating that this should flash on the spectrum?

Sent from my VS920 4G using Tapatalk 2
 
It doesn't list vs920. Are you indicating that this should flash on the spectrum?
*TDM beat me to it*

I'm currently running a 4.2 rom on my Gnex and I think the 4.1 roms I used actually ran better, so I wouldn't be in any huge rush to get on 4.2 on the Spectrum, personally. 4.2 still seems to have some inherent bugs of its own.
 
Yeah. I've never really understood the cross device portability. Thought/hoped maybe since it had been posted here it might be cross flashable or something.
Glad i asked first :)

Also. Still no mutex entries in my dmesg yet since last night on Aokp41 rc3 with your test kernel.

Sent from my VS920 4G using Tapatalk 2
 
  • Like
Reactions: tdm
All in a day's work.
 

Attachments

  • Screenshot-CM10.1.jpg
    Screenshot-CM10.1.jpg
    33.2 KB · Views: 166
is radio working?!?

if so, eta please :p

Thanks for getting this together mr tdm. I look forward to trying it out.

Everything seems to be working, except GPS of course -- I can't test that because I want to keep my phone pristine for investigation:
* wifi works
* bluetooth seems to work but I didn't pair with anything yet
* radio seems to work, in that it says no sim, no service, roaming which is normal for me
* front and back cameras work

Here's the plan:

I'll do a rebuild in the morning and toss out CM10.1 in a new thread. I'm dropping i_skt and i_lgu for the moment until I can get some things ironed out with the users on xda, so the build will be only for i_atnt and i_vzw.

Next I'll move on to AOKP42 and see about setting up nightly builds.

I will plan on continuing to support CM10.0/AOKP41 and continuing to fix bugs in both. The BSOD and reboot issues and bluetooth mac are on top of my todo list.
 
Everything seems to be working, except GPS of course -- I can't test that because I want to keep my phone pristine for investigation:
* wifi works
* bluetooth seems to work but I didn't pair with anything yet
* radio seems to work, in that it says no sim, no service, roaming which is normal for me
* front and back cameras work

Here's the plan:

I'll do a rebuild in the morning and toss out CM10.1 in a new thread. I'm dropping i_skt and i_lgu for the moment until I can get some things ironed out with the users on xda, so the build will be only for i_atnt and i_vzw.

Next I'll move on to AOKP42 and see about setting up nightly builds.

I will plan on continuing to support CM10.0/AOKP41 and continuing to fix bugs in both. The BSOD and reboot issues and bluetooth mac are on top of my todo list.

Roger that.

Thanks for the feedback. I'm very much looking forward to trying it out.
 
Just an update. 2 days with the test kernel for that mutex thing SBD still not a single entry in dmesg for it. Been checking a few times a day and nothing at all has shown.

Sent from my VS920 4G using Tapatalk 2
 
  • Like
Reactions: tdm
I had a random reboot today then the bootanimation hung rotating the phone to landscape would show half the homescreen and half the bootanimation, going back would just be the full bootanimation. I pulled everything in /data/local/tmp but wasn't sure what I should send/post as I assume that it would be the .1/.2/.3 of each file. However, I noticed that in logcat_radio at least it contained some personal info (phone number at least jumped out at me), I don't really care about people getting my phone number. I just always worry about phone cloning and such.

Which files are actually needed to help you diagnose this?

*edit*
Actually, just went ahead and PMd you a link to a zip with all the files.
 
Back
Top Bottom