freescale android kernel have scheduling problem !!!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

freescale android kernel have scheduling problem !!!

Jump to solution
21,237 Views
yangaaron
Contributor III

I wrote a very simple Android application(AndroidGLSurfaceViewActivity.apk).mainly use opengl use muti-thread to draw frame on the screen

I tried to run on the freescale platform ( i.mx6q , 1GB Ram , android 4.0.4 , hdmi 1080p output )

It can't run more than one hour will cause the system to crash. (Kernel panic or rcu_preempt_state detected stalls on CPUs/tasks).

but it can run all night on the Android Emulator and Samsung Galaxy Note 8.0


PS : Android apk and program source code and detailed error messages, see attached file

Original Attachment has been moved to: rcu_preempt_state-detected-stalls-on-CPUstasks.txt.zip

Original Attachment has been moved to: AndroidGLSurfaceViewActivity.apk.zip

Original Attachment has been moved to: AndroidGLSurfaceViewActivity.7z.zip

Original Attachment has been moved to: Kernel-panic--not-syncing-Fatal-exception.txt.zip

Tags (1)
1 Solution
9,173 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Aaron, please apply the attached two patches, from our test, the issue can be fixed.

View solution in original post

50 Replies
1,886 Views
Manu61
Contributor II

Hi DraganOstojic,

We are also facing same issue in i.MX 8MQ CPU, Board will hang if WDOG disable if WDOG is enabled board will reset without any error print.

Please let me know if issue found

BR,

MK

0 Kudos
Reply
2,982 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

What's the board and BSP that you used? And for the test, do you just run the AndroidGLSurfaceViewActivity.apk in this link?

0 Kudos
Reply
2,982 Views
DraganOstojic
Contributor V

Hi Qiang, I use Android ICS BSP 13.4.1 + 13.4.1.04 patches.

I use a custom board that is a similar to imx6q sabresd board. However  there are some changes in BSP because we use a different display, touch screen and both cameras are different. We also disabled a lot of services such as geo-location, bluetooth, wireless etc. We removed most of pre-installed applications and a launcher app so that we can run system with only our application (kiosk mode).

First our own application starts. After that, I manually start AndroidGLSurfaceViewActivity.apk. Aftet that I stop our own application. I have to do it that way because we removed launcher app so our app starts by default.

I built AndroidGLSurfaceViewActivity.apk from the sources provided in the link.

Let me know what you want me to try. I have sabresd and all original source code before we moved to the new board. I can run whatever software or hardware you suggest.

0 Kudos
Reply
2,982 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

We verified this issue on JB4.2.2_GA1.1.0 BSP, I'm not sure if there is some other patches related to this issue from R13.4.1 BSP to JB4.2.2 BSP.

0 Kudos
Reply
2,982 Views
DraganOstojic
Contributor V

Hi Qiang, do I need to apply p13 to JB4.2.2_GA1.1.0 before I try it?

0 Kudos
Reply
2,982 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Yes, GPU update was also needed.

0 Kudos
Reply
2,982 Views
DraganOstojic
Contributor V

Hi Qiang, I couldn't find JB4.2.2_GA1.1.0 on the Freescale site (currently only jb4.3.1 and kitkat4.4.2 are posted) so I tried android_jb4.3_1.1.0-ga directly downloaded and built as per instructions with the p13 applied (again as per Freescale post in the forum). I ran on the sabre-sd board. Unfortunately, I still get an exception "rcu_sched_state detected stalls".

This happened in less than 24h run. I attached a log file for your reference.

Is there anything else I could do or try?

0 Kudos
Reply
2,982 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Dragan, the JB4.3_1.1.0 kernel hasn't included the patch "0027-ENGR00306276-iMX6-Add-workaround-for-ARM-errata-7613.patch" too. This patch had been merged in KK 4.4.2 BSP.

And "0025-ENGR00295714-GPT-Status-register-bits-are-cleared-in.patch" was not included in JB4.3_1.1.0 BSP too.

2,981 Views
simon_cai
Contributor III

Hi Qiang_FSL LeonardoSandovalGonzalez

does Android 4.4.2 BSP fix out these problems??

i found that FSL release the "android_jb4.3_1.1.1-ga_source.tar" patch on fsl official imx6 website,

As what I understand, this jb4.3_1.1.1 patch is just for FSL Android 4.3 version.


while, what about FSL Android 4.4.2 BSP version??does this version need to do the patch??

FSL didnot release any patch about Android 4.4.2 on the official imx6 site ,

could i think that FSL Android 4.4.2 BSP have been merged all these patch?

AND, Could I consider that Android 4.4.2 BSP didnothave schedule problem。

AND,do I need to update GPU patch on Android 4.4.2 BSP?? something like p13 GPU patch. does android 4.4.2 merge with it??

0 Kudos
Reply
2,981 Views
simon_cai
Contributor III

HI Qiang_FSL

would you pls help to attach this patch 0025-ENGR00295714-GPT-Status-register-bits-are-cleared-in.patch?

thanks!!

0 Kudos
Reply
2,981 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

FYI

2,981 Views
DraganOstojic
Contributor V

Hi Qiang, I confirm that KK 4.4.2 doesn't have multi-core issue. Test that was previously failing on R13.4.1 is still running on KK 4.4.2 after 5d of continuous run. The best I got on R13.4.1 after applying all recommended patches was 3d.

Thank you for all your great help.

Dragan

0 Kudos
Reply
2,982 Views
DraganOstojic
Contributor V

Hi Qiang, I upgraded to p13 and let it run overnight. Unfortunately, an exception was generated and log was printed on the screen (see attached). It's original rcu_preempt_state detected stall. Interestingly, test app AndroidGLSurfaceViewActivity continues to run and system is responsive.

Now, it appears that in upgrade p13, patch 0027-ENGR00306276-iMX6-Add-workaround-for-ARM-errata-7613.patch is disabled by subsequent patch 0030-disable-errata-794072-and-761320-enable-errata-74223. Should I re-enable 0027 or you have some other suggestion?

0 Kudos
Reply
2,981 Views
DraganOstojic
Contributor V

Hi Qiang, thank you very much for replying. I'll upgrade to GPU lib and driver to lastest 4.6.9p13 and retest.

0 Kudos
Reply
2,982 Views
wallyyeh
Contributor V

This patches seems work for me.

our product had been running for 3 days without hang with these patches applied.

but these patches is not on freescale git, I wonder where these two patch come from?

0 Kudos
Reply
2,982 Views
karina_valencia
NXP Apps Support
NXP Apps Support

Qiang_FSL can you continue with the  follow up?

0 Kudos
Reply
2,985 Views
yangaaron
Contributor III

Hi , All

it could running over one week at now when i'm added args "maxcpus=0" in bootloader ( disable kernel symmetric multiprocessing (SMP)  feature )

so. that mean kernel indeed have scheduling problem , right ?

0 Kudos
Reply
2,983 Views
YixingKong
Senior Contributor IV

Aaron

Is your issue resolved? If yes, we will close the DI in 3 days. If not please keep exchanging message with right persons.

Thanks,

Yixing

0 Kudos
Reply
2,983 Views
yangaaron
Contributor III

Hello, Yixing

Not yet . Adopt disable kenrel smp feature approach, our customers will not accept

Freescale no propose root-cause solution

0 Kudos
Reply
2,980 Views
YixingKong
Senior Contributor IV

Aaron

Please write your issue and communicate with Leonardo and David Wu.

Regards,

Yixing

0 Kudos
Reply
2,992 Views
yangaaron
Contributor III

No, I would set up one.

Thank you.

0 Kudos
Reply