From 179c018e99350c7ee051a281a3466ef46004a255 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Fri, 26 Oct 2012 10:02:38 -0700 Subject: [PATCH 08/10] Trac Ticket #494 - slapd entered to infinite loop during new index addition https://fedorahosted.org/389/ticket/494 Bug Description: An entry which rdn is nsuniqueid=...,nsuniqueid=... was accidentally generated. It broke the entryrdn tree and put the reindex and export into the the infinite loop. Fix Description: Added an missing check if the retrieved entry is already an tombstone or not. This tombstone is the one converted by the entryusn plugin. Please note that replication has an urp code which handles such conflicts. (cherry-picked from commit b963576d2758d29e8d21297e8f763d0373895b9f) (cherry picked from commit 31d15788d4e988646a42252f6ea351f033206a96) --- ldap/servers/slapd/back-ldbm/ldbm_delete.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c index 73c3658..528693e 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c @@ -290,6 +290,13 @@ ldbm_back_delete( Slapi_PBlock *pb ) create_tombstone_entry = (create_tombstone_entry < 0) ? 0 : 1; } } + if (create_tombstone_entry && is_tombstone_entry) { + slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete", + "Attempt to convert a tombstone entry %s to tombstone\n", dn); + retval = -1; + ldap_result_code = LDAP_UNWILLING_TO_PERFORM; + goto error_return; + } #if DEBUG slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_delete", -- 1.7.1