Yin Wang wrote:
Our study shows another potential deadlock in back-bdb/cache.c
OpenLDAP 2.4.8
2.4.8 is a few months old already; 2.4.9 is just about to be released. Your
study should be working with CVS HEAD, to avoid reporting on bugs that have
already been fixed. Working with old code isn't useful.
In bdb_cache_release_all(), thread wants to lock the c_lru_mutex
at cache.c:1366, while it has the c_rwlock from cache.c:1364
The locks in that function are superfluous, since it can only be called while
the database is shutting down. There are no other active threads when this
function runs.
In bdb_cache_delete_internal(), thread wants to lock the c_rwlock
at cache.c:1317, while it has the c_lru_mutex from callers,
bdb_cache_delete() at cache.c:1259, or bdb_cache_lru_purge() at
cache.c:652.
Note that two deadlock bugs of the same two mutexes have been
reported and verified in the issue tracking system
http://www.openldap.org/its/index.cgi/Software%20Bugs?id=4254
http://www.openldap.org/its/index.cgi/Software%20Bugs?id=3494
Those bug reports were closed 2-3 years ago. You need to focus on something
recent in order to have any relevance.
Yin Wang
--
-- Howard Chu
CTO, Symas Corp.
http://www.symas.com
Director, Highland Sun
http://highlandsun.com/hyc/
Chief Architect, OpenLDAP
http://www.openldap.org/project/