Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

scheduler.lua: do not schedule already dead processes

  • Loading branch information...
commit 5590e54168b204afadc652154b867533f1e316bd 1 parent 4cfd0b1
@gajdusek gajdusek authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 rules/scheduler.lua
View
13 rules/scheduler.lua
@@ -488,9 +488,16 @@ function Scheduler:_one(proc, single)
-- skip foreign cgroups
local cgr_path = proc:get_cgroup(subsys)
if not cgr_path then
- ulatency.log_warning(string.format("nocgroup for process - subsys: %s, pid: %d, cmdfile: %s, exe: %s",
- subsys, proc.pid, proc.cmdfile or "NONE", proc.exe or "NONE")) --debug
- cgr_path = '/'
+ if ulatency.is_pid_alive(proc.pid) then
+ ulatency.log_warning(string.format(
+ "no cgroup for process, assuming '/' - subsys: %s, pid: %d, cmdfile: %s, exe: %s",
+ subsys, proc.pid, proc.cmdfile or "NONE", proc.exe or "NONE"))
+ cgr_path = '/'
+ else
+ -- process is already dead
+ proc:clear_changed()
+ return true
+ end
end
if CGroup.is_foreign(subsys, cgr_path) then
ulatency.log_info(string.format("scheduler subsys %s: skippping %s (pid: %d) because its cgroup %s is foreign",
Please sign in to comment.
Something went wrong with that request. Please try again.