Tuesday, June 24, 2014

[389-commits] ldap/servers

ldap/servers/slapd/back-ldbm/import.c | 4 ++++
1 file changed, 4 insertions(+)

New commits:
commit 02600dad033e7910b566c9698491ef2a2cef4538
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Tue Jun 24 17:48:14 2014 -0400

Ticket 47827 - online import crashes server if using verbose error logging

Bug Description: When using verbose logging and running an import task, the
server will crash at the end of the import. The verbose
logging changes the internal timing and exposes a race condition
where the task queue frees the import job before the import

Fix Description: Wait for the backend instance to be set as "not busy" before
freeing the import task.


Reviewed by: nhosoi(Thanks!)

diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 7149ef0..3c195e2 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -217,6 +217,10 @@ static void import_task_destroy(Slapi_Task *task)
ImportJob *job = (ImportJob *)slapi_task_get_data(task);

+ while(is_instance_busy(job->inst)){
+ /* wait for the job to finish before freeing it */
+ DS_Sleep(PR_SecondsToInterval(1));
+ }
if (job && job->task_status) {
slapi_ch_free((void **)&job->task_status);
job->task_status = NULL;

389 commits mailing list

No comments:

Post a Comment