Bug 886038 - sssd components seem to mishandle sighup
Summary: sssd components seem to mishandle sighup
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.3
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: Kaushik Banerjee
Depends On:
Blocks: 895654 961680 1232303
TreeView+ depends on / blocked
Reported: 2012-12-11 11:37 UTC by sorin
Modified: 2020-05-02 17:10 UTC (History)
6 users (show)

Fixed In Version: sssd-1.9.2-57.el6
Doc Type: Bug Fix
Doc Text:
Cause: SSSD was keeping open file descriptor for the log files. Consequence: After moving actual logfile and restarting backend, SSSD was keeping the file descriptor open. Fix: Close file descriptor after child process execution. Result: After successful start of backend, the file descriptor to log file is closed.
Clone Of:
: 961680 (view as bug list)
Last Closed: 2013-02-21 09:42:30 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github SSSD sssd issues 2750 None closed sssd components seem to mishandle sighup 2020-05-25 16:13:25 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

Comment 2 Jakub Hrozek 2012-12-11 13:43:02 UTC
Upstream ticket:

Comment 5 Kaushik Banerjee 2013-01-04 09:47:51 UTC
Verified in version 1.9.2-59

Output from beaker automation run:
:: [   LOG    ] :: bz886038 SSSD should no longer keep connection to sssd.log open

Stopping sssd: [  OK  ]
Starting sssd: [  OK  ]
[  OK  ]
:: [04:31:56] ::  Sleeping for 5 seconds
:: [   PASS   ] :: sssd_nss doesn't have open connection to sssd.log
:: [   PASS   ] :: sssd_be doesn't have open connection to sssd.log
sssd    12437 root    3w   REG              253,0   193680  526076 /var/log/sssd/sssd.log
:: [   PASS   ] :: sssd has open connection to sssd.log
:: [04:32:02] ::  Rename sssd.log to sssd.log.old
:: [   PASS   ] :: sssd_nss doesn't have open connection to sssd.log
:: [   PASS   ] :: sssd_be doesn't have open connection to sssd.log
:: [   PASS   ] :: sssd doesn't have open connection to sssd.log.old
bz886038-SSSD-should-no-longer-keep-connection-to-sssd-log-open result: PASS

Comment 6 errata-xmlrpc 2013-02-21 09:42:30 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.


Comment 7 Thorsten Scherf 2015-06-16 12:27:25 UTC
I need to re-open this again, since sssd still doesn't properly close fds from helper processes like krb5_child:

# rpm -q sssd

# ls /proc/*/fd -l| grep deleted
l-wx------. 1 root root 64 Jun  3 10:13 18 -> /var/log/sssd/krb5_child.log-20150512 (deleted)

sssd debug_log_file is opened with open_debug_file_ex(..., bool want_cloexec):


(want_cloexec) {
         flags = fcntl(debug_fd, F_GETFD, 0);
         (void) fcntl(debug_fd, F_SETFD, flags | FD_CLOEXEC);

(from util/debug.c)

This is not the case for LDAP_CHILD_LOG_FILE and KRB5_CHILD_LOG_FILE:

$ grep -iR CHILD_LOG_FILE providers/
providers/krb5/krb5_init_shared.c:        ret = open_debug_file_ex(KRB5_CHILD_LOG_FILE, &debug_filep, false);
providers/ldap/sdap_child_helpers.c:        ret = open_debug_file_ex(LDAP_CHILD_LOG_FILE, &debug_filep, false);

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