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

(ITS#5595) bdb deadlock if add causes modify

Full_Name: Rein Tollevik
Version: CVS head
OS: linux and solaris
Submission from: (NULL) (
Submitted by: rein

A deadlock occur in bdb_cache_modify() when it calls bdb_cache_entry_db_relock()
if adding an entry triggers a modify of the same entry.  Seen by adding the
suffix entry of a backend with the syncprov overlay and syncprov-checkpoint set
to "1 1", i.e the add causes syncprov_checkpoint() to be called.

The problem is that bdb_add() calls send_ldap_result() while the entry is
locked. But I'm not sure whether releasing the entry before it is done is
correct or not.  Nor if this should be considered a usage bug in the first

Rein Tollevik
Basefarm AS