Bug 1568354

Summary: cgrulesengd is not moving all threads to the configured cpuset
Product: Red Hat Enterprise Linux 7 Reporter: Nikola Forró <nforro>
Component: libcgroupAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Chao Ye <cye>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: cye, daolivei, jsafrane, lilu, lmiksik, nforro, thozza, varekova, vondruch
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libcgroup-0.41-20.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1284495 Environment:
Last Closed: 2018-10-30 08:00:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1284495    
Bug Blocks:    

Comment 4 Chao Ye 2018-09-03 04:56:34 UTC
Reproduced on libcgroup-0.41-15.el7
=================================================
<=====System reboot
[root@hp-dl380pgen8-02-vm-10 ~]# rpm -q libcgroup libcgroup-tools
libcgroup-0.41-15.el7.x86_64
libcgroup-tools-0.41-15.el7.x86_64
[root@hp-dl380pgen8-02-vm-10 ~]# grep -v ^# /etc/cgconfig.conf
group dbus {
    cpuset {
        cpuset.mems="0";
        cpuset.cpus="0";
    }
}
[root@hp-dl380pgen8-02-vm-10 ~]# grep -v ^# /etc/cgrules.conf 
dbus:dbus-daemon        cpuset  dbus/
[root@hp-dl380pgen8-02-vm-10 ~]# systemctl status cgconfig
● cgconfig.service - Control Group configuration service
   Loaded: loaded (/usr/lib/systemd/system/cgconfig.service; enabled; vendor preset: disabled)
   Active: active (exited) since 一 2018-09-03 04:39:01 EDT; 3h 57min left
  Process: 462 ExecStart=/usr/sbin/cgconfigparser -l /etc/cgconfig.conf -L /etc/cgconfig.d -s 1664 (code=exited, status=0/SUCCESS)
 Main PID: 462 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
   CGroup: /system.slice/cgconfig.service

9月 03 04:39:01 hp-dl380pgen8-02-vm-10.lab.bos.redhat.com systemd[1]: Started Control Group configuration service.
[root@hp-dl380pgen8-02-vm-10 ~]# systemctl status cgred
● cgred.service - CGroups Rules Engine Daemon
   Loaded: loaded (/usr/lib/systemd/system/cgred.service; enabled; vendor preset: disabled)
   Active: active (running) since 一 2018-09-03 04:39:03 EDT; 3h 57min left
  Process: 624 ExecStart=/usr/sbin/cgrulesengd $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 627 (cgrulesengd)
    Tasks: 1
   Memory: 3.2M
   CGroup: /system.slice/cgred.service
           └─627 /usr/sbin/cgrulesengd -s -g cgred

9月 03 04:39:03 hp-dl380pgen8-02-vm-10.lab.bos.redhat.com systemd[1]: Starting CGroups Rules Engine Daemon...
9月 03 04:39:03 hp-dl380pgen8-02-vm-10.lab.bos.redhat.com systemd[1]: Started CGroups Rules Engine Daemon.
[root@hp-dl380pgen8-02-vm-10 ~]# ps -eLo pid,lwp,user,comm | grep dbus
  605   628 polkitd  gdbus
  610   610 dbus     dbus-daemon
  610   615 dbus     dbus-daemon
  623   674 root     gdbus
[root@hp-dl380pgen8-02-vm-10 ~]# cat /sys/fs/cgroup/cpuset/dbus/tasks 
610
[root@hp-dl380pgen8-02-vm-10 ~]# grep 615 /sys/fs/cgroup/cpuset/tasks 
615

Tested on libcgroup-0.41-19.el7
=================================================
<=====System reboot
[root@hp-dl380pgen8-02-vm-10 ~]# rpm -q libcgroup libcgroup-tools
libcgroup-0.41-19.el7.x86_64
libcgroup-tools-0.41-19.el7.x86_64
[root@hp-dl380pgen8-02-vm-10 ~]# ps -eLo pid,lwp,user,comm | grep dbus
  611   655 polkitd  gdbus
  615   615 dbus     dbus-daemon
  615   621 dbus     dbus-daemon
  622   673 root     gdbus
[root@hp-dl380pgen8-02-vm-10 ~]# cat /sys/fs/cgroup/cpuset/dbus/tasks 
615
[root@hp-dl380pgen8-02-vm-10 ~]# grep 621 /sys/fs/cgroup/cpuset/tasks 
621
[root@hp-dl380pgen8-02-vm-10 ~]# systemctl restart cgred
[root@hp-dl380pgen8-02-vm-10 ~]# systemctl restart cgconfig
[root@hp-dl380pgen8-02-vm-10 ~]# cat /sys/fs/cgroup/cpuset/dbus/tasks
615
621


Hi Nikola, it seems the new build still having issues. Could you take a look?

Thanks,
Chao

Comment 5 Nikola Forró 2018-09-05 12:38:56 UTC
Hi Chao,

do I understand it correctly that the problem is that the second thread is not moved after installation of the update and system reboot?

Are you able to reproduce this reliably? I'm not able to reproduce it at all, but I think I know what's going on, and I believe the updated patch from bug #1593299 should solve it.

I'll do a new build and a respin ASAP.

Comment 8 Chao Ye 2018-09-10 08:39:09 UTC
Test on libcgroup-0.41-20.el7:
=================================================
<=====System reboot
[root@ibm-z-39 ~]# ps -eLo pid,lwp,user,comm | grep dbus
 1859  1888 polkitd  gdbus
 1875  1875 dbus     dbus-daemon
 1875  1887 dbus     dbus-daemon
 1893  1897 root     gdbus
[root@ibm-z-39 ~]# cat /sys/fs/cgroup/cpuset/dbus/tasks
1875
1887
[root@ibm-z-39 ~]# rpm -q libcgroup libcgroup-tools
libcgroup-0.41-20.el7.s390x
libcgroup-tools-0.41-20.el7.s390x
[root@ibm-z-39 ~]# uname  -a
Linux ibm-z-39.rhts.eng.bos.redhat.com 3.10.0-944.el7.s390x #1 SMP Tue Sep 4 15:07:36 EDT 2018 s390x s390x s390x GNU/Linux

Move to VERIFIED.

Comment 10 errata-xmlrpc 2018-10-30 08:00:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3058