[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Ghosting Data



Mark Mcdonald wrote:
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...

That sounds pretty likely.

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.

It should, but if you don't have reasonable checkpoints set it may take a long time to flush the cache. If the system is actually shutting down, it may not wait long enough for slapd to finish.


Note that DB_TXN_NOT_DURABLE should not be used on production servers. This flag was deleted in BDB 4.3 and later because it is inherently unsafe. (One of those "only use this if you know what you're doing" options that too frequently got used by people who shouldn't have...)

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

.



--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  Chief Architect, OpenLDAP     http://www.openldap.org/project/