[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Crash in LRU_DELETE (ITS#2759)
> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of ocmer@home.nl
> Full_Name: ocmer
> Version: 2.1.22
> OS: Linux 2.4.20-13.7smp
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (217.120.171.59)
> In ./servers/slapd/back-bdb/cache.c, the combination of the
> LRU_DELETE and
> LRU_ADD call is listed 4 times.
> In bdb_cache_add_entry_rw and bdb_cache_update_entry, the
> calls are protected by
> locking both c_rwlock and lru_mutex.
> In bdb_cache_find_entry_ndn2id and bdb_cache_find_entry_id,
> the calls are
> protected by locking only the lru_mutex.
> After we locked the c_rwlock as wel in
> bdb_cache_find_entry_ndn2id for the
> LRU_DELETE and LRU_ADD calls, we run a test of 20 hours on 1
> CPU without any
> problems.
I have briefly tested this change and it appears OK. Oddly enough, I first
tested this identical change on May 19 and never committed it, because I was
unable to confirm that it fixed the problem. Given your report, I'll commit
this fix.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support