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

overlays break ctxcsn management (ITS#3288)

Full_Name: Howard Chu
Version: HEAD/2.2.15
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (
Submitted by: hyc

The overlay framework copies the BackendDB structure before invoking any
configured overlays. One of the fields in the BackendDB is a mutex for
protecting the pending_csn list. It appears that the mutex may somehow get
locked in the actual BackendDB, and then the locked state is preserved in the
copy. The mutex may get properly unlocked in the actual BackendDB, but the copy
will never get unlocked. If the overlay operation involves a modify that needs
to manipulate the csn list, it will hang waiting for the duplicated mutex.

My proposed solution is to add a be_pcl_mutexp field that points to the
be_pcl_mutex, and using this pointer instead of using &be_pcl_mutex directly.
This approach insures that all code will be manipulating the actual mutex.