Patch-ID# 101673-01 Keywords: rsh, inetd, timeout, hangs Synopsis: SunOS 4.1.3 Point Patch: rsh hangs, talking to a heavily loaded machine Date: Apr/01/94 Solaris Release: SunOS Release: 4.1.3, 4.1.3C Unbundled Product: Unbundled Release: Relevant Architectures: sparc BugId's fixed with this patch: 1130726 Changes incorporated in this version: 1130726 Patches accumulated and obsoleted by this patch: Patches which conflict with this patch: Patches required with this patch: Obsoleted by: Files included with this patch: /usr/ucb/rsh Problem Description: rsh fails intermintently attempting to connect to a heavily loaded machine. The problem is actually caused by inetd hanging on the machine being connected to. This patch is a point patch that provides an additional argument "-T num" to rsh. This argument specifies a number of seconds after which that rsh will timeout attempting the connection. Upon timeout, rsh will exit with an exit code of 3. This point patch is provided as a work-around to prevent rsh from hanging, a situation which is primarily caused by "inetd" failure to keep up with rate of requests it receives and therefore shutting down the service. RSH/INETD PROBLEM DESCRIPTION: ----------------------------- There are 2 problems related to inetd, and rsh: 1. rate of request high water mark is too low for new machine speeds. This problem is fixed with inetd point patch No. 100178-09 for 4.x machines. This patch alone should fix the problem when the inetd server is a Sun machine. 2. The second problem relates to both rsh and inetd. The problem with rsh side is that it does blocking I/O instead of non-blocking. The problem with inetd side is that it does not close the last connection which caused it to shut down the service. As a result of these 2 the rsh on the client side hangs. A solution to this problem is provided by PDE. This solution is only effective when both sides are Sun machines, in which case solution to problem 1 alone can fix the problem. Therefore, to solve the "rsh hang" problem one should first check the inetd server side. If the server side is a Sun machine, provide patch 100178-09 (it's important to use this latest version, as the 100178-08 although providing the limit settings as command line options, but it has a problem with number of file descriptors that it can open which is fixed in 09 version) and if necessary by using: inetd -r num-of-connections num-of-seconds adjust the high rate of requests num-of-connections/num-of-seconds which tunes the inetd for the specific server CPU speed. RSH (ONLY) POINT PATCH: ---------------------- Description: ----------- This rsh allows for a time out for the calls to the remote host and is useful when the inetd of the non-Sun server shuts down the service. In which case the rsh will time out instead of hanging. Checking the exit value 3 of this rsh is an indicator of inetd server service shutdown. If the server side is not a Sun machine, use this point patch rsh for 4.x machines. Life Time: --------- The rsh/inetd problem is fixed and integrated in 494. Therefore, there wouldn't be a need for this work around rsh patch under future Solaris release, unless similar situation is reported by a customer that would necessitates the use of an rsh with a timeout option. Patch Installation Instructions: su root mv /usr/ucb/rsh /usr/ucb/rsh.FCS mv /sun4/4.1.3/rsh /usr/ucb/rsh chown root /usr/ucb/rsh chgrp staff /usr/ucb/rsh chmod 4755 /usr/ucb/rsh