Bug 1074084

Summary: e_uniqueid fails to set if an entry is a conflict entry
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mkubik, nhosoi, nkinder, rpacheco
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.6-24.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:43:42 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:

Description Noriko Hosoi 2014-03-07 21:30:53 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47735

When an entry is turned to be a conflict entry, its nsUniqueId has a mdcsn info as a subtype like this:
 nsUniqueId;mdcsn-5319136f000200010000: c5e0d787-a58f11e3-b7f9dfd1-acc3d5e4

In this case, the attribute type is assigned to the berval "type" as follows:
 type.bv_val = "nsUniqueId;mdcsn-5319136f000200010000"
 type.bv_len = 37

The subtyped stateinfo is processed in str2entry_state_information_from_type, which modifies type.bv_val to "nsUniqueId", but type.bv_len remains 37.

str2entry_fast has this logic to set e_uniqueid, where the nsUniqueId with stateinfo fails to set the value to e_uniqueid.
if ( type.bv_len == 10 && PL_strncasecmp (type.bv_val, "nsUniqueId", type.bv_len) == 0 ){

Note: this is a regression introduced in RHEL-7.0 by Bug 1032318 - entries with empty objectclass attribute value can be hidden

Comment 1 Sankar Ramalingam 2014-03-10 06:46:25 UTC
Hi Noriko, requesting you to add steps to reproduce.

Comment 2 Noriko Hosoi 2014-03-10 15:53:31 UTC
(In reply to Sankar Ramalingam from comment #1)
> Hi Noriko, requesting you to add steps to reproduce.

Set up MMR.
Repeat adding and deleting the same entry on each master to generate a conflict entry.
Run search the entry in parallel.

It used to crash the server.

Comment 4 Nathan Kinder 2014-03-13 20:45:43 UTC
*** Bug 1076191 has been marked as a duplicate of this bug. ***

Comment 5 Noriko Hosoi 2014-03-14 00:22:41 UTC
Fixed the Intex failure in 389-ds-base-1.3.1.6-24.el7

Comment 6 Noriko Hosoi 2014-03-14 00:29:43 UTC
(In reply to Noriko Hosoi from comment #5)
> Fixed the Intex failure in 389-ds-base-1.3.1.6-24.el7

^Intex^Index^, of course...

Comment 7 Milan Kubík 2014-03-14 14:39:37 UTC
While running on the newest build the scenario from #2, this happened
http://pastebin.test.redhat.com/197477

Is this some known defect or a new bug/regression?

Comment 8 Noriko Hosoi 2014-03-14 16:50:56 UTC
(In reply to Milan Kubík from comment #7)
> While running on the newest build the scenario from #2, this happened
> http://pastebin.test.redhat.com/197477
> 
> Is this some known defect or a new bug/regression?

Thank you for retesting the new build, Milan.  I believe this is a new bug.  If e_uniqueid is not set, it crashes the server.

Could you open a new bug and set the target to 7.1?  Thanks!!

Comment 11 Ludek Smid 2014-06-13 12:43:42 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.