Bug 827036 - Add support for terminating idle connections in sssd_nss
Summary: Add support for terminating idle connections in sssd_nss
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: Kaushik Banerjee
Depends On:
Blocks: 833169
TreeView+ depends on / blocked
Reported: 2012-05-31 13:38 UTC by Dmitri Pal
Modified: 2020-05-02 16:54 UTC (History)
3 users (show)

Fixed In Version: sssd-1.9.1-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: The SSSD client libraries did not close the file descriptors to pipes it uses to communicate with responder processes. Consequence: The number of file descriptors the responder processes keep open grew over time Fix: The SSSD proactively closes file descriptors that were not active for some time. Result: The file descriptor usage is steady now
Clone Of:
: 833169 (view as bug list)
Last Closed: 2013-02-21 09:24:01 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github SSSD sssd issues 2396 None None None 2020-05-02 16:54:03 UTC
Red Hat Product Errata RHSA-2013:0508 normal SHIPPED_LIVE Low: sssd security, bug fix and enhancement update 2013-02-20 21:30:10 UTC

Description Dmitri Pal 2012-05-31 13:38:02 UTC
This bug is created as a clone of upstream ticket:

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.

Comment 1 RHEL Program Management 2012-07-10 07:06:22 UTC
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.

Comment 2 RHEL Program Management 2012-07-11 02:05:56 UTC
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.

Comment 4 Kaushik Banerjee 2012-11-19 09:02:26 UTC
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'
bz827036-client-idle-timeout result: PASS

Comment 5 errata-xmlrpc 2013-02-21 09:24:01 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.


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