Bug 1626375

Summary: on-line re-initialization hangs
Product: Red Hat Enterprise Linux 7 Reporter: German Parente <gparente>
Component: 389-ds-baseAssignee: thierry bordaz <tbordaz>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: amsharma, gparente, lkrispen, mreynolds, msauton, nkinder, pasik, rmeggins, spichugi, tbordaz, vashirov
Target Milestone: rcKeywords: ZStream
Target Release: 7.7   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.9.1-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Cause: During total initialization of a consumer, the routine building the list of entries to send children after parent and assumes that the entryID of the suffix is '1'. Consequence: If suffix entry is not '1', the suffix children will miss in the list and recursively the rest of the tree. The server will loop indefinitely, consuming CPU, trying to push entries in the list. Fix: Add, into parentid index, a key-value that contains the entryID of the suffix. Key is '=0' and value is the entryID of the suffix. The routine takes the value instead of assuming it is '1'. Result: The server will not loop indefinitely to prepare the candidate list.
Story Points: ---
Clone Of:
: 1645197 (view as bug list) Environment:
Last Closed: 2019-08-06 12:58:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1645197, 1647919    

Description German Parente 2018-09-07 07:52:06 UTC
Description of problem:

this is RHEL7 bug corresponding to upstream

https://pagure.io/389-ds-base/issue/49915

we see this at supplier side when doing an on-line re-initialization:


Thread 24 (Thread 0x7f706bb5d700 (LWP 14426)):
#0  0x00007f7084626f09 in idl_id_is_in_idlist () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#1  0x00007f70846258bd in idl_new_range_fetch () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#2  0x00007f708463570c in index_range_read_ext () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#3  0x00007f708461e334 in range_candidates () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#4  0x00007f708461e8b4 in ava_candidates.isra.0 () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#5  0x00007f708461eea8 in filter_candidates_ext () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#6  0x00007f708465b47a in subtree_candidates () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#7  0x00007f708465cbb9 in ldbm_back_search () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#8  0x00007f7090b599f2 in op_shared_search () at /usr/lib64/dirsrv/libslapd.so.0
#9  0x00007f7090b6b557 in search_internal_callback_pb () at /usr/lib64/dirsrv/libslapd.so.0
#10 0x00007f7083d79709 in repl5_tot_run () at /usr/lib64/dirsrv/plugins/libreplication-plugin.so
#11 0x00007f7083d63d0a in prot_thread_main () at /usr/lib64/dirsrv/plugins/libreplication-plugin.so
#12 0x00007f708e924bab in _pt_root () at /lib64/libnspr4.so
#13 0x00007f708e2c4dd5 in start_thread () at /lib64/libpthread.so.0
#14 0x00007f708d971b3d in clone () at /lib64/libc.so.6


Version-Release number of selected component (if applicable): 389-ds-base-1.3.7.5-24.el7_5.x86_64

I will attach more information privately.

Comment 3 thierry bordaz 2018-09-10 12:03:07 UTC
Indeed pstacks are matching 389-ds 49915. I would be interested knowing why it loops as you mentioned that the suffix is the first entry of the database. Would it be possible to get the sample of the 12 firsts entries of the database ?

Just for information, a patch for 49915 is currently under review

Comment 5 Ludwig 2018-09-12 07:15:29 UTC
If possible a 

dbscan -r -f  parentid.db

could be of interest

Comment 18 thierry bordaz 2018-10-12 13:20:37 UTC
Upstream ticket pushed 1.3.7, 1.3.8 and master => POST

Comment 21 Viktor Ashirov 2019-04-05 13:58:52 UTC
py.test -v -k 1626375 ds/dirsrvtests/tests/suites/replication/
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-3.10.0-1030.el7.x86_64-x86_64-with-redhat-7.7-Maipo', 'Packages': {'pytest': '4.4.0', 'py': '1.8.0', 'pluggy': '0.9.0'}, 'Plugins': {'metadata': '1.8.0', 'html': '1.20.0'}}          
389-ds-base: 1.3.9.1-4.el7
nss: 3.43.0-2.el7
nspr: 4.21.0-1.el7
openldap: 2.4.44-21.el7_6
cyrus-sasl: 2.1.26-23.el7
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream
plugins: metadata-1.8.0, html-1.20.0
collected 96 items / 95 deselected / 1 selected                                

ds/dirsrvtests/tests/suites/replication/regression_test.py::test_online_reinit_may_hang PASSED [100%]

=================== 1 passed, 95 deselected in 46.92 seconds ===================

On the previous build (1.3.8.4-18.el7_6) it fails.

Marking as VERIFIED.

Comment 23 errata-xmlrpc 2019-08-06 12:58:42 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://access.redhat.com/errata/RHBA-2019:2152