Bug 1905582

Summary: core ulimit set to infinity, should be 0 for disabled to align with RHEL 7
Product: Red Hat Enterprise Linux 8 Reporter: Anthony Zone <azone>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.4CC: awalsh, dapospis, dtardon, jamacku, msekleta, systemd-maint-list
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-239-50.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2010330 (view as bug list) Environment:
Last Closed: 2021-11-09 19:54:49 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1969483, 2010330    

Description Anthony Zone 2020-12-08 15:37:12 UTC
Description of problem:
RHEL 8 ships with core ulimit set to infinity.  As systemd-core handles this (changed from abrt), we should disable this to align with RHEL 7.

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

How reproducible:
Everytime

Steps to Reproduce:
1. Start RHEL 8
2. ulimit -c
3.

Actual results:
infinity

Expected results:
0

Additional info:

# systemctl show --no-pager | grep -i core
DefaultLimitCORE=infinity
DefaultLimitCORESoft=infinity

Comment 1 Lukáš Nykrýn 2021-06-22 13:27:51 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/149

Comment 6 Andy Walsh 2021-06-28 17:47:54 UTC
We are using `ulimit -c unlimited` as a non-root user.  We just updated our lab test machine to use RHEL-8.5.0-20210628.n.2, which has systemd-239-48.el8 installed.  We are unable to execute that command as we could on older versions (i.e. systemd-239-45.el8).  When we go in and revert the change referenced above ("DefaultLimitCORE=0"), our desired functionality is restored.

[awalsh@localhost ~]$ rpm -qa systemd
systemd-239-48.el8.x86_64
[awalsh@localhost ~]$ grep DefaultLimitCORE /etc/systemd/system.conf
DefaultLimitCORE=0
[awalsh@localhost ~]$ ulimit -c
0
[awalsh@localhost ~]$ ulimit -c unlimited
bash: ulimit: core file size: cannot modify limit: Operation not permitted             

--- Comment out the above DefaultLimitCORE line and reboot ---

[awalsh@localhost ~]$ grep DefaultLimitCORE /etc/systemd/system.conf
#DefaultLimitCORE=0
[awalsh@localhost ~]$ ulimit -c
unlimited
[awalsh@localhost ~]$ ulimit -c unlimited
[awalsh@localhost ~]$ rpm -qa systemd
systemd-239-48.el8.x86_64

Comment 7 Frantisek Sumsal 2021-08-03 09:24:18 UTC
*** Bug 1989447 has been marked as a duplicate of this bug. ***

Comment 8 Frantisek Sumsal 2021-08-03 09:30:31 UTC
As reported by several users, this indeed causes a regression where an unprivileged user is unable to change the core ulimit.

Comment 9 Lukáš Nykrýn 2021-08-03 12:40:25 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/205

Comment 14 errata-xmlrpc 2021-11-09 19:54:49 UTC
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 (systemd bug fix and enhancement update), 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-2021:4469