Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 612646 - setting a low memory.limit_in_bytes in a cgroup produces cpu soft lockups
setting a low memory.limit_in_bytes in a cgroup produces cpu soft lockups
Status: CLOSED DUPLICATE of bug 608996
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
high Severity high
: rc
: ---
Assigned To: Red Hat Kernel Manager
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-08 13:07 EDT by Casey Dahlin
Modified: 2014-06-18 04:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-09 17:33:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Casey Dahlin 2010-07-08 13:07:33 EDT
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 16:02:13 EDT
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 17:33:49 EDT
closed per comment#2.
Comment 4 Mike Gahagan 2010-07-13 15:17:16 EDT

*** 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.