So I think this issue may be Android kernel related, because we seem to be the only ones hitting it. This seems to imply that there's a kernel change we don't have or the kernel has changed in our newer versions. The symptom is:
W/SchedPolicy( 1193): add_tid_to_cgroup failed to write '1263' (Permission denied); policy=1 W/ActivityManager( 1193): Failed setting process group of 1263 to -1 W/System.err( 1193): java.lang.SecurityException: No permission to set to given group W/System.err( 1193): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903) W/System.err( 1193): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089) W/System.err( 1193): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472) W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269) W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317) W/System.err( 1193): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386) W/System.err( 1193): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675) W/System.err( 1193): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1193): at dalvik.system.NativeStart.run(Native Method)
Looking back at top:
I have:
1193 0 0% S 70 548684K 42168K fg system system_server 1263 0 0% S 13 476904K 36216K fg u0_a27 com.android.systemui
so system_server is attempting to write com.android.systemui and its getting an error. The relevant native function seems to be:
/workspace/androids/4_juice-aosp/system/core/libcutils/sched_policy.c
I saw that Tixy also hit this,
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037611
..but that the bug never got assigned, etc...
I tried setting:
chmod 0660 /dev/cpuctl/tasks
to
chmod 0666 /dev/cpuctl/tasks
but didn't see any difference.
This change from the Android automerger, seems to be related:
https://android.googlesource.com/platform/system/core/+/d7562ee3d61504ba5d2f...
I also found what appears to be a workaround:
https://android.googlesource.com/platform/frameworks/native/+/f30fd01497a53c...
Looking at additional logs I see what looks like an attempt to put the process that needs to get changed into the right group:
W/System.err( 1192): java.lang.SecurityException: No permission to set to given group W/System.err( 1192): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903) W/System.err( 1192): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089) W/System.err( 1192): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472) W/SchedPolicy( 1192): add_tid_to_cgroup failed to write '1268' (Permission denied); policy=1 W/ActivityManager( 1192): Failed setting process group of 1268 to -1 W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269) W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317) W/System.err( 1192): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386) W/System.err( 1192): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675) W/System.err( 1192): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1192): at dalvik.system.NativeStart.run(Native Method)
1192 0 0% S 71 549636K 42460K fg system system_server 1268 0 0% S 14 477920K 36224K fg u0_a27 com.android.systemui
From these logs I think system_server is trying to put
com.android.systemui into the bg because its using a lot of CPU, but it can't because it either doesn't have access or something else is going on.
Anyhow, attached some logs from a first boot scenario.
Any help or insight would be great.
Look at section "# Create cgroup mount points for process groups" of an unmodified AOSP recent version of platform/system/core/rootdir/init.rc
p.s. please don't use the previous email address
On Friday, January 18, 2013 5:56:16 PM UTC-8, Zach Pfeffer wrote:
So I think this issue may be Android kernel related, because we seem to be the only ones hitting it. This seems to imply that there's a kernel change we don't have or the kernel has changed in our newer versions. The symptom is:
W/SchedPolicy( 1193): add_tid_to_cgroup failed to write '1263' (Permission denied); policy=1 W/ActivityManager( 1193): Failed setting process group of 1263 to -1 W/System.err( 1193): java.lang.SecurityException: No permission to set to given group W/System.err( 1193): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516)
W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636)
W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903)
W/System.err( 1193): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089)
W/System.err( 1193): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472)
W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269)
W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317)
W/System.err( 1193): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386)
W/System.err( 1193): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675)
W/System.err( 1193): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1193): at dalvik.system.NativeStart.run(Native Method)
Looking back at top:
I have:
1193 0 0% S 70 548684K 42168K fg system system_server 1263 0 0% S 13 476904K 36216K fg u0_a27 com.android.systemui
so system_server is attempting to write com.android.systemui and its getting an error. The relevant native function seems to be:
/workspace/androids/4_juice-aosp/system/core/libcutils/sched_policy.c
I saw that Tixy also hit this,
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037611
..but that the bug never got assigned, etc...
I tried setting:
chmod 0660 /dev/cpuctl/tasks
to
chmod 0666 /dev/cpuctl/tasks
but didn't see any difference.
This change from the Android automerger, seems to be related:
https://android.googlesource.com/platform/system/core/+/d7562ee3d61504ba5d2f...
I also found what appears to be a workaround:
https://android.googlesource.com/platform/frameworks/native/+/f30fd01497a53c...
Looking at additional logs I see what looks like an attempt to put the process that needs to get changed into the right group:
W/System.err( 1192): java.lang.SecurityException: No permission to set to given group W/System.err( 1192): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516)
W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636)
W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903)
W/System.err( 1192): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089)
W/System.err( 1192): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472)
W/SchedPolicy( 1192): add_tid_to_cgroup failed to write '1268' (Permission denied); policy=1 W/ActivityManager( 1192): Failed setting process group of 1268 to -1 W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269)
W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317)
W/System.err( 1192): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386)
W/System.err( 1192): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675)
W/System.err( 1192): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1192): at dalvik.system.NativeStart.run(Native Method)
1192 0 0% S 71 549636K 42460K fg system system_server 1268 0 0% S 14 477920K 36224K fg u0_a27 com.android.systemui
From these logs I think system_server is trying to put com.android.systemui into the bg because its using a lot of CPU, but it can't because it either doesn't have access or something else is going on.
Anyhow, attached some logs from a first boot scenario.
Any help or insight would be great.
-- Zach Pfeffer Android Platform Team Lead, Linaro Platform Teams Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#%21/linaroorg - http://www.linaro.org/linaro-blog
On Fri, 2013-01-18 at 18:13 -0800, Glenn Kasten wrote:
Look at section "# Create cgroup mount points for process groups" of an unmodified AOSP recent version of platform/system/core/rootdir/init.rc
So, there seems to be a missing chmod, which seems to fix things...
--- /data/src/android/out/target/product/vexpress/root/init.rc 2013-01-22 16:15:57.000000000 +++ /home/tixy/initrd/init.rc 2013-01-22 16:43:56.000000000 @@ -101,12 +101,13 @@ write /proc/sys/kernel/sched_rt_period_us 1000000
# Create cgroup mount points for process groups mkdir /dev/cpuctl mount cgroup none /dev/cpuctl cpu chown system system /dev/cpuctl + chmod 0660 /dev/cpuctl chown system system /dev/cpuctl/tasks chmod 0660 /dev/cpuctl/tasks write /dev/cpuctl/cpu.shares 1024 write /dev/cpuctl/cpu.rt_runtime_us 950000 write /dev/cpuctl/cpu.rt_period_us 1000000
p.s. please don't use the previous email address
On Friday, January 18, 2013 5:56:16 PM UTC-8, Zach Pfeffer wrote: So I think this issue may be Android kernel related, because we seem to be the only ones hitting it. This seems to imply that there's a kernel change we don't have or the kernel has changed in our newer versions. The symptom is: W/SchedPolicy( 1193): add_tid_to_cgroup failed to write '1263' (Permission denied); policy=1 W/ActivityManager( 1193): Failed setting process group of 1263 to -1 W/System.err( 1193): java.lang.SecurityException: No permission to set to given group W/System.err( 1193): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636) W/System.err( 1193): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903) W/System.err( 1193): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089) W/System.err( 1193): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472) W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269) W/System.err( 1193): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317) W/System.err( 1193): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386) W/System.err( 1193): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675) W/System.err( 1193): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1193): at dalvik.system.NativeStart.run(Native Method) Looking back at top: I have: 1193 0 0% S 70 548684K 42168K fg system system_server 1263 0 0% S 13 476904K 36216K fg u0_a27 com.android.systemui so system_server is attempting to write com.android.systemui and its getting an error. The relevant native function seems to be: /workspace/androids/4_juice-aosp/system/core/libcutils/sched_policy.c I saw that Tixy also hit this, https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037611 ..but that the bug never got assigned, etc... I tried setting: chmod 0660 /dev/cpuctl/tasks to chmod 0666 /dev/cpuctl/tasks but didn't see any difference. This change from the Android automerger, seems to be related: https://android.googlesource.com/platform/system/core/+/d7562ee3d61504ba5d2f... I also found what appears to be a workaround: https://android.googlesource.com/platform/frameworks/native/+/f30fd01497a53c... Looking at additional logs I see what looks like an attempt to put the process that needs to get changed into the right group: W/System.err( 1192): java.lang.SecurityException: No permission to set to given group W/System.err( 1192): at android.os.Process.setProcessGroup(Native Method) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13516) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:13636) W/System.err( 1192): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1903) W/System.err( 1192): at com.android.server.am.ActiveServices.realStartServiceLocked(ActiveServices.java:1089) W/System.err( 1192): at com.android.server.am.ActiveServices.attachApplicationLocked(ActiveServices.java:1472) W/SchedPolicy( 1192): add_tid_to_cgroup failed to write '1268' (Permission denied); policy=1 W/ActivityManager( 1192): Failed setting process group of 1268 to -1 W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4269) W/System.err( 1192): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4317) W/System.err( 1192): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:386) W/System.err( 1192): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1675) W/System.err( 1192): at android.os.Binder.execTransact(Binder.java:351) W/System.err( 1192): at dalvik.system.NativeStart.run(Native Method) 1192 0 0% S 71 549636K 42460K fg system system_server 1268 0 0% S 14 477920K 36224K fg u0_a27 com.android.systemui From these logs I think system_server is trying to put com.android.systemui into the bg because its using a lot of CPU, but it can't because it either doesn't have access or something else is going on. Anyhow, attached some logs from a first boot scenario. Any help or insight would be great. -- Zach Pfeffer Android Platform Team Lead, Linaro Platform Teams Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#%21/linaroorg - http://www.linaro.org/linaro-blog
linaro-android@lists.linaro.org