Bug 833202 - transaction retries need to be cache aware
Summary: transaction retries need to be cache aware
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-18 21:07 UTC by Nathan Kinder
Modified: 2013-02-21 08:18 UTC (History)
3 users (show)

Fixed In Version: 389-ds-base-1.2.11.12-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Having a directory server under a heavy update load. Consequence: Directory server crashes. Stack trace shows crash in libback-ldbm.so shared library in the ns-slapd process. Fix: Do not free internal entries that are in the cache when retrying failed transactions due to deadlock. Result: Directory server does not crash under a heavy update load.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:18:08 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0503 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2013-02-21 08:18:44 UTC

Description Nathan Kinder 2012-06-18 21:07:12 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/335

The code that resets the original entries/mods/etc. when retrying deadlocked transactions in ldbm_back_delete et. al. need to be cache aware when deleting entries that are cached - for example, ldbm_delete.c:485
{{{
			backentry_free(&e);
}}}
The problem is that e is cached, so cannot be freed like this.  Freeing cached entries seems to cause problems in the server, assertion failures, other crashes.

Comment 1 Jenny Severance 2012-06-19 18:36:13 UTC
Please add steps to verify this bug

Comment 2 Noriko Hosoi 2012-06-21 17:06:46 UTC
The attached test scripts and steps in this comment can be shared for verifying this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=834096#c7

After running the test, run search all.
ldapsearch -x ... -b "dc=example,dc=com" >> OUTPUT0

Restart the server and run search all, again.
ldapsearch -x ... -b "dc=example,dc=com" >> OUTPUT1

The 2 outputs OUTPUT0 and OUTPUT1 are supposed to be identical (to ensure the cache reflects the entries in DB).

Comment 3 Rich Megginson 2012-07-07 14:28:32 UTC
Also covered by the new test multi_plugin - the stress test
testcases/DS/6.0/multi_plugin
------------------------------------------------------------------------
r6706 | rmeggins@REDHAT.COM | 2012-07-07 08:24:23 -0600 (Sat, 07 Jul 2012) | 16 lines

Add multi_plugin test suite
This test enables and configures multiple plugins in the style
of ipa.  The stress version of this test will enable the 
TXN_TESTING in the server which will exercise the txn deadlock
and retry code paths in the server.
Tickets covered by this test:
Ticket #345 - db deadlock return should not log error
Ticket #387 - managed entry sometimes doesn't delete the managed entry
Ticket #360 - ldapmodify returns Operations error
Ticket #335 - transaction retries need to be cache aware
Bugs covered by this test:
830336 db deadlock return should not log error
830343 managed entry sometimes doesn't delete the managed entry
833218 ldapmodify returns Operations error
833202 transaction retries need to be cache aware

Comment 5 Ján Rusnačko 2013-01-29 11:30:54 UTC
On RHEL 6.4 Snapshot 5 with 389-ds-base-1.2.11.15-11.el6.x86_64:

multi_plugin startup 	100% (1/1)
multi_plugin run 	100% (6/6)
multi_plugin cleanup 	100% (1/1)

Verified.

Comment 7 errata-xmlrpc 2013-02-21 08:18:08 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.

http://rhn.redhat.com/errata/RHSA-2013-0503.html


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