Description of problem: thanks a lot Hiroko Miura for pointing this issue. Customer is reindexing several times same attribute using the console (on-line reindex). Second time using a matching rule. The index shows corrupt by using dbverify. Version-Release number of selected component (if applicable): 389-ds-base-1.2.11.15-50 How reproducible: rather always. Steps to Reproduce: 1. create instance / suffix 2. import 60 entries of this shape: dn: uid=user2,ou=people,o=redhat objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetorgperson objectclass: posixAccount uid: user2 userpassword: user2 uidnumber: 2 gidnumber: 2 cn: user2 sn: user2 3. Add index by uidnumber: dn: cn=uidnumber,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config changetype: add objectClass: top objectClass: nsIndex cn: uidnumber nsSystemIndex: false nsIndexType: pres nsIndexType: eq 4. Apply index /usr/lib64/dirsrv/slapd-server2/db2index.pl -n userroot -D "cn=directory manager" -w secret12 -t uidnumber 5. wait for the reindex to be finished. 6. modify index in this way: dn: cn=uidnumber,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config changetype: modify add: nsMatchingRule nsMatchingRule: integerOrderingMatch 7. Re-apply index /usr/lib64/dirsrv/slapd-server2/db2index.pl -n userroot -D "cn=directory manager" -w secret12 -t uidnumber 8. Stop server 9. Run dbverify [root@rh6 ~]# /usr/lib64/dirsrv/slapd-server2/dbverify [29/Jun/2015:18:25:33 +0200] - libdb: Page 1: out-of-order key at entry 124 [29/Jun/2015:18:25:33 +0200] - libdb: Page 1: out-of-order key at entry 146 [29/Jun/2015:18:25:33 +0200] - libdb: Page 1: out-of-order key at entry 168 [29/Jun/2015:18:25:33 +0200] - libdb: Page 1: out-of-order key at entry 190 [29/Jun/2015:18:25:33 +0200] - libdb: /var/lib/dirsrv/slapd-server2/db/userRoot/uidnumber.db4: DB_VERIFY_BAD: Database verification failed [29/Jun/2015:18:25:33 +0200] DB verify - verify failed(-30972): /var/lib/dirsrv/slapd-server2/db/userRoot/uidnumber.db4 Actual results: index corrupted. Expected results: not corrupted. Additional info: Easy workaround: reindex off-line.
Created attachment 1044469 [details] ldif used to reproduce the issue.
Unfortunately, it's too late for RHEL-6.7. Resetting the target version to rhel-6.8.0.
Upstream ticket: https://fedorahosted.org/389/ticket/48212
Build tested: 389-ds-base-1.2.11.15-73.el6.x86_64 [root@rhel6ds 1236656]# sh -x reproducer.sh + resetds.sh Removing instances. Removing instance [/etc/dirsrv/slapd-rhel6ds] Setting up new instance. SUCCESS ! Elapsed time: 12 sec + ldclt -h localhost -p 389 -D 'cn=Directory Manager' -w Secret123 -b ou=people,dc=example,dc=com -I 68 -e add,commoncounter -e 'object=posix_users.ldif,rdn=uid:[A=INCRNNOLOOP(0;100;5)]' ldclt version 4.23 ldclt[16278]: Starting at Tue Feb 23 15:16:30 2016 ldclt[16278]: T004: Hit top incrementeal value ldclt[16278]: T004: thread is dead. ldclt[16278]: T005: Hit top incrementeal value ldclt[16278]: T005: thread is dead. ldclt[16278]: T006: Hit top incrementeal value ldclt[16278]: T006: thread is dead. ldclt[16278]: T007: Hit top incrementeal value ldclt[16278]: T007: thread is dead. ldclt[16278]: T008: Hit top incrementeal value ldclt[16278]: T008: thread is dead. ldclt[16278]: T009: Hit top incrementeal value ldclt[16278]: T009: thread is dead. ldclt[16278]: T002: Hit top incrementeal value ldclt[16278]: T002: thread is dead. ldclt[16278]: T003: Hit top incrementeal value ldclt[16278]: T003: thread is dead. ldclt[16278]: T001: Hit top incrementeal value ldclt[16278]: T001: thread is dead. ldclt[16278]: T000: Hit top incrementeal value ldclt[16278]: T000: thread is dead. ldclt[16278]: Average rate: 10.10/thr ( 10.10/sec), total: 101 ldclt[16278]: Average rate: 0.00/thr ( 0.00/sec), total: 0 ldclt[16278]: All threads are dead - exit. ldclt[16278]: Global average rate: 10.10/thr ( 5.05/sec), total: 101 ldclt[16278]: Global number times "no activity" reports: never ldclt[16278]: Global number of dead threads: 10 ldclt[16278]: Global no error occurs during this session. ldclt[16278]: Ending at Tue Feb 23 15:16:50 2016 ldclt[16278]: Exit status 0 - No problem during execution. + ldapadd -D 'cn=Directory Manager' -w Secret123 adding new entry "cn=uidnumber,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config" + /usr/lib64/dirsrv/slapd-rhel6ds/db2index.pl -n userRoot -D 'cn=Directory Manager' -w Secret123 -t uidnumber adding new entry "cn=db2index_2016_2_23_15_16_50, cn=index, cn=tasks, cn=config" + sleep 30 + ldapadd -D 'cn=Directory Manager' -w Secret123 modifying entry "cn=uidnumber,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config" + /usr/lib64/dirsrv/slapd-rhel6ds/db2index.pl -n userRoot -D 'cn=Directory Manager' -w Secret123 -t uidnumber adding new entry "cn=db2index_2016_2_23_15_17_21, cn=index, cn=tasks, cn=config" + stop-dirsrv Stopping instance "rhel6ds" + /usr/lib64/dirsrv/slapd-rhel6ds/dbverify DB verify: Passed Marking as VERIFIED.
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. https://rhn.redhat.com/errata/RHBA-2016-0737.html