rsh problem with RH 4.0 and kernels 2.0.26, 2.0.27

sheldon newhouse (pokie@tcimet.net)
Sun, 1 Dec 1996 15:00:14 -0500 (EST)


I recently upgraded my RH 3.0.3 system to a RH 4.0 system, and noticed
the following rsh problem.

I have 3 machines, pokie, peakie, and elsie

pokie is a P5-133 running RH 3.0.3, kernel 2.0.25
peakie is a SUN SS2 running Solaris 2.5.1
elsie is a P5-133 running RH 4.0, kernel 2.0.27

There is a user called 'sen' whose home directory is on peakie which nfs
exports the home directory to the machines elsie and pokie.

telnet works fine, but rsh from pokie to elsie as sen hangs.

This did not occur when elsie was running 3.0.3 and kernel 2.0.25

It also does not occur for users whose home directory is on elsie
directly (not nfs mounted). One such user is 'sen1'.

Below is the output of the command
diff on strace outputs from pokie of the command

strace rsh elsie -l sen >& strace-1
strace rsh elsie -l sen1 >& strace-2

Remember that sen is the one with the problem.

Any ideas?

TIA,
-sen

The following is diff output on two files.

First file is strace output for failing rsh
Second file is strace output for working rsh

25c25
< execve("/usr/bin/rlogin", ["rlogin", "elsie", "-l", "sen"], [27 vars]) = 0

---
> execve("/usr/bin/rlogin", ["rlogin", "elsie", "-l", "sen1"], [27 vars]) = 0
76c76
< getpid()                                = 6525
---
> getpid()                                = 6568
90,93c90,91
< bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
< bind(3, {sin_family=AF_INET, sin_port=htons(1016), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
98c96
< time(NULL)                              = 849468420
---
> time(NULL)                              = 849468542
104c102
< time(NULL)                              = 849468421
---
> time(NULL)                              = 849468543
109,110c107,108
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
115c113
< time(NULL)                              = 849468421
---
> time(NULL)                              = 849468543
121c119
< time(NULL)                              = 849468423
---
> time(NULL)                              = 849468545
126,127c124,125
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
132c130
< time(NULL)                              = 849468423
---
> time(NULL)                              = 849468545
138c136
< time(NULL)                              = 849468427
---
> time(NULL)                              = 849468549
143,144c141,142
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
149c147
< time(NULL)                              = 849468427
---
> time(NULL)                              = 849468549
155c153
< time(NULL)                              = 849468435
---
> time(NULL)                              = 849468557
160,161c158,159
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
166c164
< time(NULL)                              = 849468435
---
> time(NULL)                              = 849468557
172c170
< time(NULL)                              = 849468451
---
> time(NULL)                              = 849468573
177,184c175,180
< bind(3, {sin_family=AF_INET, sin_port=htons(1015), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
< fcntl(3, F_SETOWN, 6525)                = 0
< connect(3, {sin_family=AF_INET, sin_port=htons(513), sin_addr=inet_addr("35.8.158.242")}, 16) = 0
< write(3, "\0", 1)                       = 1
< write(3, "root\0", 5)                   = 5
< write(3, "sen\0", 4)                    = 4
< write(3, "xterm/9600\0", 11)            = 11
< read(3, "\0", 1)                        = 1
---
> bind(3, {sin_family=AF_INET, sin_port=htons(1017), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> fcntl(3, F_SETOWN, 6568)                = 0
> connect(3, {sin_family=AF_INET, sin_port=htons(513), sin_addr=inet_addr("35.8.158.242")}, 16) = -1 ECONNREFUSED (Connection refused)
> close(3)                                = 0
> write(2, "elsie.home.msu.edu: Connection r"..., 39elsie.home.msu.edu: Connection refused
> ) = 39
186,229c182
< setsockopt(3, IPPROTO_IP1, [16], 4)     = 0
< setuid(0)                               = 0
< ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0
< sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}) = 0
< sigprocmask(SIG_BLOCK, [HUP], [USR1 IO]) = 0
< sigaction(SIGHUP, {0x8000b48, [], SA_RESTART}, {SIG_DFL}) = 0
< sigprocmask(SIG_SETMASK, [USR1 IO], [HUP USR1 IO]) = 0
< sigprocmask(SIG_BLOCK, [QUIT], [USR1 IO]) = 0
< sigaction(SIGQUIT, {0x8000b48, [], SA_RESTART}, {SIG_DFL}) = 0
< sigprocmask(SIG_SETMASK, [USR1 IO], [QUIT USR1 IO]) = 0
< sigaction(SIGCHLD, {0x8001420, [], SA_RESTART}, {SIG_DFL}) = 0
< fork()                                  = 6534
< sigaction(SIGIO, {0x8001c70, [], SA_RESTART}, {SIG_DFL}) = 0
< sigaction(SIGUSR1, {0x80013f0, [], SA_RESTART}, {SIG_DFL}) = 0
< sigprocmask(SIG_SETMASK, [], [USR1 IO]) = 0
< sigprocmask(SIG_BLOCK, [ALRM], [])      = 0
< sigaction(SIGALRM, {0x40072e40, [], 0}, {SIG_DFL}) = 0
< time(NULL)                              = 849468451
< alarm(1)                                = 0
< sigsuspend([] <unfinished ...>
< --- SIGALRM (Alarm clock) ---
< <... sigsuspend resumed> )              = -1 EINTR (Interrupted system call)
< sigreturn()                             = ? (mask now [ALRM])
< time(NULL)                              = 849468452
< sigaction(SIGALRM, {SIG_DFL}, NULL)     = 0
< alarm(0)                                = 0
< sigprocmask(SIG_SETMASK, [], NULL)      = 0
< read(0, "\3", 1)                        = 1
< write(3, "\3", 1)                       = 1
< read(0, "\3", 1)                        = 1
< write(3, "\3", 1)                       = 1
< read(0, "\3", 1)                        = 1
< write(3, "\3", 1)                       = 1
< read(0, "", 1)                          = 0
< write(2, "rlogin: closed connection.\r\n", 28rlogin: closed connection.
< ) = 28
< ioctl(0, TCGETS, 0xbffff4b0)            = -1 EIO (I/O error)
< ioctl(0, TCGETS, 0x800528c)             = -1 EIO (I/O error)
< ioctl(0, TCSETSW, {B9600 opost isig icanon echo ...}) = -1 EIO (I/O error)
< sigaction(SIGCHLD, {SIG_DFL}, {0x8001420, [], SA_RESTART}) = 0
< kill(6534, SIGKILL)                     = 0
< --- SIGCHLD (Child exited) ---
< wait4(-1, [WIFSTOPPED(s) && WTERMSIG(s) == SIGKILL], 0, NULL) = 6534
< _exit(0)                                = ?
---
> _exit(1)                                = ?