Bug 1109354

Summary: Tombstone purging can crash the server if the backend is stopped/disabled
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.1CC: nkinder, rmeggins, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.3.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1109352 Environment:
Last Closed: 2015-03-05 09:35:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1109352    
Bug Blocks:    

Description Noriko Hosoi 2014-06-13 18:04:59 UTC
+++ This bug was initially created as a clone of Bug #1109352 +++

This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47766

If the tombstone purging thread fires up while a backend has an online import occurring(backend state is STOPPED), the server will crash.

Comment 2 Jenny Severance 2014-10-23 14:29:09 UTC
STEPS:

Set up MMR.

Add large enough number of entries (e.g., 100KB) to make sure the future consumer initialization takes enough time to have tombstone purging while the initialization is running.

Set small number (e.g., 10 sec) to these config params on all the servers.
nsds5ReplicaPurgeDelay
nsds5ReplicaTombstonePurgeInterval

Delete some entries.

Restart the server.

Run consumer initialization.

If the initialization is successfully done, the fix is verified.

Comment 3 Viktor Ashirov 2014-12-10 16:44:45 UTC
$ rpm -qa  | grep 389
389-ds-base-1.3.3.1-9.el7.x86_64
389-ds-base-debuginfo-1.3.3.1-9.el7.x86_64
389-ds-base-libs-1.3.3.1-9.el7.x86_64

I followed the steps in c#2, added 100k entries, deleted 1k, restarted the server and ran consumer initialization: 

[10/Dec/2014:17:35:24 +0100] - import userRoot: Processed 37314 entries -- average rate 1865.7/sec, recent rate 1865.7/sec, hit ratio 0%
[10/Dec/2014:17:35:49 +0100] - import userRoot: Processed 72966 entries -- average rate 1621.5/sec, recent rate 1621.4/sec, hit ratio 100%
[10/Dec/2014:17:36:05 +0100] - import userRoot: Workers finished; cleaning up...
[10/Dec/2014:17:36:06 +0100] - import userRoot: Workers cleaned up.
[10/Dec/2014:17:36:06 +0100] - import userRoot: Indexing complete.  Post-processing...
[10/Dec/2014:17:36:06 +0100] - import userRoot: Generating numsubordinates (this may take several minutes to complete)...
[10/Dec/2014:17:36:06 +0100] - import userRoot: Generating numSubordinates complete.
[10/Dec/2014:17:36:06 +0100] - import userRoot: Gathering ancestorid non-leaf IDs...
[10/Dec/2014:17:36:06 +0100] - import userRoot: Finished gathering ancestorid non-leaf IDs.
[10/Dec/2014:17:36:06 +0100] - import userRoot: Creating ancestorid index (new idl)...
[10/Dec/2014:17:36:06 +0100] - import userRoot: Created ancestorid index (new idl).
[10/Dec/2014:17:36:10 +0100] - import userRoot: Flushing caches...
[10/Dec/2014:17:36:10 +0100] - import userRoot: Closing files...
[10/Dec/2014:17:36:11 +0100] - import userRoot: Import complete.  Processed 100018 entries in 68 seconds. (1470.85 entries/sec)

Replica was successfully initialized, served didn't crash. Marking as VERIFIED.

Comment 5 errata-xmlrpc 2015-03-05 09:35:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html