CGroup properties not set. #28

yshui opened this Issue Nov 18, 2011 · 1 comment


None yet
2 participants

yshui commented Nov 18, 2011

Problem is caused by ulatencyd not having a mechanism to deal with process exit properly.
When the last process in a cgroup exits, this cgroup is deleted and its properties lost, but ulatencyd doesn't know of that.
When a new process is created and classified as the cgroup deleted before, ulatencyd will think that cgroup still exists. It just assign the process to that cgroup and left its properties unset.

gajdusek added a commit to gajdusek/ulatencyd that referenced this issue Jul 4, 2012

core.lua: fix for cgroups removed outside ulatencyd (issue #28)
fixes issue #28: CGroup properties not set.

Whenever scheduler finds matching rule for scheduled process, it calls
CGroup.get_group(name) to check if cgroup does exist. This used to check
only if cgroup is contained in the internal _CGroup_Cache - not if it really
does exist in cgroup filesystem.

So if the cgroup was removed outside ulatencyd and therefore was not
removed from _CGroup_Cache, cgroup will not be recreated and will loose
all settings (default parameters, rule parameters, parameters adjusted
by adjust_new).

 + CGroup.get_group(): test if cgroup is really present in filesystem,
   otherwise return false or nil.
 + always create requested cgroup. If it is already
   contained in _CGroup_Cache, replace it with new one. Code should check
   its existence before calling anyway.

Real fix would involve changing ulatencyd_cleanup.lua in a way it tells
ulatencyd to remove that cgroup. Ulatencyd should also update its internal
structures and do clean up, i.e. handle remaining memory charges.

gajdusek commented Apr 2, 2013

Hi Yuxuan,

I believe the issue was fixed in bfbb838. And because the commit is already merged, I am closing this bug report now.

@gajdusek gajdusek closed this Apr 2, 2013

@gajdusek gajdusek added this to the 0.6.0 milestone Mar 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment