Bug 979169 - allow setting db deadlock rejection policy
allow setting db deadlock rejection policy
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Rich Megginson
Sankar Ramalingam
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-27 15:50 EDT by Rich Megginson
Modified: 2013-11-21 16:09 EST (History)
4 users (show)

See Also:
Fixed In Version: 389-ds-base-1.2.11.15-22.el6
Doc Type: Bug Fix
Doc Text:
Cause: Under certain conditions, with a mix of concurrent search and update and outgoing replication operations, there will be deadlocks in the changelog db, leading to error messages like this: NSMMReplicationPlugin - changelog program - _cl5WriteOperationTxn: failed to write entry with csn (XXXXXXX); db error - -30994 DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock This is caused by a deadlock between the changelog readers, writers, and main database writers. Consequence: Update operations will fail with the above error message in the directory server errors log. Fix: A new configuration parameter is introduced: dn: cn=config,cn=ldbm database,cn=plugins,cn=config nsslapd-db-deadlock-policy: 9 With the default policy 9 (DB_LOCK_YOUNGEST), the last locker gets killed when there is a deadlock. In the case that this is the changelog writer, the write will fail, and the entire update will fail. Users who frequently see the above errors in the errors log are advised to change this setting to 6 (DB_LOCK_MINWRITE) will which instead kill the locker that has the fewest write locks (that is, the changelog reader). The changelog reader code has been changed to handle this deadlock condition and retry. The setting can be changed like this: ldapmodify -x -D "cn=directory manager" -W <<EOF dn: cn=config,cn=ldbm database,cn=plugins,cn=config changetype: modify replace: nsslapd-db-deadlock-policy nsslapd-db-deadlock-policy: 6 EOF You may ask why the default is not changed to 6. The answer is that the setting will apply to _all_ threads, so that changing this setting could cause regular search requests to fail, if the directory server is under a heavy update load. In our testing, we did not see this happen, but we cannot guarantee that changing this value to 6 will not impact regular search requests. Result: After changing nsslapd-db-deadlock-policy to 6, updates will succeed and no longer cause errors like the above.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 16:09:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rich Megginson 2013-06-27 15:50:10 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47409

The deadlock_threadmain DBENV->lock_detect atype is currently hardcoded to DB_LOCK_YOUNGEST which works in most cases.  We need the ability to change this.
Comment 2 Milan Kubík 2013-07-08 09:34:55 EDT
Bugzilla covered in basic acceptance suite.
Comment 3 Sankar Ramalingam 2013-07-08 09:51:48 EDT
Unchecking the "Red Hat Employee (internal)" group since it was accidentally selected.
Comment 5 Rich Megginson 2013-08-08 15:33:28 EDT
NOTE: doc text is the same as https://bugzilla.redhat.com/show_bug.cgi?id=975250
Comment 6 Milan Kubík 2013-08-09 09:51:44 EDT
All related test cases in basic passing with 1.2.11.15-22. Marking VERIFIED.
Comment 7 errata-xmlrpc 2013-11-21 16:09:56 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-1653.html

Note You need to log in before you can comment on or make changes to this bug.