The simplest way to see the problem (the following works as expected on a desktop system, creating the cgroup and resulting in no error output):
$ id uid=32011(phablet) gid=32011(phablet) groups=32011(phablet),4(adm),5(tty),20(dialout),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),114(autopilot),1001(radio),1002(bluetooth),1003(android_graphics),1004(android_input),1005(audio),1013(android_media),1015(sdcard_rw),1021(gps),2001(android_cache),3002(android_net3),3003(android_net),3004(android_net2),9997(android_nvram) $ cgm create freezer freeze-me call to cgmanager_create_sync failed: invalid request
And here's the cgmanager.log entry for the above request:
got creds pid 12565 (32011:32011) do_create_main: do_create_main:263: controller='freezer', cgroup='freeze-me', ucred p=(pid=638, uid=0, gid=0), ucred r=(pid=12565, uid=32011, gid=32011) do_create_main: do_create_main:273 do_create_main: do_create_main:279 do_create_main: do_create_main:288 do_create_main: do_create_main:318: r.pid=12565, r.uid=32011, r.gid=32011, dirpath='/run/cgmanager/fs/freezer' may_access: may_access:925:uid=32011, gid=32011, path='/run/cgmanager/fs/freezer', mode=2 may_access: may_access:931: (O_RDONLY=0, O_RDWR=2, O_WRONLY=1) may_access: may_access:944:sb.st_uid=0, sb.st_gid=0, sb.st_mode=16877 (0x41ed) may_access: may_access:950 may_access: may_access:962 may_access: may_access:988 may_access: may_access:1014 may_access: may_access:1019 may_access: may_access:1024 may_access: may_access:1029 cgmanager.jodh:do_create_main: pid 12565 (uid 32011 gid 32011) may not create under /run/cgmanager/fs/freezer
The simplest way to see the problem (the following works as expected on a desktop system, creating the cgroup and resulting in no error output):
$ id 32011(phablet) ,4(adm) ,5(tty) ,20(dialout) ,24(cdrom) ,27(sudo) ,30(dip) ,44(video) ,46(plugdev) ,114(autopilot) ,1001(radio) ,1002(bluetooth ),1003( android_ graphics) ,1004(android_ input), 1005(audio) ,1013(android_ media), 1015(sdcard_ rw),1021( gps),2001( android_ cache), 3002(android_ net3),3003( android_ net),3004( android_ net2),9997( android_ nvram) create_ sync failed: invalid request
uid=32011(phablet) gid=32011(phablet) groups=
$ cgm create freezer freeze-me
call to cgmanager_
And here's the cgmanager.log entry for the above request:
got creds pid 12565 (32011:32011) 'freezer' , cgroup='freeze-me', ucred p=(pid=638, uid=0, gid=0), ucred r=(pid=12565, uid=32011, gid=32011) '/run/cgmanager /fs/freezer' 925:uid= 32011, gid=32011, path='/ run/cgmanager/ fs/freezer' , mode=2 944:sb. st_uid= 0, sb.st_gid=0, sb.st_mode=16877 (0x41ed) jodh:do_ create_ main: pid 12565 (uid 32011 gid 32011) may not create under /run/cgmanager/ fs/freezer
do_create_main: do_create_main:263: controller=
do_create_main: do_create_main:273
do_create_main: do_create_main:279
do_create_main: do_create_main:288
do_create_main: do_create_main:318: r.pid=12565, r.uid=32011, r.gid=32011, dirpath=
may_access: may_access:
may_access: may_access:931: (O_RDONLY=0, O_RDWR=2, O_WRONLY=1)
may_access: may_access:
may_access: may_access:950
may_access: may_access:962
may_access: may_access:988
may_access: may_access:1014
may_access: may_access:1019
may_access: may_access:1024
may_access: may_access:1029
cgmanager.