Bug 1763408

Summary: Failed to install ipa server with 389-ds-base-1.3.10.1-3.el7
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Slebodnik <lslebodn>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED DUPLICATE QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.8CC: amore, lkrispen, nkinder, rmeggins, spichugi, tborcin, tbordaz, vashirov
Target Milestone: rcKeywords: Regression, Reopened, TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.10.1-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-01 08:35:00 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:

Description Lukas Slebodnik 2019-10-19 13:20:46 UTC
Description of problem:
The latest version of 389-ds-base broke installation for ipa-server


Version-Release number of selected component (if applicable):
sh$ rpm -q 389-ds-base ipa-server
389-ds-base-1.3.10.1-3.el7.x86_64
ipa-server-4.6.6-8.el7.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. yum install -y ipa-server
2. # install server with ipa-server-install
   e.g. /usr/sbin/ipa-server-install --setup-dns --allow-zone-overlap --hostname=host.testrelm.test -r TESTRELM.TEST -n testrelm.test -p Password123 -a Password123 -U
3. ipactl status


Actual results:
Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv). Estimated time: 30 seconds
  [1/45]: creating directory server instance
  [error] RuntimeError: failed to create DS instance Command '/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpuZNtxF' returned non-zero exit status 1
ipapython.admintool: ERROR    failed to create DS instance Command '/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpuZNtxF' returned non-zero exit status 1

sh# ipactl status
Directory Service: STOPPED
ntpd Service: RUNNING
ipa: INFO: The ipactl command was successful


Expected results:

sh# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful


Additional info:

/var/log/ipaserver-install.log contians :

2019-10-19T12:52:03Z DEBUG calling setup-ds.pl
2019-10-19T12:52:03Z DEBUG Starting external process
2019-10-19T12:52:03Z DEBUG args=/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpLDmITR
2019-10-19T12:52:04Z DEBUG Process finished, return code=1
2019-10-19T12:52:04Z DEBUG stdout=[19/10/19:08:52:04] - [Setup] Info Could not import LDIF file '/var/lib/dirsrv/boot.ldif'.  Error: 35584.  Output: importing data ...
/usr/sbin/ldif2db: line 118:  8035 Segmentation fault      /usr/sbin/ns-slapd ldif2db -D /etc/dirsrv/slapd-TESTRELM-TEST -n "userRoot" -i "/var/lib/dirsrv/boot.ldif"

Could not import LDIF file '/var/lib/dirsrv/boot.ldif'.  Error: 35584.  Output: importing data ...
/usr/sbin/ldif2db: line 118:  8035 Segmentation fault      /usr/sbin/ns-slapd ldif2db -D /etc/dirsrv/slapd-TESTRELM-TEST -n "userRoot" -i "/var/lib/dirsrv/boot.ldif"


gdb says:
# /usr/sbin/ns-slapd ldif2db -D /etc/dirsrv/slapd-TESTRELM-TEST -n "userRoot" -i "/var/lib/dirsrv/boot.ldif"

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe927a5d1 in ldbm_get_nonleaf_ids (be=be@entry=0x555556147ee0, idl=idl@entry=0x7fffffffd760, job=job@entry=0x5555560c8420, txn=0x0)
    at ldap/servers/slapd/back-ldbm/ancestorid.c:122
122             qsort((void *)&nodes->b_ids[0], nodes->b_nids, (size_t)sizeof(ID), idl_sort_cmp);
Missing separate debuginfos, use: debuginfo-install audit-libs-2.8.5-4.el7.x86_64 bzip2-libs-1.0.6-13.el7.x86_64 elfutils-libelf-0.176-4.el7.x86_64 elfutils-libs-0.176-4.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-11.el7.x86_64 libcap-ng-0.7.5-4.el7.x86_64 libgcc-4.8.5-39.el7.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libselinux-2.5-15.el7.x86_64 libstdc++-4.8.5-39.el7.x86_64 lz4-1.7.5-3.el7.x86_64 nss-util-3.44.0-3.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 sqlite-3.7.17-8.el7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64

(gdb) bt
#0  0x00007fffe927a5d1 in ldbm_get_nonleaf_ids (be=be@entry=0x555556147ee0, idl=idl@entry=0x7fffffffd760, job=job@entry=0x5555560c8420, txn=0x0)
    at ldap/servers/slapd/back-ldbm/ancestorid.c:122
#1  0x00007fffe927a9e9 in ldbm_ancestorid_new_idl_create_index (job=0x5555560c8420, be=0x555556147ee0) at ldap/servers/slapd/back-ldbm/ancestorid.c:429
#2  0x00007fffe927a9e9 in ldbm_ancestorid_create_index (be=be@entry=0x555556147ee0, job=0x5555560c8420) at ldap/servers/slapd/back-ldbm/ancestorid.c:176
#3  0x00007fffe9298805 in import_main_offline (arg=<optimized out>) at ldap/servers/slapd/back-ldbm/import.c:1450
#4  0x00007fffe9299257 in ldbm_back_ldif2ldbm_deluxe (pb=pb@entry=0x5555561dbf80) at ldap/servers/slapd/back-ldbm/import.c:1772
#5  0x00007fffe92d00c1 in ldbm_back_ldif2ldbm (pb=0x5555561dbf80) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:809
#6  0x0000555555565df2 in slapd_exemode_ldif2db (mcfg=0x7fffffffdbc0) at ldap/servers/slapd/main.c:2175
#7  0x0000555555565df2 in main (argc=<optimized out>, argv=0x7fffffffdf98) at ldap/servers/slapd/main.c:949

(gdb) p nodes
$1 = (IDList *) 0x0
(gdb) l
117         if (ret == 0) {
118             /* now sort it */
119             import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids",
120                 "Starting sort of ancestorid non-leaf IDs...");
121
122             qsort((void *)&nodes->b_ids[0], nodes->b_nids, (size_t)sizeof(ID), idl_sort_cmp);
123
124             import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids",
125                 "Finished sort of ancestorid non-leaf IDs.");
126         }

Comment 3 Lukas Slebodnik 2019-10-19 13:28:37 UTC
Regression introduced in BZ1749595

Comment 5 mreynolds 2019-10-29 15:00:12 UTC
This is a duplicate of 1765106, and it's already fixed in 1.3.10.1-4

*** This bug has been marked as a duplicate of bug 1765106 ***

Comment 6 Lukas Slebodnik 2019-10-31 21:37:31 UTC
*** Bug 1765106 has been marked as a duplicate of this bug. ***

Comment 7 Viktor Ashirov 2019-11-01 08:35:00 UTC

*** This bug has been marked as a duplicate of bug 1765106 ***