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

RE: back-bdb future



Ah, now I see. The dbcache code uses its own mutex to protect the list of
open databases. Since this lock is outside the BDB system, the deadlock is
not detected. I think using a DB lock here will take care of the problem.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: Jonghyuk Choi [mailto:jongchoi@us.ibm.com]
> Sent: Friday, March 28, 2003 5:28 PM
> To: Howard Chu
> Cc: 'Kurt D. Zeilenga'; openldap-devel@OpenLDAP.org
> Subject: RE: back-bdb future
>
>
>
>
>
>
> Howard,
>
> Sorry for late response.
> After I came back I was being tied to another task for a while,
> and as you imagine, Friday evening is the best time to
> access to the 8 way machine.
>
> The stack trace is attached for your review.
> I experimented with
> 1) the original code (without DB_AUTO_COMMIT change)
> 2) the original code - DB_AUTO_COMMIT ( and tid=0x0 )
> 3) Howard's patch (DB_AUTO_COMMIT and tid patch)
> I still see the same problem for all three cases.
> >From the stack trace, it seems that DB_OPEN is a sort of
> self-stalled.
> (See attached file: stacktrace.8)
>
> - Jong
>
> ------------------------
> Jong Hyuk Choi
> IBM Thomas J. Watson Research Center - Enterprise Linux Group
> P. O. Box 218, Yorktown Heights, NY 10598
> email: jongchoi@us.ibm.com
> (phone) 914-945-3979    (fax) 914-945-4425   TL: 862-3979
>
>
> "Howard Chu" <hyc@highlandsun.com>@OpenLDAP.org on 03/17/2003
> 06:02:36 PM
>
> Sent by:    owner-openldap-devel@OpenLDAP.org
>
>
> To:    Jonghyuk Choi/Watson/IBM@IBMUS
> cc:    "'Kurt D. Zeilenga'" <Kurt@OpenLDAP.org>,
>        <openldap-devel@OpenLDAP.org>
> Subject:    RE: back-bdb future
>
>
>
> > -----Original Message-----
> > From: Jonghyuk Choi [mailto:jongchoi@us.ibm.com]
>
> > It seems that deadlock freedom is not guaranteed if a DB access
> > is outside transaction when we use the BDB transactional store.
> > The deadlock case in 8 way machine is somewhat strange.
> > It was only search threads that were attempting to open the
> > index database.
> > If deadlock occurs among search threads, timeout for txns
> > would not help.
> > Any idea why only search threads reach deadlock ?
> > Unless we use CDB, even search only case not free from deadlock ?
> > - Jong
>
> Um... I wonder if this is because we make BDB wrap all
> DB->open calls in
> their own transactions? (See back-bdb.h, DB_AUTO_COMMIT.)
> This may be the
> problem; we should have propagated the DB_TXN from
> bdb_index_values into
> bdb_db_cache. For bdb_index_param which is used for searches,
> we shouldn't
> use a txn. I've got this patched, can you see if it makes a
> difference?
>
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support
>
>