Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

CGroup properties not set. #28

Closed
yshui opened this Issue · 1 comment

2 participants

@yshui

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 gajdusek referenced this issue from a commit in gajdusek/ulatencyd
@gajdusek gajdusek core.lua: fix for cgroups removed outside ulatencyd (issue #28)
fixes issue #28: CGroup properties not set.

Reason:
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.
 + CGroup.new(): always create requested cgroup. If it is already
   contained in _CGroup_Cache, replace it with new one. Code should check
   its existence before calling CGroup.new() 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.
bfbb838
@gajdusek
Collaborator

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
@gajdusek gajdusek added this to the 0.6.0 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.