Bug 1244970 - Crash while triming the retro changelog
Summary: Crash while triming the retro changelog
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1272422
TreeView+ depends on / blocked
 
Reported: 2015-07-20 22:27 UTC by Noriko Hosoi
Modified: 2020-09-13 21:26 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-67.el6
Doc Type: Bug Fix
Doc Text:
Fixed a crash while trimming the retro changelog When trimming the retro changelog (`retroCL`), entries are first deleted from the changelog itself and then also from the cache. The *389-ds-base* server was, however, missing a check to verify that the entries are actually present in the cache, which could lead to the server attempting to delete nonexistent entries and subsequently crash on systems where not all changelog entries could fit in the cache due to its small size. A check has been added to make sure only entries actually present in the cache are being deleted, and the server no longer crashes when trimming the retro changelog.
Clone Of:
Environment:
Last Closed: 2016-05-10 19:19:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1537 0 None None None 2020-09-13 21:26:30 UTC
Red Hat Product Errata RHBA-2016:0737 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2016-05-10 22:29:13 UTC

Description Noriko Hosoi 2015-07-20 22:27:22 UTC
When trimming the retroCL, it deletes an entry. Then retrieve the entry from the cache (no creation of tombstone) to remove it from the cache.
Apparently if the entry cachen is small, it can fail to retrieve it and not testing this special condition

Comment 1 mreynolds 2015-07-20 22:51:22 UTC
Fixed upstream

Comment 2 mreynolds 2015-07-21 13:47:53 UTC
Verification steps:

[1] Enable retro changelog plugin and set the retro changelog max age:

ldapmodify ....
dn: cn=retro changelog plugin,cn=plugins,cn=config
changetype: modify
replace: nsslapd-pluginEnabled
nsslapd-pluginEnabled: on
-
replace: nsslapd-changelogmaxage
nsslapd-changelogmaxage: 30

[2] Restart the server
[3] Set a very small entry cache size for the retro changelog backend

ldapmodify
dn: cn=changelog,cn=ldbm database,cn=plugins,cn=config
changetype: modify
replace: nsslapd-cachememsize
nsslapd-cachememsize: 512000

[4] Restart the server
[5] Add 2000 entries
[6] Wait 31 seconds
[7] Make sure server is still running(or did not crash during the adds)

Comment 4 Simon Pichugin 2016-03-22 17:00:15 UTC
Built tested:
389-ds-base-1.2.11.15-74.el6.x86_64

[1] Enable retro changelog plugin and set the retro changelog max age:
ldapmodify -D "cn=Directory Manager" -w Secret123 -h localhost -p 389 -x
dn: cn=retro changelog plugin,cn=plugins,cn=config
changetype: modify
replace: nsslapd-pluginEnabled
nsslapd-pluginEnabled: on
-
replace: nsslapd-changelogmaxage
nsslapd-changelogmaxage: 30

[2] Restart the server
sudo restart-dirsrv

[3] Set a very small entry cache size for the retro changelog backend
ldapmodify -D "cn=Directory Manager" -w Secret123 -h localhost -p 389 -x
dn: cn=changelog,cn=ldbm database,cn=plugins,cn=config
changetype: modify
replace: nsslapd-cachememsize
nsslapd-cachememsize: 512000

[4] Restart the server
sudo restart-dirsrv

[5] Add 2000 entries
ldclt -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -f cn=MrXXXX -b "dc=example,dc=com" -e add,person,incr,noloop,commoncounter -r1 -R2000

[6] Wait 31 seconds

[7] Make sure server is still running(or did not crash during the adds)
ldapsearch  -D "cn=Directory Manager" -w Secret123 -h localhost -p 389 -x -b "dc=example,dc=com" cn=Mr2000
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: cn=Mr2000
# requesting: ALL
#

# Mr2000, example.com
dn: cn=Mr2000,dc=example,dc=com
objectClass: person
objectClass: top
cn: Mr2000
sn: toto sn

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Marking as verified.

Comment 6 errata-xmlrpc 2016-05-10 19:19:56 UTC
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


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