Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin

Jeff Chua
2009-02-06T11:35:50Z

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

On Fri, Feb 6, 2009 at 1:45 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Fri, Feb 06, 2009 at 01:39:19PM +0800, Jeff Chua wrote:
>>
>> Attached are two strace. t1.good is a good rlogin run. t4.bad is bad
>> rlogin run where nothing is displayed but typing "~-." gets back to
>> the host.
>
> You traced the side receiving the urgent pointer. This has
> nothing to do with the patch since it only changes sending
> behaviour.

The problem is the "remote" side that's frozen. The "local" side can
be on any kernel version and it won't have any effect. The runs that I
did was for one good run with "strace -o t1.good rlogin ju" that has
the bad kernel and a second one with "strace -o t4.bad rlogin ju" that
just hang.

> Did you change the kernel on the other side during these tests?

No. Was hoping that the traces would show where it hang for the good
and bad trace.

> If reverting the patch on the other side does fix the problem
> for you, please do the two straces there.

Sorry, forgot to send the good trace run for the patched remote side.
Here's attached. t5.good.

Thanks,
Jeff.

[-- Attachment #2: t5.good --]
[-- Type: application/octet-stream, Size: 14894 bytes --]

execve("/usr/bin/rlogin", ["rlogin", "ju"], [/* 72 vars */]) = 0
brk(0) = 0x9ddf000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eff000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=49556, ...}) = 0
old_mmap(NULL, 49556, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef2000
close(3) = 0
open("/lib/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\7\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38528, ...}) = 0
old_mmap(NULL, 201052, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ec0000
old_mmap(0xb7ec9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7ec9000
old_mmap(0xb7ecb000, 155996, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ecb000
close(3) = 0
open("/lib/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\n\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9868, ...}) = 0
old_mmap(NULL, 12432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ebc000
old_mmap(0xb7ebe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb7ebe000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 f\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1299568, ...}) = 0
old_mmap(NULL, 1283696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d82000
old_mmap(0xb7eb6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x134000) = 0xb7eb6000
old_mmap(0xb7eb9000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7eb9000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d81000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d818d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7eb6000, 8192, PROT_READ) = 0
mprotect(0xb7ebe000, 4096, PROT_READ) = 0
mprotect(0xb7ec9000, 4096, PROT_READ) = 0
mprotect(0xb7f1d000, 4096, PROT_READ) = 0
munmap(0xb7ef2000, 49556) = 0
getuid32() = 0
brk(0) = 0x9ddf000
brk(0x9e00000) = 0x9e00000
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0700, st_size=1307, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1307
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7efe000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=49556, ...}) = 0
old_mmap(NULL, 49556, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef2000
close(3) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\30"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38708, ...}) = 0
old_mmap(NULL, 41624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d76000
old_mmap(0xb7d7f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7d7f000
close(3) = 0
mprotect(0xb7d7f000, 4096, PROT_READ) = 0
munmap(0xb7ef2000, 49556) = 0
open("/etc/passwd", O_RDONLY|0x80000) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
fstat64(3, {st_mode=S_IFREG|0644, st_size=3779, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "root:bt2L4qrBrz2II:0:0:SuperUser"..., 4096) = 3779
close(3) = 0
munmap(0xb7efe000, 4096) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/services", O_RDONLY|0x80000) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=7524, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096
close(3) = 0
munmap(0xb7efe000, 4096) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=55, ws_col=80, ws_xpixel=564, ws_ypixel=719}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGPIPE, {0x80494c0, [PIPE], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [USR1 URG], [], 8) = 0
getpid() = 6432
socket(PF_NETLINK, SOCK_RAW, 0) = 3
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=6432, groups=00000000}, [12]) = 0
time(NULL) = 1233919044
sendto(3, "\24\0\0\0\26\0\1\3D\34\214I\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0D\34\214I \31\0\0\2\10\200\376\1\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 288
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0D\34\214I \31\0\0\0\0\0\0\1\0\0\0\10\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(3) = 0
open("/etc/resolv.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=95, ...}) = 0
old_mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d66000
read(3, "domain corp.fedex.com\nnameserver"..., 65536) = 95
read(3, "", 65536) = 0
close(3) = 0
munmap(0xb7d66000, 65536) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/host.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0744, st_size=93, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "#order bind, hosts\norder hosts, "..., 4096) = 93
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7efe000, 4096) = 0
open("/etc/hosts", O_RDONLY|0x80000) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=96, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7efe000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=49556, ...}) = 0
old_mmap(NULL, 49556, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef2000
close(3) = 0
open("/lib/libnss_dns.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\v\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=18000, ...}) = 0
old_mmap(NULL, 20616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d70000
old_mmap(0xb7d74000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb7d74000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@!\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=59580, ...}) = 0
old_mmap(NULL, 71876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d5e000
old_mmap(0xb7d6c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0xb7d6c000
old_mmap(0xb7d6e000, 6340, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d6e000
close(3) = 0
mprotect(0xb7d6c000, 4096, PROT_READ) = 0
mprotect(0xb7d74000, 4096, PROT_READ) = 0
munmap(0xb7ef2000, 49556) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 28) = 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1233919044, 748150}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(3, "w\306\1\0\0\1\0\0\0\0\0\0\2ju\4corp\5fedex\3com\0\0"..., 35, MSG_NOSIGNAL) = 35
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(3, FIONREAD, [109]) = 0
recvfrom(3, "w\306\205\200\0\1\0\2\0\1\0\1\2ju\4corp\5fedex\3com\0\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 109
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, SIOCGIFCONF, {0 -> 160, NULL}) = 0
ioctl(3, SIOCGIFCONF, {160, {{"lo", {AF_INET, inet_addr("127.0.0.1")}}, {"lo:3", {AF_INET, inet_addr("192.168.243.1")}}, {"dummy0", {AF_INET, inet_addr("192.168.243.88")}}, {"eth0", {AF_INET, inet_addr("155.161.225.157")}}, {"vmnet1", {AF_INET, inet_addr("192.168.243.1")}}}}) = 0
ioctl(3, SIOCGIFNETMASK, {ifr_name="lo", ifr_netmask={AF_INET, inet_addr("255.0.0.0")}}) = 0
ioctl(3, SIOCGIFNETMASK, {ifr_name="lo:3", ifr_netmask={AF_INET, inet_addr("255.255.255.255")}}) = 0
ioctl(3, SIOCGIFNETMASK, {ifr_name="dummy0", ifr_netmask={AF_INET, inet_addr("255.255.255.255")}}) = 0
ioctl(3, SIOCGIFNETMASK, {ifr_name="eth0", ifr_netmask={AF_INET, inet_addr("255.255.252.0")}}) = 0
ioctl(3, SIOCGIFNETMASK, {ifr_name="vmnet1", ifr_netmask={AF_INET, inet_addr("255.255.255.0")}}) = 0
close(3) = 0
open("/etc/hosts", O_RDONLY|0x80000) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=96, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7efe000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 28) = 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1233919044, 964183}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(3, "\227\345\1\0\0\1\0\0\0\0\0\0\003118\003243\003168\0031"..., 46, MSG_NOSIGNAL) = 46
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(3, FIONREAD, [118]) = 0
recvfrom(3, "\227\345\205\200\0\1\0\1\0\1\0\1\003118\003243\003168\003"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 118
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [URG], [USR1 URG], 8) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(1023), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
fcntl64(3, F_SETOWN, 6432) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(513), sin_addr=inet_addr("192.168.243.118")}, 16) = 0
write(3, "\0", 1) = 1
writev(3, [{"root\0", 5}, {"root\0", 5}, {"xterm/38400\0", 12}], 3) = 22
read(3, "\0", 1) = 1
rt_sigprocmask(SIG_SETMASK, [USR1 URG], [USR1 URG], 8) = 0
setsockopt(3, SOL_IP, IP_TOS, [16], 4) = 0
setuid32(0) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [HUP], [USR1 URG], 8) = 0
rt_sigaction(SIGHUP, {0x8048bdc, [HUP], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {0x8048bdc, [HUP], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [USR1 URG], [HUP USR1 URG], 8) = 0
rt_sigprocmask(SIG_BLOCK, [QUIT], [USR1 URG], 8) = 0
rt_sigaction(SIGQUIT, {0x8048bdc, [QUIT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [USR1 URG], [QUIT USR1 URG], 8) = 0
rt_sigaction(SIGCHLD, {0x8049f20, [CHLD], SA_RESTART}, {SIG_DFL}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d81918) = 6433
rt_sigaction(SIGURG, {0x80491d0, [URG], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x8048de0, [USR1], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], [USR1 URG], 8) = 0
--- SIGURG (Urgent I/O condition) @ 0 (0) ---
kill(6433, SIGURG) = 0
sigreturn() = ? (mask now [])
read(0, "~", 1) = 1
read(0, ".", 1) = 1
write(1, "~.\r\n", 4) = 4
write(2, "rlogin: closed connection.\r\n", 28) = 28
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {0x8049f20, [CHLD], SA_RESTART}, 8) = 0
kill(6433, SIGKILL) = 0
wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], 0, NULL) = 6433
--- SIGCHLD (Child exited) @ 0 (0) ---
exit_group(0) = ?