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 612646 - setting a low memory.limit_in_bytes in a cgroup produces cpu soft lockups
Summary: setting a low memory.limit_in_bytes in a cgroup produces cpu soft lockups
Keywords:
Status: CLOSED DUPLICATE of bug 608996
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-08 17:07 UTC by Casey Dahlin
Modified: 2014-06-18 08:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-09 21:33:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Reproducer (1.52 KB, text/plain)
2010-07-08 17:07 UTC, Casey Dahlin
no flags Details

Description Casey Dahlin 2010-07-08 17:07:33 UTC
Created attachment 430425 [details]
Reproducer

Description of problem:
Customer is seeing soft lockups when running the attached reproducer in a cgroup with memory.limit_in_bytes set to a low value (1G is considered low in this case).

Version-Release number of selected component (if applicable):
2.6.32-37.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
# mkdir /dev/cgroup
# mount -t cgroup -omemory /dev/cgroup
# mkdir /dev/cgroup/test
# cat /proc/self/cgroup
1:memory:/test
# echo 1G > /dev/cgroup/test/memory.limit_in_bytes
# time sh -c "for i in \$(seq 1 3); do ./malloc 512 4 & done ; wait"

./malloc is the compiled reproducer

Comment 2 Mike Gahagan 2010-07-09 20:02:13 UTC
I think this issue is fixed in the -44 kernel, I could reproduce the hang with -42. There are a couple of issues with the reproducer and it is not going to do what you think it will do (unless you turn off swap)

1.) Mount command needs to be changed to:
mount -t cgroup -omemory none /dev/cgroup

2.) You need to put the shell you are running your test program in the cgroup
echo $$ > /dev/cgroup/test/tasks
the cat command will then return what you expect.

3.) echo 1G > /dev/cgroup/test/memory.limit_in_bytes
This will limit memory usage of your program, but it can still use all the swap it wants, you won't get an oom kill until you either run out of swap or turn off swap altogether.  I was able to get oom-kills with swap turned off and the changes I made to the reproducer outlined above. memory.memsw.limit_in_bytes is probably what you want instead.

Comment 3 Linda Wang 2010-07-09 21:33:49 UTC
closed per comment#2.

Comment 4 Mike Gahagan 2010-07-13 19:17:16 UTC

*** This bug has been marked as a duplicate of bug 608996 ***


Note You need to log in before you can comment on or make changes to this bug.