Bug 18345 - rhnds leaking file descriptors
rhnds leaking file descriptors
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Preston Brown
Depends On:
  Show dependency treegraph
Reported: 2000-10-04 13:23 EDT by Daryll
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-04 18:14:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daryll 2000-10-04 13:23:19 EDT
I've had my machine up running 7.0 for a week now. Today I had a bunch
of problems with applications running and figured out my system was
running out of	file descriptors. When I did ls /proc/[1-9]*/fd, I saw
that the rhnds was using a lot of file descriptors. I just restarted the
daemon an hour ago and there are now 8	file descriptors open. The first
is a socket, the rest are pipes.
Comment 1 Daniel Roesen 2000-10-04 17:31:30 EDT
Comment 2 Daniel Roesen 2000-10-04 17:56:50 EDT
rhnsd is loosing 2 FDs every --interval when trying to execute rhn_check
Comment 3 Daniel Roesen 2000-10-04 18:14:01 EDT
Problem in rhns_do_action():

static int rhns_do_action(void)
    if (pipe(fds) != 0) {
        syslog(LOG_ERR, "Could not create pipe for forking process; %m");
        return -1;
    if ((child = fork()) == 0) {
    } else if (child > 0) {
                    syslog(LOG_INFO, "command returned: %s", buf);
                    if (WIFEXITED(retval))
                        return WEXITSTATUS(retval);

So it forgets to close the two pipe FDs if the child process (rhn_check) returns
an error (like it does by default as it's unconfigured).
Comment 4 Preston Brown 2000-10-09 11:08:05 EDT
this is corrected in an errata, to be released shortly.

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