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
Hi team, Is there any update? If we still need any information or testing, please let me know. Best Regards Yuliang Li