Thursday, July 3, 2014

[389-commits] ldap/servers

ldap/servers/plugins/dna/dna.c | 113 +++++++++++++++++++++++++++++++++--------
1 file changed, 91 insertions(+), 22 deletions(-)

New commits:
commit badd35439b8ec5e7ccac070e5c8ef66565f75866
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Wed Jul 2 16:11:49 2014 -0400

Ticket 47779 - Potential deadlock after startup if a dna configuration change is made

Bug Description: DNA delays the shared server configuration creation
until 30 seconds after startup to allow other plugins
to start (replication and retro cl). This delayed config
event starts a transaction while holding the read lock
which can lead to a deadlock.

Fix Description: Make a one time copy of the shared server config for
the config update event so we don't need to hold any
locks while starting the backend transaction.

https://fedorahosted.org/389/ticket/47779

valgrind: passed
jenkins: passed

Reviewed by: rmeggins(Thanks!)

diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index d7049f9..6162137 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -247,7 +247,7 @@ static int dna_be_txn_preop_init(Slapi_PBlock *pb);
*/
static int dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq);
static int dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply);
-static void dna_delete_config();
+static void dna_delete_config(PRCList *list);
static void dna_free_config_entry(struct configEntry ** entry);
static int dna_load_host_port();

@@ -294,7 +294,7 @@ static int dna_get_remote_config_info( struct dnaServer *server, char **bind_dn,
static int dna_load_shared_servers();
static void dna_delete_global_servers();
static int dna_get_shared_config_attr_val(struct configEntry *config_entry, char *attr, char *value);
-
+static PRCList *dna_config_copy();
/**
*
* the ops (where the real work is done)
@@ -327,6 +327,63 @@ void plugin_init_debug_level(int *level_ptr)
}

No comments:

Post a Comment