RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1832190 - [abrt] [faf] 389-ds-base: unknown function(): /usr/sbin/ns-slapd killed by 11
Summary: [abrt] [faf] 389-ds-base: unknown function(): /usr/sbin/ns-slapd killed by 11
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: slapi-nis
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: thierry bordaz
QA Contact: ipa-qe
URL: http://faf.lab.eng.brq.redhat.com/faf...
Whiteboard:
Depends On:
Blocks: 1832331
TreeView+ depends on / blocked
 
Reported: 2020-05-06 10:08 UTC by Lukas Slebodnik
Modified: 2020-09-29 20:33 UTC (History)
8 users (show)

Fixed In Version: slapi-nis-0.56.5-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1832331 (view as bug list)
Environment:
Last Closed: 2020-09-29 20:33:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (1.30 KB, patch)
2020-05-06 11:11 UTC, Alexander Bokovoy
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4010 0 None None None 2020-09-29 20:33:56 UTC

Description Lukas Slebodnik 2020-05-06 10:08:09 UTC
This bug has been created based on an anonymous crash report requested by the package maintainer.

sh-4.2# rpm -q slapi-nis ipa-server 389-ds-base
slapi-nis-0.56.5-1.el7.x86_64
ipa-server-4.6.8-2.el7.x86_64
389-ds-base-1.3.10.2-2.el7.x86_64


    (gdb) bt
    #0  0x00007ff5c041d0c9 in backend_shr_write_ignore (pb=pb@entry=0x564e94aee240) at back-shr.c:2969
    #1  0x00007ff5c041d180 in backend_shr_add_cb (pb=0x564e94aee240) at back-shr.c:1897
    #2  0x00007ff5c041d3b9 in backend_shr_betxn_post_add_cb (pb=0x564e94aee240) at back-shr.c:1983
    #3  0x00007ff5cf329358 in plugin_call_func (list=0x564e9446eb00, operation=operation@entry=560, pb=pb@entry=0x564e94aee240, call_one=call_one@entry=0)
        at ldap/servers/slapd/plugin.c:2028
    #4  0x00007ff5cf329613 in plugin_call_list (pb=0x564e94aee240, operation=560, list=<optimized out>) at ldap/servers/slapd/plugin.c:1972
    #5  0x00007ff5cf329613 in plugin_call_plugins (pb=pb@entry=0x564e94aee240, whichfunction=whichfunction@entry=560) at ldap/servers/slapd/plugin.c:442
    #6  0x00007ff5cf2e30e2 in dse_add (pb=0x564e94aee240) at ldap/servers/slapd/dse.c:2322
    #7  0x00007ff5cf2cc941 in op_shared_add (pb=pb@entry=0x564e94aee240) at ldap/servers/slapd/add.c:679
    #8  0x00007ff5cf2cceb9 in add_internal_pb (pb=pb@entry=0x564e94aee240) at ldap/servers/slapd/add.c:407
    #9  0x00007ff5cf2cdbf1 in slapi_add_internal_pb (pb=pb@entry=0x564e94aee240) at ldap/servers/slapd/add.c:332
    #10 0x00007ff5cf359dee in slapi_plugin_task_register_handler (name=name@entry=0x7ff5be73a9f8 "schema reload task", func=func@entry=0x7ff5be73a460 <schemareload_add>, plugin_pb=plugin_pb@entry=0x564e94ae1f20) at ldap/servers/slapd/task.c:528
    #11 0x00007ff5be73a93b in schemareload_start (pb=0x564e94ae1f20) at ldap/servers/plugins/schema_reload/schema_reload.c:94
    #12 0x00007ff5cf3293c7 in plugin_call_func (list=0x564e94494580, operation=operation@entry=212, pb=0x564e94ae1f20, call_one=call_one@entry=1) at ldap/servers/slapd/plugin.c:2028
    #13 0x00007ff5cf329a3b in plugin_call_one (pb=<optimized out>, operation=212, list=<optimized out>) at ldap/servers/slapd/plugin.c:1978
    #14 0x00007ff5cf329a3b in plugin_dependency_startall (operation=212, errmsg=<synthetic pointer>, plugin_list=0x0, argv=0x7fff583620c8, argc=5) at ldap/servers/slapd/plugin.c:1737
    #15 0x00007ff5cf329a3b in plugin_startall (argc=argc@entry=5, argv=argv@entry=0x7fff583620c8, plugin_list=plugin_list@entry=0x0) at ldap/servers/slapd/plugin.c:1950
    #16 0x0000564e9181ea68 in main (argc=<optimized out>, argv=0x7fff583620c8) at ldap/servers/slapd/main.c:1141
    (gdb) l
    2964         * on of the ignored containers
    2965         */
    2966        slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET, &dn);
    2967        target_sdn = slapi_sdn_new_dn_byval(dn);
    2968
    2969        for (i = 0; ignored_containers_sdn[i]; i++) {
    2970            check  = slapi_sdn_issuffix(target_sdn, ignored_containers_sdn[i]);
    2971            if (check != 0) {
    2972                /* This entry is an ignored container */
    2973                ignore = PR_TRUE;
    (gdb) p ignored_containers_sdn
    $2 = (Slapi_DN **) 0x0


Submit a correction or amendment below (click here to m

Comment 5 thierry bordaz 2020-05-06 10:17:52 UTC
This is related to recent fix https://bugzilla.redhat.com/show_bug.cgi?id=1820124.
Likely because NIS is enabled and SC not :(

Comment 6 thierry bordaz 2020-05-06 10:41:10 UTC
Actually both NIS and SC are enabled. 
I think the problem is that SC is initialized later compare to NIS or Schema reload plugin.
At this point ignored_containers_sdn was not initialized yet and trigger the crash.

Comment 7 Alexander Bokovoy 2020-05-06 11:11:16 UTC
Created attachment 1685665 [details]
proposed fix

Even though NIS and SC plugins share source code, they get linked and then loaded separately, so static variables defined in src/back-shr.c aren't shared. It means NIS plugin has to initialize map locks as well. And if ignored_containers_sdn is NULL, there is no need to go over it since none of the entries could be ignored, just return NULL.

Comment 9 Alexander Bokovoy 2020-05-06 11:56:35 UTC
I tested this patch and it solves the issue to me.

Reproducer:

1. install FreeIPA
2. enable NIS plugin: ipa-nis-manage enable
3. systemctl start rpcbind
4. ipactl restart

You'll get a failure at this point because NIS plugin would crash.

Build and install a fixed package, do

ipactl restart

and everything continues to work just fine.

Comment 10 Alexander Bokovoy 2020-05-06 13:48:48 UTC
Added upstream: https://pagure.io/slapi-nis/c/f3d34b046ef4f28d31b6d6e3511a8956bc60ec7c?branch=master

Added to Fedora 31-33 as slapi-nis-0.56.5-2

Added to RHEL 7.9 as slapi-nis-0.56.5-2

Comment 14 Mohammad Rizwan 2020-06-01 10:55:20 UTC
reproducer:

[root@master ~]# rpm -qa | grep slapi
slapi-nis-0.56.5-1.el7.x86_64

[root@master ~]# rpm -qa | grep ipa-server
ipa-server-dns-4.6.8-1.el7.noarch
ipa-server-trust-ad-4.6.8-1.el7.x86_64
ipa-server-common-4.6.8-1.el7.noarch
ipa-server-4.6.8-1.el7.x86_64

[root@master ~]# ipa-nis-manage enable
Directory Manager password: 

Enabling plugin
This setting will not take effect until you restart Directory Server.
The rpcbind service may need to be started.

[root@master ~]# systemctl start rpcbind

[root@master ~]# ipactl restart
Restarting Directory Service
Failed to restart Directory Service: Command '/bin/systemctl restart dirsrv' returned non-zero exit status 1
Shutting down
Aborting ipactl



Fix:
~~~~
[root@master ~]# yum install -y http://download.eng.bos.redhat.com/brewroot/vol/rhel-7/packages/slapi-nis/0.56.5/2.el7/x86_64/slapi-nis-0.56.5-2.el7.x86_64.rpm
Loaded plugins: search-disabled-repos
slapi-nis-0.56.5-2.el7.x86_64.rpm     
[..]

[root@master ~]# rpm -qa | grep slapi
slapi-nis-0.56.5-2.el7.x86_64

[root@master ~]# ipactl restart
IPA version error: data needs to be upgraded (expected version '4.6.8-3.el7', current version '4.6.8-1.el7')
Automatically running upgrade, for details see /var/log/ipaupgrade.log
Be patient, this may take a few minutes.
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting httpd Service
Starting ipa-custodia Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
Starting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful

Comment 16 errata-xmlrpc 2020-09-29 20:33:44 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 (slapi-nis bug fix and enhancement update), 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-2020:4010


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