Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 964219

Summary: cgred process dies
Product: Red Hat Enterprise Linux 6 Reporter: Kenny Woodson <kwoodson>
Component: libcgroupAssignee: Peter Schiffer <pschiffe>
Status: CLOSED ERRATA QA Contact: Mike Gahagan <mgahagan>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: admiller, agrimm, ccui, jsafrane, kwoodson, mfisher, mmahut, pschiffe, sten, tlavigne, twiest, varekova
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
: 1011515 (view as bug list) Environment:
aws ec2 instance
Last Closed: 2013-11-21 22:33:46 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:    
Bug Blocks: 923851, 947775, 961026, 1011515    
Attachments:
Description Flags
core dump
none
actual core dump
none
2 more cgred dumps
none
cgred dump kwoodson: review+

Description Kenny Woodson 2013-05-17 14:57:17 UTC
Description of problem:

We use cgroups extensively to manage resources on our OpenShift servers.  We have been noticing since the 6.3 to 6.4 RHEL update that we see the cgred process dies.  Here is the output we are seeing in rsyslog:

-----
May 14 17:42:25 ex-std-node181 CGRE[4439]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x00000000022ffa30 ***
May 14 17:42:25 ex-std-node181.prod.rhcloud.com kernel: cgrulesengd[4439] general protection ip:32e0433fe4 sp:7ffff2778e90 error:0 in libc-2.12.so[32e0400000+18a000]
-----

The interesting thing we are seeing is that we restart the cgred service and it sometimes will go right back into this "dead" state within 2-5 minutes.

May 16 14:21:55 ex-std-node47 CGRE[28214]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x0000000000b2e5b0 ***

May 16 14:25:24 ex-std-node47 CGRE[3286]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x0000000000c24af0 ***
May 16 14:25:24 ex-std-node47 kernel: cgrulesengd[3286] general protection ip:3000433fe4 sp:7fff2c9d4fd0 error:0 in libc-2.12.so[3000400000+18a000]

On ex-std-node47 there are 731 users that we have placed into cgroups.  

Version-Release number of selected component (if applicable):
libcgroup-pam-0.37-7.1.el6_4.x86_64
libcgroup-0.37-7.1.el6_4.x86_64

How reproducible:

We are seeing this multiple times a day and currently have a cgred restart handler to attempt to bring the service back up.

I'm not exactly sure what is causing this to fail but we are more than willing to help debug this issue.

Steps to Reproduce:
1.  
2.
3.
  
Actual results:

Service cgred is dying.

Expected results:

Cgred to be resilient and continue to enforce resource restrictions.

Additional info:

We are probably an outlier when it comes to most problems but we use cgroups and depend on it to run OpenShift.  We place all of our users into our multi-tenant environment and place them into cgroups.  We then rely on cgroups to restrict each user according to some predefined resource limits.  Please assist and we will provide more info.

Comment 2 Peter Schiffer 2013-08-13 16:57:49 UTC
Kenny,

do you still see this problem (even with libcgroup-0.37-7.2.el6_4)?

Thanks,

peter

Comment 3 Kenny Woodson 2013-08-16 15:28:29 UTC
Peter,

Yes, we are still seeing these issues.  Here are a few of them from today:

Aug 16 05:53:05 ex-std-node96 CGRE[1340]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x0000000001bf3370 ***

Aug 16 04:37:12 ex-std-node38 CGRE[1149]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x0000000000be73f0 ***

Aug 16 10:44:43 ex-std-node4 CGRE[1103]: *** glibc detected *** /sbin/cgrulesengd: double free or corruption (fasttop): 0x00000000025eabf0 ***

These are 3 separate servers.

rpm -qa | grep libcgroup:

libcgroup-pam-0.37-7.2.el6_4.x86_64
libcgroup-0.37-7.2.el6_4.x86_64

Thanks,

kenny

Comment 4 Peter Schiffer 2013-08-19 10:51:15 UTC
Kenny,

are you able to generate coredump? If yes, could you attach it?

Thanks,

peter

Comment 5 Kenny Woodson 2013-08-19 19:13:05 UTC
Peter,

We have core file size set to -c for dumps.  I have experimented and tried to dump the process by killing it with a 3, 4, 6, 8, and an 11.  I haven't had any luck.  Is there something else I can try?

Any assistance would help.

]# cat /proc/sys/kernel/core_pattern 
/var/crash/core-%e-%s-%u-%g-%p-%t


Thanks,

kenny

Comment 6 Rob Millner 2013-08-20 01:25:13 UTC
*** Bug 924438 has been marked as a duplicate of this bug. ***

Comment 7 Kenny Woodson 2013-08-23 16:24:37 UTC
Created attachment 789652 [details]
core dump

Attached a core dump.  Working with peter.

Comment 8 Kenny Woodson 2013-08-23 16:31:46 UTC
Created attachment 789653 [details]
actual core dump

Binary core dump

Comment 9 Kenny Woodson 2013-08-23 17:59:48 UTC
Created attachment 789692 [details]
2 more cgred dumps

Peter,

I'm not if this is the same issue but I found 2 more core files.

Attached.

Comment 10 Peter Schiffer 2013-08-26 17:16:15 UTC
This problem was introduced with bug #849757, and it should be fixed as part of the bug #913286.

Comment 13 Kenny Woodson 2013-09-11 14:01:58 UTC
At Peter's request I installed the latest version for RHEL 6.5 and cgred process immediately dies.

libcgroup-debuginfo-0.40.rc1-2.el6.x86_64
libcgroup-pam-0.40.rc1-2.el6.x86_64
libcgroup-devel-0.40.rc1-2.el6.x86_64
libcgroup-0.40.rc1-2.el6.x86_64

Stopping CGroup Rules Engine Daemon...                     [  OK  ]
Starting CGroup Rules Engine Daemon: /bin/bash: line 1:  2095 Segmentation fault      /sbin/cgrulesengd -g cgred
                                                           [FAILED]

Attaching a core dump.

Comment 14 Kenny Woodson 2013-09-11 14:03:37 UTC
Created attachment 796412 [details]
cgred dump

Comment 18 Andy Grimm 2013-10-20 17:24:19 UTC
FWIW, 0.40.rc1-4 has a serious memory leak.  Every time the cache is reloaded, cgrulesengd is leaking 80 to 100 megabytes (on a system with 1500-2000 users).
You can observe this by sending cgrulesengd a SIGUSR2 signal.  That is hindering our testing of this fix.

Comment 25 Kenny Woodson 2013-10-28 20:29:05 UTC
We have progressed much further with the latest fixes and the recently provided memory fixes have proven to be a much more efficient cgred process.  I'd say this version is good.  We are going to roll the latest version out to a few more of our production servers.

Comment 26 Mike Gahagan 2013-11-07 16:15:38 UTC
Marking verified based on comment 25

Comment 27 errata-xmlrpc 2013-11-21 22:33:46 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.

http://rhn.redhat.com/errata/RHBA-2013-1685.html