Bug 1117021
| Summary: | Server deadlock if online import started while server is under load | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Noriko Hosoi <nhosoi> |
| Component: | 389-ds-base | Assignee: | Noriko Hosoi <nhosoi> |
| Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | mreynolds, nkinder, rmeggins, vashirov |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 389-ds-base-1.3.3.1-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 09:35:40 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-07-07 20:05:31 UTC
Verification Steps: [1] Install a single instance of 389 using "dc=example,dc=com" [2] Enable the changelog Example: ldapmodify -D "cn=directory manager" ... dn: cn=changelog5,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: changelog5 nsslapd-changelogdir: /var/lib/dirsrv/slapd-localhost/changelogdb [3] Enable replication Example: ldapmodify -D "cn=directory manager" ... dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config changetype: add objectClass: nsDS5Replica objectClass: top nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaType: 3 nsDS5Flags: 1 nsDS5ReplicaId: 1 nsds5ReplicaPurgeDelay: 604800 cn: replica [4] Create a replication agreement that points to a non-existent server on the same machine: Example: ldapmodify -D "cn=directory manager" ... dn: cn=fake agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config changetype: add objectClass: top objectClass: nsDS5ReplicationAgreement description: fake agreement cn: fake agreement nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaHost: localhost.localdomain nsDS5ReplicaPort: 5555 nsDS5ReplicaBindDN: uid=doesn'tmatter nsDS5ReplicaTransportInfo: LDAP nsDS5ReplicaBindMethod: SIMPLE nsDS5ReplicaCredentials: nothing [5] Make some updates to the database [6] Export the database(retaining the replication state information) Example: ldapmodify -D "cn=directory manager" ... dn: cn=export1404764503038,cn=export,cn=tasks,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: export1404764503038 ttl: 4 nsfilename: /tmp/deadlock.ldif nsinstance: userroot nsuseonefile: TRUE nsexportreplica: TRUE [7] Restart the server [8] Import the ldif(/tmp/export.ldif) ldapmodify -D "cn=directory manager" ... dn: cn=import1404764623289,cn=import,cn=tasks,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: import1404764623289 ttl: 4 nsfilename: /tmp/deadlock.ldif nsinstance: userroot [9] Search for tombstone entries: ldapsearch -D "directory manager -w Secret123 -b "dc=example,dc=com" -xLLL objectclass=nstombstone This search should NOT hang and return at least one entry (cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config). Fixed upstream. $ rpm -qa | grep 389
389-ds-base-libs-1.3.3.1-12.el7.x86_64
389-ds-base-debuginfo-1.3.3.1-12.el7.x86_64
389-ds-base-1.3.3.1-12.el7.x86_64
[1] Install a single instance of 389 using "dc=example,dc=com"
[2] Enable the changelog
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -a << EOF
dn: cn=changelog5,cn=config
objectclass: top
objectclass: extensibleObject
cn: changelog5
nsslapd-changelogdir: /var/lib/dirsrv/slapd-rhel7/changelogdb
EOF
adding new entry "cn=changelog5,cn=config"
[3] Enable replication
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -a << EOF
dn: cn=replica,cn="dc=example,dc=com",cn=mapping tree,cn=config
changetype: add
objectclass: top
objectclass: nsds5replica
objectclass: extensibleObject
cn: replica
nsds5replicaroot: dc=example,dc=com
nsds5replicaid: 7
nsds5replicatype: 3
nsds5flags: 1
nsds5ReplicaPurgeDelay: 604800
nsds5ReplicaBindDN: cn=SyncManager,cn=config
EOF
adding new entry "cn=replica,cn="dc=example,dc=com",cn=mapping tree,cn=config"
[4] Create a replication agreement that points to a non-existent server on the same machine:
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -a << EOF
dn: cn=fake agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
changetype: add
objectClass: top
objectClass: nsDS5ReplicationAgreement
description: fake agreement
cn: fake agreement
nsDS5ReplicaRoot: dc=example,dc=com
nsDS5ReplicaHost: localhost.localdomain
nsDS5ReplicaPort: 5555
nsDS5ReplicaBindDN: uid=doesn'tmatter
nsDS5ReplicaTransportInfo: LDAP
nsDS5ReplicaBindMethod: SIMPLE
nsDS5ReplicaCredentials: nothing
EOF
adding new entry "cn=fake agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config"
[5] Make some updates to the database
ldapmodify -D "cn=Directory Manager" -w Secret123 -a -f 10users.ldif
adding new entry "cn=user1,ou=People,dc=example,dc=com"
adding new entry "cn=user2,ou=People,dc=example,dc=com"
adding new entry "cn=user3,ou=People,dc=example,dc=com"
adding new entry "cn=user4,ou=People,dc=example,dc=com"
adding new entry "cn=user5,ou=People,dc=example,dc=com"
adding new entry "cn=user6,ou=People,dc=example,dc=com"
adding new entry "cn=user7,ou=People,dc=example,dc=com"
adding new entry "cn=user8,ou=People,dc=example,dc=com"
adding new entry "cn=user9,ou=People,dc=example,dc=com"
adding new entry "cn=user10,ou=People,dc=example,dc=com"
[6] Export the database(retaining the replication state information)
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -a << EOF
dn: cn=export1404764503038,cn=export,cn=tasks,cn=config
changetype: add
objectClass: top
objectClass: extensibleObject
cn: export1404764503038
ttl: 4
nsfilename: /tmp/deadlock.ldif
nsinstance: userroot
nsuseonefile: TRUE
nsexportreplica: TRUE
EOF
adding new entry "cn=export1404764503038,cn=export,cn=tasks,cn=config"
[7] Restart the server
sudo systemctl restart dirsrv.target
[8] Import the ldif(/tmp/export.ldif)
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -a << EOF
dn: cn=import1404764623289,cn=import,cn=tasks,cn=config
changetype: add
objectClass: top
objectClass: extensibleObject
cn: import1404764623289
ttl: 4
nsfilename: /tmp/deadlock.ldif
nsinstance: userroot
EOF
adding new entry "cn=import1404764623289,cn=import,cn=tasks,cn=config"
[9] Search for tombstone entries:
$ ldapsearch -D "cn=Directory Manager" -w Secret123 -b "dc=example,dc=com" -LLL objectclass=nstombstone
dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
objectClass: top
objectClass: nsds5replica
objectClass: extensibleObject
cn: replica
nsDS5ReplicaRoot: dc=example,dc=com
nsDS5ReplicaId: 7
nsDS5ReplicaType: 3
nsDS5Flags: 1
nsds5ReplicaPurgeDelay: 604800
nsDS5ReplicaBindDN: cn=SyncManager,cn=config
nsState:: BwAAAAAAAAAOzsZUAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA==
nsDS5ReplicaName: 49922186-a5b311e4-8db6c639-384f4808
nsds50ruv: {replicageneration} 54c6ce0b000000070000
nsds50ruv: {replica 7 ldap://rhel7.brq.redhat.com:389}
nsruvReplicaLastModified: {replica 7 ldap://rhel7.brq.redhat.com:389} 00000000
nsds5ReplicaChangeCount: 0
nsds5replicareapactive: 0
Search didn't hang and returned cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config entry.
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/RHSA-2015-0416.html |