From nobody@FreeBSD.ORG Sun Oct 10 21:11:15 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id A370514E74; Sun, 10 Oct 1999 21:11:15 -0700 (PDT)
Message-Id: <19991011041115.A370514E74@hub.freebsd.org>
Date: Sun, 10 Oct 1999 21:11:15 -0700 (PDT)
From: tommy@ti.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: rup and rusers could not deal with many host
X-Send-Pr-Version: www-1.0

>Number:         14255
>Category:       bin
>Synopsis:       rup and rusers could not deal with many host
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mikeh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 10 21:20:01 PDT 1999
>Closed-Date:    Mon Jul 2 17:52:12 PDT 2001
>Last-Modified:  Mon Jul 02 17:52:37 PDT 2001
>Originator:     Kenji Tomita
>Release:        3.2-RELEASE
>Organization:
Texas Instruments Japan
>Environment:
FreeBSD freebsd 3.2-RELEASE FreeBSD 3.2-RELEASE #2: Tue Aug 17 11:34:05 JST 1999     root@:/usr/src/sys/compile/FMV  i386
>Description:
Because rup and rusers did not close RPC handle after
clnt_call(), they may exhaust file handles if many hosts
were specified by command line arguments.

>How-To-Repeat:
On csh,

% limit openfiles 16
% rup host1 host2 host3 ...
host1 12:59pm  up  31 days,  13:50,  load average: 0.02 0.06 0.07
host2 12:59pm  up  31 days,  13:50,  load average: 0.02 0.06 0.07
...
rup: unknown host "host15"
...


This behavior may depend on your environment such as
/etc/host.conf.

>Fix:
Simply do clnt_destroy() like this.

*** /usr/src/usr.bin/rup/rup.c  Thu Apr  2 06:34:10 1998
--- rup.c       Sun Oct 10 03:21:59 1999
***************
*** 178,183 ****
--- 178,184 ----
                warnx("%s: %s", host, clnt_sperror(rstat_clnt, host));
                return(-1);
        }
+       clnt_destroy(rstat_clnt);
  
        addr.sin_addr.s_addr = *(int *)hp->h_addr;
        rstat_reply((char *)&host_stat, &addr);



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mikeh 
Responsible-Changed-By: mikeh 
Responsible-Changed-When: Fri Jun 15 22:13:56 PDT 2001 
Responsible-Changed-Why:  
I'll look at this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14255 
State-Changed-From-To: open->analyzed 
State-Changed-By: mikeh 
State-Changed-When: Mon Jun 18 20:50:25 PDT 2001 
State-Changed-Why:  
Fix applied to current, MFC in 2 weeks. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14255 
State-Changed-From-To: analyzed->closed 
State-Changed-By: mikeh 
State-Changed-When: Mon Jul 2 17:52:12 PDT 2001 
State-Changed-Why:  
Fix MFC'd. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14255 
>Unformatted:
