| Summary: | BZ 1351415 change appears to have broken ability to set limits. | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Chris Cheney <ccheney> | |
| Component: | systemd | Assignee: | systemd-maint | |
| Status: | CLOSED ERRATA | QA Contact: | Branislav Blaškovič <bblaskov> | |
| Severity: | high | Docs Contact: | ||
| Priority: | urgent | |||
| Version: | 7.3 | CC: | aschultz, bblaskov, fkrska, fsumsal, jbiao, jsynacek, knoha, kwalker, masanari.iida, mkolaja, msekleta, nparmar, systemd-maint-list, tom | |
| Target Milestone: | rc | Keywords: | Regression, ZStream | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | systemd-219-31.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1399638 (view as bug list) | Environment: | ||
| Last Closed: | 2017-08-01 09:12:22 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1383699, 1399638, 1446211 | |||
|
Description
Chris Cheney
2016-11-17 20:54:44 UTC
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 |