Bug 718351 - Intensive updates on masters could break the consumer's cache
Summary: Intensive updates on masters could break the consumer's cache
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
Depends On: 718303
Blocks: 434915 389_1.2.9 719068
TreeView+ depends on / blocked
Reported: 2011-07-01 21:37 UTC by Noriko Hosoi
Modified: 2015-01-04 23:49 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-
Doc Type: Bug Fix
Doc Text:
Clone Of: 718303
Last Closed: 2011-12-06 17:51:32 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1711 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2011-12-06 01:02:20 UTC

Description Noriko Hosoi 2011-07-01 21:37:15 UTC
+++ This bug was initially created as a clone of Bug #718303 +++

Description of problem:
1. Set up 2-way MMR + consumer, which is fed by both masters.
2. Run ldclt (ADD, MOD, DELETE) on a master.
3. Run repeated create + delete VLV index (script being attached).
(Note: The VLV creation+deletion limits the backend's available time minimum.
 In the very short time, update requests from 2 masters come in and cause
 conflicts very easily.)
The combined test (2 and 3) crashes the server.

--- Additional comment from nhosoi@redhat.com on 2011-07-01 15:49:32 EDT ---

Created attachment 510927 [details]
git patch file (master)

Description: When adding a tombstone to the entry cache, the source
code assumed the original entry already existed in the cache and
cache_add failed.  But under some high stress + narrow window to
receive the updates from multi-masters, the original entry could
have been already evicted and the tombstone could be successfully
added to the entry cache.  When the rare case occurred, the entry
in the cache was freed instead of put into LRU and when the entry
was searched in the entry cache, the server died by segfault.

This patch checks the entry after attempting to put it into the
entry cache.  If the entry's state is in-cache, sets the correct
flag (tombstone_in_cache = 1).

Sample log in the test:
[..] - id2entry_add tombstone (nsuniqueid=f6542bc3-a37f11e0-a7fbe1fb-26a727ee,nsuniqueid=f6542bc3-a37f11e0-a7fbe1fb-26a727ee+uid=emailperson_4901152,dc=example,dc=com) is in cache

--- Additional comment from nhosoi@redhat.com on 2011-07-01 17:35:29 EDT ---

Reviewed by Rich and Nathan (Thank you!!!)

Pushed to master.

$ git merge 718303
Merge made by recursive.
 ldap/servers/slapd/back-ldbm/ldbm_delete.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

$ git push
Counting objects: 24, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 1.66 KiB, done.
Total 13 (delta 9), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   b554264..f069f4b  master -> master

(cherry picked from commit 20c42018a6cacde318c4213568ff4d31404af6e0)
$ git push redhat RHEL-6
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 1.19 KiB, done.
Total 7 (delta 5), reused 1 (delta 1)
To ssh://git.engineering.redhat.com/srv/git/users/rmeggins/ds.git
   fc7ed8f..695e2f1  RHEL-6 -> RHEL-6

Comment 6 Amita Sharma 2011-09-08 11:35:35 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=718303 - Already VERIFIED the clone so marking this as VERIFIED.

Comment 7 errata-xmlrpc 2011-12-06 17:51:32 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.


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