Red Hat Bugzilla – Bug 827036
Add support for terminating idle connections in sssd_nss
Last modified: 2013-05-30 13:57:15 EDT
This bug is created as a clone of upstream ticket: https://fedorahosted.org/sssd/ticket/1354 The attached patch adds support for a connection idle timer in sssd_nss which upon firing will check for and terminate idle connections. The motivation for this is to prevent sssd_nss from running out of file descriptors when a large number of long lived processes keep open connections to sssd_nss. The symptom can readily observed by running lsof on sssd_nss and counting the number instances of /var/lib/sssd/pipes/nss. Without the patch, we found sssd_nss becomes unresponsive on a number of our hosts with long lived connections such as imap servers. We have encountered the problem in both RHEL 5 & 6 running sssd 1.5.1. The patch adds an idle_timeout parameter to sssd.conf with a default value of zero that preserves the current behavior of not expiring any connections. Expiry is only done when this parameter is set to a value greater than zero.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Verified in version 1.9.2-13 Output of beaker automation run: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: bz827036 client_idle_timeout :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Stopping sssd: [ OK ] Starting sssd: [ OK ] [ OK ] spawn ssh -o StrictHostKeyChecking=no -l puser1 localhost puser1@localhost's password: Last login: Sat Nov 17 04:27:21 2012 from localhost [puser1@dell-pe1955-02 ~]$ id uid=1001(puser1) gid=1001(Group1) groups=1001(Group1) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [puser1@dell-pe1955-02 ~]$ :: [ PASS ] :: New nss file descriptors open. new_nss_fds:3 old_nss_fds:1 :: [ PASS ] :: File '/var/log/sssd/sssd_nss.log' should contain 'Idle timer re-set for client' :: [ PASS ] :: File '/var/log/sssd/sssd_nss.log' should contain 'Client connected' :: [ PASS ] :: New pam file descriptors open. new_pam_fds:2 old_pam_fds:1 :: [ PASS ] :: File '/var/log/sssd/sssd_pam.log' should contain 'Idle timer re-set for client' :: [ PASS ] :: File '/var/log/sssd/sssd_pam.log' should contain 'Client connected' :: [ PASS ] :: idle nss file descriptors were closed. num_nss_fds:1 :: [ PASS ] :: File '/var/log/sssd/sssd_nss.log' should contain 'Terminating idle client' :: [ PASS ] :: File '/var/log/sssd/sssd_nss.log' should contain 'Terminated client' :: [ PASS ] :: idle pam file descriptors were closed. num_pam_fds:1 :: [ PASS ] :: File '/var/log/sssd/sssd_pam.log' should contain 'Terminating idle client' :: [ PASS ] :: File '/var/log/sssd/sssd_pam.log' should contain 'Terminated client' '4e00443f-4483-450f-884d-22d473eef7d7' bz827036-client-idle-timeout result: PASS
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. http://rhn.redhat.com/errata/RHSA-2013-0508.html