Bug 1402699 - systemd start to refuse to set LimitMEMLOCK and LimitSTACK value other than infinity.
Summary: systemd start to refuse to set LimitMEMLOCK and LimitSTACK value other than i...
Keywords:
Status: CLOSED DUPLICATE of bug 1396277
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-08 08:16 UTC by masanari iida
Modified: 2020-04-15 14:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 01:56:40 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description masanari iida 2016-12-08 08:16:06 UTC
Description of problem:
Starting from RHEL7.3,  the systemd does not accept numeric value
for LimitMEMLOCK and LimitSTACK.
It only accepts "infinity"
The systemd parsing LimitNOFILE and LimitNPROC without error.

Affected versions
systemd-219-30.el7
systemd-219-30.el7_3.6

How reproducible:
Always

Steps to Reproduce:
1. Create custom startup configuration file.
Add LimitStack and LimitMEMLOCK in [Service] section.

# more my-local.service
[Unit]
Description=my last service
After=default.target
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/dummy.sh
RemainAfterExit=yes
LimitNOFILE=65536
LimitNPROC=16384
LimitSTACK=12345
LimitMEMLOCK=5432100

[Install]
WantedBy=default.target


2. Reboot system
3. After bootup,  check log.

Actual results:

systemd[1]: [/etc/systemd/system/my-local.service:12] Failed to parse resource value, ignoring: 12345
systemd[1]: [/etc/systemd/system/my-local.service:13] Failed to parse resource value, ignoring: 5432100

Additional info:
Between RHEL7.0 and 7.2,  systemd accept LimitSTACK and LimtMEMLOCK.
And it didn't produce any parsing errors.

Comment 5 Keigo Noha 2016-12-14 01:08:25 UTC
Hi Iida-san,

We found that the same issue was already reported at https://bugzilla.redhat.com/show_bug.cgi?id=1396277.
Can we close this bugzilla and discuss the issue in bz#1396277?

In bz#1396277, there is no description which addresses LimitMEMLOCK. I'll add the comment in bz#1396277.

Regards,
Keigo

Comment 6 Shane Seymour 2016-12-14 01:13:38 UTC
I don't think Masanari will have an issue with that as long as LimitMEMLOCK gets tested and confirmed that it no longer causes an issue either otherwise the other BZ will need to move backwards from post and be reworked.

Given that the other BZ says there wasn't a test case for LimitSTACK and LimitMEMLOCK can you confirm that every one of the Limit* settings now has a test case to prevent anything like this happening in the future?

Comment 7 Shane Seymour 2016-12-14 01:15:04 UTC
Can the regression keyword please also be added to the other BZ if this is closed as a duplicate?

Comment 8 Keigo Noha 2016-12-14 01:38:19 UTC
Hi Shane-san,

Thank you for your update. I added Regression keyword in bz#1396277 and asked the engineering team to add test cases for other parameters which uses config_parse_bytes_limit().

I'll update the support case when I get a reply from our engineering.

Regards,
Keigo

Comment 9 masanari iida 2016-12-14 01:41:12 UTC
Hi Noha-san, you may close this case as duplicate of bz#1396277. 
I will follow the bz#1396277 to see the progress.  Thanks.

Comment 10 Keigo Noha 2016-12-14 01:56:40 UTC
Hi Iida-san, 

I close this case as duplicate of bz#1396277.
And I'll share the progress of the bugzilla and handle requests through the support case.

Regards,
Keigo

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


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