Mark Mcdonald <> laid ink upon scroll at Tuesday, March 13, 2007 9:48 AM:
I'm about to take the offending server down and run slapindex but I fear the problem is in dn2id.bdb and id2entry.bdb, which I don't believe slapindex fixes.
I believe the problem may be caused by an unclean backend database shutdown...
My rationale is that DB_CONFIG uses DB_TXN_NOT_DURABLE (LDAP is not an authorative source for us and we can restore from other sources easily enough) and yet the timestamp of the database files is about 10 minutes lagging behind the time I actually shut the system down, where I would have assumed that a clean shutdown would flush memory to disk.
I also got this error running slapindex after a clean shutdown (Ubuntu Edgy, /etc/init.d/slapd stop):
root # su -c 'slapindex -c' openldap bdb_db_open: unclean shutdown detected; attempting recovery. => bdb_idl_insert_key: c_get failed: DB_PAGE_NOTFOUND: Requested page not found (-30988) => hdb_tool_entry_reindex: txn_aborted! Accessing a corrupted shared library (80) => bdb_idl_insert_key: c_get failed: DB_PAGE_NOTFOUND: Requested page not found (-30988) => hdb_tool_entry_reindex: txn_aborted! Accessing a corrupted shared library (80) .... etc
The stop command from the above initscript is:
start-stop-daemon --stop --quiet --oknodo --retry 10 \ --pidfile "$SLAPD_PIDFILE" \ --exec /usr/sbin/slapd 2>&1`
Thanks Mark