+++ This bug was initially created as a clone of Bug #1405354 +++ Description of problem: If using a custom SSL context through the LDAP_OPT_X_TLS_NEWCTX LDAP option, openldap will call nss_ShutdownContext on each unbind. When the last connection is unbound, NSS will call nss_Shutdown to unload the entire NSS library. Once this happens, if using PEM files, the next unbind will result in SEC_BUSY with the following text: TLS: could not shutdown NSS - error -8053:NSS could not shutdown. Objects are still in use.. This happens because the tlsm_nss_shutdown_cb is only registered once, and nss_Shutdown will unregister it. tlsm_nss_shutdown_cb is responsible for unloading the nss PEM module. Since the shutdown function is no longer called, the PEM module is still loaded, and the NSS module refuses to shut down correctly. Eventually this causes many other strange issues such as complaints that no slots are available for the certificates that it reads. Version-Release number of selected component (if applicable): Any Fedora release prior a fix for this bug. How reproducible: Always Steps to Reproduce: 1. Create a LDAPS connection using a custom context by calling ldap_set_option with LDAP_OPT_X_TLS_NEWCTX. This also requires manually setting the LDAP_OPT_X_TLS_CACERTDIR or LDAP_OPT_X_TLS_CACERTFILE, LDAP_OPT_X_TLS_CERTFILE, and LDAP_OPT_X_TLS_KEYFILE, as a minimum. 2. Bind to an LDAPS server, then unbind 3. Bind again, then unbind. Actual results: TLS: could not shutdown NSS - error -8053:NSS could not shutdown. Objects are still in use.. and other strange behavior Expected results: Continued operation in binding and unbinding.
http://pkgs.fedoraproject.org/cgit/rpms/openldap.git/commit/?h=f26&id=9e4e33d81af043e8c50fa51c81c240fc37d2540c http://pkgs.fedoraproject.org/cgit/rpms/openldap.git/commit/?h=f27&id=dc7bf3e49f386cacabc49d0884f275ce7676c981
Thanks for tracking it down. I've added it to the queue for OpenLDAP 2.4.46.
F26 and F27 builds are both blocked by hanging aarch64 builder: * https://koji.fedoraproject.org/koji/taskinfo?taskID=23559365 * https://koji.fedoraproject.org/koji/taskinfo?taskID=23559386
openldap-2.4.45-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3789b9721a
openldap-2.4.45-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ca4946dac6
openldap-2.4.45-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ca4946dac6
openldap-2.4.45-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3789b9721a
openldap-2.4.45-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
openldap-2.4.45-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.