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

Re: (ITS#5595) bdb deadlock if add causes modify



rein@OpenLDAP.org wrote:
> Full_Name: Rein Tollevik
> Version: CVS head
> OS: linux and solaris
> URL:
> Submission from: (NULL) (81.93.160.250)
> 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
> place...

Yes, known issue, don't do this.

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