Bug 988888 - Enabling MemoryAcct=yes in slice/scope causes zero KB memory limits to be set
Enabling MemoryAcct=yes in slice/scope causes zero KB memory limits to be set
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-26 11:43 EDT by Daniel Berrange
Modified: 2013-10-17 07:58 EDT (History)
4 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2013-07-26 11:43:15 EDT
Description of problem:
If you invoke CreateMachine() and pass a MemoryAcct=yes scope property, or alternatively create a slice unit setting MemoryAcct=yes, then systemd will accidentally set the memory limit to zero, instead of leaving it unlimited.
In the case of CreateMachine() this causes the OOM killer to immediately reap the container init processes before CreateMachine() even returns.

Version-Release number of selected component (if applicable):
206

How reproducible:
Always 
Steps to Reproduce:
# cat /etc/systemd/system/machine-demo.slice
[Unit]
Description=Demo slice

[Slice]
CPUAccounting=yes
MemoryAccounting=yes


# systemctl start machine-demo.slice

# cat /sys/fs/cgroup/memory/machine.slice/machine-demo.slice/memory.limit_in_bytes
0


Actual results:
Hard & soft memorys are set to 0

Expected results:
Limits are left on default values (unlimited) unless explicitly set in the unit file.

Additional info:
See also

http://lists.freedesktop.org/archives/systemd-devel/2013-July/012270.html
Comment 2 Václav Pavlín 2013-10-17 07:58:01 EDT
As mentioned in the mailing list discussion this was fixed in systemd-206.

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