HowTo Get a slapd Stack Trace Using gdb
Setup Make sure gdb is installed:
which gdb
If possible, install the following:
symas-libevent-libs symas-openldap-debuginfo symas-openldap-devel symas-openldap-libs
Create the file “bt_wait.gdb” (update the config path):
set confirm off
set pagination off
set logging file backtrace.txt
set logging on
handle SIGPIPE noprint nopass ignore
file /opt/symas/lib/slapd
run -d0 -F <path to slapd.d> -h "ldap:///"
thread apply all bt full
set logging off
quit
Run the script in gdb:
gdb -x bt_wait.gdb
If slapd crashes, there will be a file named “backtrace.txt” in the current working directory.