Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When I use ‘ulimit -c 0’ under user session, in RHEL8, this will prevent the generation of coredump, but in RHEL7, coredump can still be generated normally, this setting does not seem to take effect.
Test conducted in RHEL7:
1. View the configuration file
# grep core /etc/security/limits.conf | grep -v "#"
* soft core 0
* hard core 0
2. Confirm the current status
# ulimit -c
0
3. Process crashes
# sleep 56789 &
[1] 2849
# kill -s SIGSEGV 2849
4. The result is that a coredump can be generated
# grep core ccpp-2021-04-13-15\:30\:01-2849/limits
Max core file size 0 0 bytes
# ll ccpp-2021-04-13-15\:30\:01-2849/coredump
-rw-r-----. 1 root abrt 385024 Apr 13 15:30 ccpp-2021-04-13-15:30:01-2849/coredump
5.From messages
~~~
Apr 13 15:30:01 localhost abrt-hook-ccpp: Process 2849 (sleep) of user 0 killed by SIGSEGV - dumping core
Apr 13 15:31:12 localhost abrt-server: Generating core_backtrace
~~~
Test conducted in RHEL8:
1. View the configuration file
# grep core /etc/security/limits.conf | grep -v "#"
* soft core 0
* hard core 0
2. Confirm the current status
# ulimit -c
0
3. Process crashes
# sleep 999999 &
[1] 2931
# kill -s SIGSEGV 2931
4. The result is that no coredump can be generated
5.From messages
~~~
Apr 13 14:51:44 localhost systemd[1]: Started Process Core Dump (PID 2932/UID 0).
Apr 13 14:51:44 localhost systemd-coredump[2933]: Resource limits disable core dumping for process 2931 (sleep).
Apr 13 14:51:44 localhost systemd-coredump[2933]: Process 2931 (sleep) of user 0 dumped core.
Apr 13 14:51:44 localhost systemd[1]: systemd-coredump: Succeeded.
Apr 13 14:51:44 localhost abrt-dump-journal-core[967]: Failed to obtain all required information from journald
Apr 13 14:51:44 localhost abrt-dump-journal-core[967]: Failed to save detect problem data in abrt database
~~~
Actual results:
In RHEL8, under user session, ulimit can affect coredump generation.
but in RHEL7, it doesn't work.
Expected results:
Want to know why ulimit behaves differently on RHEL7 and RHEL8