Bug#859613: cgm gettasks not working properly
On Tue, Apr 11, 2017 at 03:35:54PM +0200, Svenja Otten wrote: > Am Wed, 5 Apr 2017 08:51:09 -0500 > schrieb "Serge E. Hallyn" : > > > My guess would be that your new login is in a different cgroup from the > > old. The path 'user.slice/user-1000.slice' is relative to your current > > path. What does > > > > cgm getpidcgroupabs memory $$ > > > > show before and after logging back in? > > ok, I tried it out. > > Before logging out: > -- > root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice > 13099 > 13101 > 13102 > 13104 > 13105 > > root@debian-test:~# cgm getpidcgroupabs memory $$ > / > -- > > After logging back in: > -- > root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice > call to cgmanager_get_tasks_sync failed: invalid request > > root@debian-test:~# cgm getpidcgroupabs memory $$ > /user.slice/user-0.slice > -- > > But how how does it work after logging back in? This is odd. Are you logging in the same way both times? how exactly are you logging in? (ssh, console, lightdm or the like?) As which user? Certainly user-0.slice seems wrong. You do seem to have multiple things installed at the same time which can upset each other. In the first email you showed 'cgget', which comes from libcgroup, and showed /etc/systemd/system/user-1000.slice.d/MemoryLimit.conf which comes from systemd. Note that if you are using systemd you should definately not be using cgmanager. Both will be trying to set up cgroups and will walk over each other. And libcgroup AFAIK is unmaintained for several years now. It existed before either systemd or cgmanager, so if it is set up to setup cgroups it will definately cause trouble.
Bug#859613: cgm gettasks not working properly
Am Wed, 5 Apr 2017 08:51:09 -0500 schrieb "Serge E. Hallyn" : > My guess would be that your new login is in a different cgroup from the > old. The path 'user.slice/user-1000.slice' is relative to your current > path. What does > > cgm getpidcgroupabs memory $$ > > show before and after logging back in? ok, I tried it out. Before logging out: -- root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice 13099 13101 13102 13104 13105 root@debian-test:~# cgm getpidcgroupabs memory $$ / -- After logging back in: -- root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice call to cgmanager_get_tasks_sync failed: invalid request root@debian-test:~# cgm getpidcgroupabs memory $$ /user.slice/user-0.slice -- But how how does it work after logging back in? best regards, Svenja Otten.
Bug#859613: cgm gettasks not working properly
Quoting Svenja Otten (ot...@global-village.de): > Package: cgmanager > Version: 0.33-2+deb8u2 > > Hi, > > the "cgm gettasks" command does not always work as expected. > I set up a memory limit of 64MB for the user with uid 1000: > > root@debian-test:~# cat /etc/systemd/system/user-1000.slice.d/MemoryLimit.conf > [Slice] > MemoryLimit=67108864 > > It is set up at reboot, as I can see (with the user logged in): > > root@debian-test:~# cgget -g memory:/user.slice/user-1000.slice > /user.slice/user-1000.slice: > memory.pressure_level: > memory.use_hierarchy: 1 > memory.swappiness: 60 > memory.memsw.failcnt: 0 > memory.limit_in_bytes: 67108864 > memory.memsw.max_usage_in_bytes: 3182592 > memory.usage_in_bytes: 2670592 > memory.memsw.limit_in_bytes: 18446744073709551615 > memory.failcnt: 0 > memory.force_empty: > memory.memsw.usage_in_bytes: 2670592 > memory.max_usage_in_bytes: 3182592 > memory.numa_stat: total=652 N0=652 > file=0 N0=0 > anon=652 N0=652 > unevictable=0 N0=0 > hierarchical_total=652 N0=652 > hierarchical_file=0 N0=0 > hierarchical_anon=652 N0=652 > hierarchical_unevictable=0 N0=0 > memory.oom_control: oom_kill_disable 0 > under_oom 0 > memory.stat: cache 0 > rss 2670592 > rss_huge 0 > mapped_file 0 > writeback 0 > swap 0 > pgpgin 1285 > pgpgout 633 > pgfault 2744 > pgmajfault 0 > inactive_anon 0 > active_anon 2670592 > inactive_file 0 > active_file 0 > unevictable 0 > hierarchical_memory_limit 67108864 > hierarchical_memsw_limit 18446744073709551615 > total_cache 0 > total_rss 2670592 > total_rss_huge 0 > total_mapped_file 0 > total_writeback 0 > total_swap 0 > total_pgpgin 1285 > total_pgpgout 633 > total_pgfault 2744 > total_pgmajfault 0 > total_inactive_anon 0 > total_active_anon 2670592 > total_inactive_file 0 > total_active_file 0 > total_unevictable 0 > memory.move_charge_at_immigrate: 0 > memory.soft_limit_in_bytes: 18446744073709551615 > > > I can also see the user's tasks: > > root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice > 2732 > 2734 > 2735 > 2737 > 2738 > > But if I then log out with the root user and re-log in, the command fails > with: > > root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice > call to cgmanager_get_tasks_sync failed: invalid request > > Can you please check why the command fails after re-log in? My guess would be that your new login is in a different cgroup from the old. The path 'user.slice/user-1000.slice' is relative to your current path. What does cgm getpidcgroupabs memory $$ show before and after logging back in?
Bug#859613: cgm gettasks not working properly
Package: cgmanager Version: 0.33-2+deb8u2 Hi, the "cgm gettasks" command does not always work as expected. I set up a memory limit of 64MB for the user with uid 1000: root@debian-test:~# cat /etc/systemd/system/user-1000.slice.d/MemoryLimit.conf [Slice] MemoryLimit=67108864 It is set up at reboot, as I can see (with the user logged in): root@debian-test:~# cgget -g memory:/user.slice/user-1000.slice /user.slice/user-1000.slice: memory.pressure_level: memory.use_hierarchy: 1 memory.swappiness: 60 memory.memsw.failcnt: 0 memory.limit_in_bytes: 67108864 memory.memsw.max_usage_in_bytes: 3182592 memory.usage_in_bytes: 2670592 memory.memsw.limit_in_bytes: 18446744073709551615 memory.failcnt: 0 memory.force_empty: memory.memsw.usage_in_bytes: 2670592 memory.max_usage_in_bytes: 3182592 memory.numa_stat: total=652 N0=652 file=0 N0=0 anon=652 N0=652 unevictable=0 N0=0 hierarchical_total=652 N0=652 hierarchical_file=0 N0=0 hierarchical_anon=652 N0=652 hierarchical_unevictable=0 N0=0 memory.oom_control: oom_kill_disable 0 under_oom 0 memory.stat: cache 0 rss 2670592 rss_huge 0 mapped_file 0 writeback 0 swap 0 pgpgin 1285 pgpgout 633 pgfault 2744 pgmajfault 0 inactive_anon 0 active_anon 2670592 inactive_file 0 active_file 0 unevictable 0 hierarchical_memory_limit 67108864 hierarchical_memsw_limit 18446744073709551615 total_cache 0 total_rss 2670592 total_rss_huge 0 total_mapped_file 0 total_writeback 0 total_swap 0 total_pgpgin 1285 total_pgpgout 633 total_pgfault 2744 total_pgmajfault 0 total_inactive_anon 0 total_active_anon 2670592 total_inactive_file 0 total_active_file 0 total_unevictable 0 memory.move_charge_at_immigrate: 0 memory.soft_limit_in_bytes: 18446744073709551615 I can also see the user's tasks: root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice 2732 2734 2735 2737 2738 But if I then log out with the root user and re-log in, the command fails with: root@debian-test:~# cgm gettasks memory user.slice/user-1000.slice call to cgmanager_get_tasks_sync failed: invalid request Can you please check why the command fails after re-log in? regards, Svenja Otten.