Bug 643532

Summary: Incorrect DNs sometimes returned on searches
Product: [Retired] 389 Reporter: Noriko Hosoi <nhosoi>
Component: Database - Indexes/SearchesAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: urgent Docs Contact:
Priority: high    
Version: 1.2.6CC: amsharma, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 17:12:09 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:    
Bug Blocks: 576869, 639035    
Attachments:
Description Flags
Problem report by Eric Torgersen.
none
test script to reproduce the problem
none
git patch file (master) nhosoi: review?, rmeggins: review+

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.