Bug 1466191 - Change the retrochangelog default cache size. And also if possible, the default caches.
Change the retrochangelog default cache size. And also if possible, the defau...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.4
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: thierry bordaz
Viktor Ashirov
: ZStream
Depends On:
Blocks: 1476162
  Show dependency treegraph
 
Reported: 2017-06-29 04:44 EDT by German Parente
Modified: 2018-04-10 10:19 EDT (History)
7 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.7.5-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1476162 (view as bug list)
Environment:
Last Closed: 2018-04-10 10:18:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0811 None None None 2018-04-10 10:19 EDT

  None (edit)
Description German Parente 2017-06-29 04:44:34 EDT
Description of problem:

I have not tested auto tuning of caches yet in RHEL7.4 but currently, we are having a very high issue with customer in IPA environment.

All the updates go to retrochangelog even if the only component that needs them is DNS.

When the retro changelog is enabled, the database is created and by default:

./ldap/servers/plugins/retroclretrocl.h:

#define RETROCL_BE_CACHEMEMSIZE  "2097152"

the size is not reasonable.

This, that should be only provoking performance issues, is driving to database corruption and inconsistencies as well.

Let's change this as soon as possible to a reasonable value. It's just a one liner commit.

I am having corruption and inconsistencies in nearly all the customers that are using ipa in large environments. For instance:

[28/Jun/2017:11:41:17 -0400] - libdb: BDB0689 changelog/id2entry.db page 15397 is on free list with type 5
[28/Jun/2017:11:41:17 -0400] - libdb: BDB0061 PANIC: Invalid argument
[28/Jun/2017:11:41:17 -0400] - libdb: BDB0060 PANIC: fatal region error detected; run recovery
[28/Jun/2017:11:41:17 -0400] - Serious Error---Failed in dblayer_txn_abort, err=-30973 (BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery)
[28/Jun/2017:11:41:17 -0400] DSRetroclPlugin - replog: an error occured while adding change number 13028533, dn = changenumber=13028533,cn=changelog: Operations error.
[28/Jun/2017:11:41:17 -0400] retrocl-plugin - retrocl_postob: operation failure [1]
[28/Jun/2017:11:41:17 -0400] - libdb: BDB0060 PANIC: fatal region error detected; run recovery
[28/Jun/2017:11:41:17 -0400] - libdb: BDB0060 PANIC: fatal region error detected; run recovery
[28/Jun/2017:11:41:17 -0400] - Serious Error---Failed in dblayer_txn_begin, err=-30973 (BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery)


[15/Jun/2017:21:34:48 -0400] DSRetroclPlugin - delete_changerecord: could not delete change record 12684904 (rc: 1)
[15/Jun/2017:21:35:22 -0400] - libdb: BDB3017 unable to allocate space from the buffer cache
[15/Jun/2017:21:35:22 -0400] DSRetroclPlugin - delete_changerecord: could not delete change record 12684946 (rc: 1)
[15/Jun/2017:21:35:52 -0400] - libdb: BDB3017 unable to allocate space from the buffer cache
[15/Jun/2017:21:35:52 -0400] DSRetroclPlugin - delete_changerecord: could not delete change record 12685002 (rc: 1)
[15/Jun/2017:21:36:06 -0400] - libdb: BDB3017 unable to allocate space from the buffer cache

(this latest should be related to insufficient locks and not the db itself).

But there are multiple issues with retro changelog since any update impacts it and the cache is not big enough.

Please, give to this bug some priority if this has not been solved with auto tunning.

Thanks a lot,

German.
Comment 2 wibrown@redhat.com 2017-07-05 02:40:32 EDT
I would think it is solved by autotuning coming up in the next release, but certainly it's something we should look at just incase.
Comment 3 wibrown@redhat.com 2017-07-05 02:40:45 EDT
Upstream ticket:
https://pagure.io/389-ds-base/issue/49313
Comment 5 thierry bordaz 2017-07-05 04:13:01 EDT
creation or update of large static group (>10K members) can easily overpass the size of 2Mb entry cache. Now I have not a clear understanding how it can conduct to DB panic and corruption. With a too small entrycache we can imagine that the cache contains a single entry and that the cache will try to flush it immediately. This is going into corner cases that can be a pb at server level but I do not understand how it can affect the DB itself.

Anyway, increasing the retroCL entry cache prevents DB issue and is a very easy/safe fix.
Comment 6 thierry bordaz 2017-07-26 04:30:53 EDT
Upstream ticket pushed (https://pagure.io/389-ds-base/issue/49313)
Comment 10 Viktor Ashirov 2017-11-02 10:42:58 EDT
Build tested:
389-ds-base-1.3.7.5-6.el7.x86_64

# ldapmodify -D cn=Directory\ Manager -w Secret123 
dn: cn=Retro Changelog Plugin,cn=plugins,cn=config
changetype: modify
replace: nsslapd-pluginEnabled
nsslapd-pluginEnabled: on

modifying entry "cn=Retro Changelog Plugin,cn=plugins,cn=config"

# restart-dirsrv 
Restarting instance "standalone"

# ldapsearch -LLLx -D cn=Directory\ Manager -w Secret123 -s base -b 'cn=changelog,cn=ldbm database,cn=plugins,cn=config' nsslapd-cachememsize
dn: cn=changelog,cn=ldbm database,cn=plugins,cn=config
nsslapd-cachememsize: 209715200

Previously, the default value of nsslapd-cachememsize was 2097152, now it's 100 times bigger.

Marking as VERIFIED.
Comment 13 errata-xmlrpc 2018-04-10 10:18:12 EDT
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://access.redhat.com/errata/RHBA-2018:0811

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