Table of Contents
Date: 11-04-2022
Linux Core Dumps
Sometimes OpenLDAP crashes and baffles the experts. When there is a crash or a slapd
behavior we can't diagnose from logs, the data, or your configuration then a deeper look is needed. In those situations, troubleshooting requires the analysis of a core dump.
Default operating system settings often interfere with core dump creation. See Configuring Core Dumps to ensure your system is properly configured to save and retain full core dump files.
Create a Core Dump by Killing slapd
If the process is still running and you need to kill it, send the slapd process a SIGQUIT signal:
Core Dump With kill
Get the slapd process ID
ps -C slapd
will show:
PID TTY TIME CMD
23348 ? 15:35:33 slapd
Kill the process with a SIGQUIT signal:
kill -3 23348
OR
kill $(pgrep slapd)
After you kill the process, there should be a file with the name "core" in it in your current working directory or dedicated core file location.
Create a Core Dump Without Killing slapd
If you need a core dump but don't want or need to kill slapd
, you can obtain the core dump by using the gcore
utility. This will create a core without disturbing the slapd
process.
The gcore
utility is not installed by default on some systems. You may need to install it to use this approach. gcore
is a standard package on RHEL, OpenSuSE, Debian, and Ubuntu (and their derivative distributions).
To obtain a core with gcore
, get the process id of slapd
:
ps -C slapd
will display:
PID TTY TIME CMD
23348 ? 15:35:33 slapd
then call gcore
:
gcore 23348
OR
gcore $(pgrep slad)
The resulting core file should be in your current working directory and should have the id of the process that was dumped in the filename.