Op 28-2-2011 3:00, Howard Chu schreef:
Ruud Baart wrote:
Problem:
For a customer we use LDAP for many years. Last year suddenly the slapd
service just stopped without any traces in the logfiles. After a
restart
of slapd everything works fine again. But the problem was there: it was
not an incident, now and then slapd just stops and always without any
traces in the logfiles. Sometime three times a day, sometime a week
without a failure. I can't find a pattern or any relation to any other
service on the linux server.
Attach to the running slapd with gdb, type
handle all nostop
continue
and let it run. If there's a crash you'll see what happened in gdb.
I tried it but I don't get this working. I have no experience with
gdb. I assume I do something wrong.
Normally slapd daemon runs like this on a test machine
/usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f
/etc/ldap/slapd.conf -l local5
If I try this running attached to gdb:
su openldap -s /bin/bash
gdb --args /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u
openldap -f /etc/ldap/slapd.conf -l local5
GNU gdb (GDB) 7.0.1-debian
....
This GDB was configured as "i486-linux-gnu".
..
Reading symbols from /usr/sbin/slapd...(no debugging symbols
found)...done.
(gdb) handle all nostop
Signal Stop Print Pass to program Description
SIGHUP No Yes Yes Hangup
SIGQUIT No Yes Yes Quit
...
EXC_EMULATION No Yes Yes Emulation instruction
EXC_SOFTWARE No Yes Yes Software generated
exception
EXC_BREAKPOINT No Yes Yes Breakpoint
(gdb)
(gdb) continue
The program is not being run.
(gdb) run
Starting program: /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u
openldap -f /etc/ldap/slapd.conf -l local5
[Thread debugging using libthread_db enabled]
Program exited with code 01.
At this point I have no idea what to do.