Bug 643532 - Incorrect DNs sometimes returned on searches
Summary: Incorrect DNs sometimes returned on searches
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Database - Indexes/Searches
Version: 1.2.6
Hardware: All
OS: Linux
high
urgent
Target Milestone: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 389_1.2.7 639035
TreeView+ depends on / blocked
 
Reported: 2010-10-15 21:45 UTC by Noriko Hosoi
Modified: 2015-12-07 17:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:12:09 UTC


Attachments (Terms of Use)
Problem report by Eric Torgersen. (8.10 KB, text/plain)
2010-10-15 21:45 UTC, Noriko Hosoi
no flags Details
test script to reproduce the problem (947 bytes, text/plain)
2010-10-15 21:50 UTC, Noriko Hosoi
no flags Details
git patch file (master) (2.99 KB, patch)
2010-10-15 22:18 UTC, Noriko Hosoi
nhosoi: review?
rmeggins: review+
Details | Diff

Description Noriko Hosoi 2010-10-15 21:45:07 UTC
Created attachment 453805 [details]
Problem report by Eric Torgersen.

Description of problem:
By running simultaneous repeated searches, the server sometimes returns corrupted DNs.

Comment 1 Noriko Hosoi 2010-10-15 21:50:17 UTC
Created attachment 453807 [details]
test script to reproduce the problem

How to run it.

cp /path/to/search.sh .
dbgen.pl -o example100k.ldif -n 100000
sh search.sh & sh search.sh & sh search.sh

The script exits with this error:
uid=SHosier11721,ou=Product Testing,dc=example,dc=com and  do not match (N is 11728)

Comment 2 Noriko Hosoi 2010-10-15 21:51:56 UTC
(In reply to comment #1)
> Created attachment 453807 [details]
> test script to reproduce the problem
> 
> How to run it.
Note: These variables in the script need to be modified to adjust to each server:
MOZSEARCH=/usr/lib64/mozldap/ldapsearch
PORT=10389
BINDDN="cn=directory manager"
BINDPW="Secret123"
SRCLDIF=/export/tests/brokenDN/example100k.ldif
MAXCNT=100000
FAILED=/export/tests/brokenDN/failed

Comment 3 Noriko Hosoi 2010-10-15 22:18:26 UTC
Created attachment 453814 [details]
git patch file (master)

Description: Some of the functions in ldbm_entryrdn.c uses
static memory for reading data from the entryrdn index, where
the static initializer should not have been used since the
memory cannot be shared among threads.  This patch fixes it.

File:
 ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c

Comment 4 Noriko Hosoi 2010-10-15 22:54:01 UTC
Reviewed by Rich (Thank you!!!).

Pushed to master.

$ git merge 643532
Updating 0b7a846..f39aab7
Fast-forward
 ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

$ git push
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 902 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   0b7a846..f39aab7  master -> master

Comment 5 Amita Sharma 2011-05-23 13:59:26 UTC
Tested with steps :
cp /path/to/search.sh .
dbgen.pl -o example100k.ldif -n 100000
sh search.sh & sh search.sh & sh search.sh

Verified Successfully.


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