Sample Header Ad - 728x90

Missing core dump file on RedHat 9

4 votes
1 answer
1786 views
Once a month I find one of my RedHat 9 servers has rebooted (actually it's AlmaLinux 9 but since it's a clone of RH9 this question is probably better to solve in the context of RH9). I'm trying to find out what is causing the crash, but there are no core dump files created! I have followed the instructions in this post , except that I don't seem to have anything *apport* on my system, but when I trigger a core dump with: > sleep 3 & kill -SEGV $! there is no core dump file! I confirmed the basics are set with: [root@myhost ~]# cat /proc/sys/kernel/core_pattern |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h [root@myhost ~]# ulimit -c unlimited Is there something else I must set to let the dump file be created? I suspect my own app (non-packaged) is causing the problem...but there is no core file even in the directory holding the app. **====UPDATE====** I modified /etc/coredump.conf and set storage=external (everything else commented out), then rebooted and ran the following: [root@myhost ~]# sleep 3 & kill -SEGV $! [1] 3583 [root@myhost ~]# [1] + Segmentation fault (core dumped) sleep 3 [root@myhost ~]# coredumpctl --all TIME PID UID GID SIG COREFILE EXE SIZE Sat 2024-10-26 12:56:46 EDT 3583 0 0 SIGSEGV none /usr/bin/bash - [root@myhost ~]# ll /var/lib/systemd/coredump/ total 0 So still no core dump files visible (and notice the "none" above). The system log shows: Oct 26 13:06:41 ngcvls1 systemd[1] : Started Process Core Dump (PID 4459/UID 0). Oct 26 13:06:41 ngcvls1 systemd-coredump: Resource limits disable core dumping for process 4458 (bash). Oct 26 13:06:41 ngcvls1 systemd-coredump: Process 4458 (bash) of user 0 dumped core. So from the command line I ran: ulimit -c unlimited and repeated the segfault test, then a core file was created! But on reboot it was gone. (Despite my having storage=external set in coredump.conf). I need core dumps to survive reboots otherwise I can't tell why my system crashed. Getting closer! I would like to make ulimit -c permanent, just not sure where to put that (don't like advice of other posts to put in .bashrc)
Asked by TSG (1983 rep)
Oct 25, 2024, 01:57 PM
Last activity: Oct 26, 2024, 05:16 PM