Hide Forgot
The patches for BZ 1351415 do not seem to work at all and actually broke previously working functionality from RHEL 7.2. Tried with just one value and with two values (soft/hard) and neither works. --- https://access.redhat.com/solutions/1257953 --- /etc/systemd/system/httpd.service.d/stack.conf [Service] LimitSTACK=10485760 --- /etc/systemd/system/httpd.service.d/stack.conf [Service] LimitSTACK=10485760:10485760 --- Nov 17 23:26:42 dhcp9-127.gsslab.pnq.redhat.com systemd[1]: [/etc/systemd/system/httpd.service.d/ulimit.conf:2] Failed to parse resource value, ignoring: 10485760 Nov 18 01:24:50 dhcp9-127.gsslab.pnq.redhat.com systemd[1]: [/etc/systemd/system/httpd.service.d/ulimit.conf:2] Failed to parse resource value, ignoring: 10485760 Nov 18 01:29:49 dhcp9-127.gsslab.pnq.redhat.com systemd[1]: [/etc/systemd/system/httpd.service.d/ulimit.conf:2] Failed to parse resource value, ignoring: 10M Nov 18 02:10:27 dhcp9-127.gsslab.pnq.redhat.com systemd[1]: [/etc/systemd/system/httpd.service.d/ulimit.conf:2] Failed to parse resource value, ignoring: 10485760:10485760 Nov 18 02:15:35 dhcp9-127.gsslab.pnq.redhat.com systemd[1]: [/etc/systemd/system/httpd.service.d/stack.conf:2] Failed to parse resource value, ignoring: 10485760:10485760 --- Package versions: systemd-libs-219-30.el7.x86_64 systemd-sysv-219-30.el7.x86_64 systemd-debuginfo-219-30.el7_3.6.x86_64 systemd-219-30.el7.x86_64
I figured out what is going on here. While backporting fixes for #1351415 I didn't realize that new code for parsing LimitSTACK values does work correctly only when uint64_t is used for u variable in rlim_parse_size function. However our old code base uses off_t and due to invalid cast we always return -ERANGE error. Unfortunately, we didn't catch this because our test suite doesn't test LimitSTACK. Proposed fix, https://github.com/lnykryn/systemd-rhel/pull/67
qa acking for 7.4
*** Bug 1397947 has been marked as a duplicate of this bug. ***
fix merged to upstream staging branch -> https://github.com/lnykryn/systemd-rhel/commit/38d00b8a0453d38aecb725342ddd89a7c3dcb134 -> post
I reported the same issue as bz#1402699 without knowing this one already exist. But in this BZ case, you only discuss about issue with LimitSTACK. And as I see the fix in github, the engineer added a code regarding LimitSTACK only. src/test/test-unit-file.c + assert_se(config_parse_bytes_limit(NULL, "fake", 1, "section", 1, "LimitSTACK", RLIMIT_STACK, "55", rl, NULL) >= 0); + assert_se(rl[RLIMIT_STACK]); + assert_se(rl[RLIMIT_STACK]->rlim_cur == 55); + assert_se(rl[RLIMIT_STACK]->rlim_cur == rl[RLIMIT_STACK]->rlim_max); I have experienced the issue with LimitMEMLOCK as well. :( Setting LimitMEMLOCK=5432100 Error log. systemd[1]: [/etc/systemd/system/my-local.service:13] Failed to parse resource value, ignoring: 5432100 So would you mind to check if your latest branch for RHEL's systemd still have the issue with LimitMEMLOCK?
*** Bug 1402699 has been marked as a duplicate of this bug. ***
The patch applies for all of the following, because they all use the same parser (the property_get_rlimit()): src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitCPU", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_CPU]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitFSIZE", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_FSIZE]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitDATA", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_DATA]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitSTACK", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_STACK]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitCORE", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_CORE]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitRSS", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_RSS]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitNOFILE", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_NOFILE]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitAS", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_AS]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitNPROC", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_NPROC]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitMEMLOCK", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_MEMLOCK]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitLOCKS", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_LOCKS]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitSIGPENDING", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_SIGPENDING]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitMSGQUEUE", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_MSGQUEUE]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitNICE", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_NICE]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitRTPRIO", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_RTPRIO]), SD_BUS_VTABLE_PROPERTY_CONST), src/core/dbus-execute.c: SD_BUS_PROPERTY("LimitRTTIME", "t", property_get_rlimit, offsetof(ExecContext, rlimit[RLIMIT_RTTIME]), SD_BUS_VTABLE_PROPERTY_CONST),
As I see KB#2854131, it explains following parameteres are affected. LimitFSIZE LimitDATA LimitSTACK LimitCORE LimitRSS LimitAS LimitMEMLOCK LimitMSGQUEUE I had exactly same problem from a customer, a week ago. The customer set DefaultLimitCore in /etc/systemd/system.conf, But it stop working after the customer updated to systemd-219.30.el7_3.6. So you should add "DefaultLimixXYZ" parameters in system.conf are also affected in the KB#2854131.
Hello Iida-san, Thank you for your feedback. I'll update the solution soon. Regards, Keigo
Hello Iida-san, I updated the solution. If you find anything we should modify, please let me know. Regards, Keigo
Thanks for the update of the KB.
*** Bug 1408315 has been marked as a duplicate of this bug. ***
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. https://access.redhat.com/errata/RHBA-2017:2297