* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin [not found] <b6a2187b0902050641h7943816ds26275a320e724440@mail.gmail.com> @ 2009-02-05 23:29 ` David Miller 2009-02-05 23:32 ` Linus Torvalds [not found] ` <20090206031025.GA3281@gondor.apana.org.au> 1 sibling, 1 reply; 24+ messages in thread From: David Miller @ 2009-02-05 23:29 UTC (permalink / raw) To: jeff.chua.linux; +Cc: herbert, rjw, torvalds, linux-kernel, netdev From: Jeff Chua <jeff.chua.linux@gmail.com> Date: Thu, 5 Feb 2009 22:41:52 +0800 [ netdev CC:'d, please always do this for networking stuff ] > The following commit breaks "rlogin". Symptom is the terminal just > hangs before login to the remote machine. No error, just the cursor > never come back. "~." or type "exit" will exit from remote session. > Only happens "sometimes". Happens more often if you try many times. > > I've reverted the commit, and rlogin works now. ... > commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 > Author: Herbert Xu <herbert@gondor.apana.org.au> > Date: Thu Dec 25 17:12:58 2008 -0800 > > tcp: Always set urgent pointer if it's beyond snd_nxt Oh well, what is running on each side of the rlogin attempt? Herbert, please help Jeff try to track down the cause of this. If we can't figure it out soon I'll have to revert. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-05 23:29 ` commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin David Miller @ 2009-02-05 23:32 ` Linus Torvalds 2009-02-05 23:38 ` David Miller 2009-02-05 23:52 ` Herbert Xu 0 siblings, 2 replies; 24+ messages in thread From: Linus Torvalds @ 2009-02-05 23:32 UTC (permalink / raw) To: David Miller; +Cc: jeff.chua.linux, herbert, rjw, linux-kernel, netdev On Thu, 5 Feb 2009, David Miller wrote: > > Herbert, please help Jeff try to track down the cause of this. > If we can't figure it out soon I'll have to revert. Why is there even any discussion? URG is broken as a concept, no sane/modern use case exists. It's totally uninteresting _except_ as a "legacy binary" issue, so - there's no point in trying to "improve" it. - even just a whiff of "breaks legacy app" just says "revert it". No? Linus ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-05 23:32 ` Linus Torvalds @ 2009-02-05 23:38 ` David Miller 2009-02-05 23:52 ` Herbert Xu 1 sibling, 0 replies; 24+ messages in thread From: David Miller @ 2009-02-05 23:38 UTC (permalink / raw) To: torvalds; +Cc: jeff.chua.linux, herbert, rjw, linux-kernel, netdev From: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu, 5 Feb 2009 15:32:20 -0800 (PST) > On Thu, 5 Feb 2009, David Miller wrote: > > > > Herbert, please help Jeff try to track down the cause of this. > > If we can't figure it out soon I'll have to revert. > > Why is there even any discussion? > > URG is broken as a concept, no sane/modern use case exists. It's totally > uninteresting _except_ as a "legacy binary" issue, so > > - there's no point in trying to "improve" it. > > - even just a whiff of "breaks legacy app" just says "revert it". > > No? Sure, and we can put the change back in if we ever figure out what the problem was. This change is in 2.6.28 too, so I'll revert and queue the revert up for -stable as well. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-05 23:32 ` Linus Torvalds 2009-02-05 23:38 ` David Miller @ 2009-02-05 23:52 ` Herbert Xu 1 sibling, 0 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-05 23:52 UTC (permalink / raw) To: Linus Torvalds; +Cc: David Miller, jeff.chua.linux, rjw, linux-kernel, netdev On Thu, Feb 05, 2009 at 03:32:20PM -0800, Linus Torvalds wrote: > > Why is there even any discussion? > > URG is broken as a concept, no sane/modern use case exists. It's totally > uninteresting _except_ as a "legacy binary" issue, so > > - there's no point in trying to "improve" it. > > - even just a whiff of "breaks legacy app" just says "revert it". > > No? It's more complex than that. We'll need to do exactly this in the future in order to support IPv6 jumbograms because that's the only way to use the 16-bit urgent pointer in a packet bigger than 64K. It's also what RFC2675 (http://tools.ietf.org/html/rfc2675, section 5.2) prescribes. IPv6 jumbograms are absolutely required if we ever want to move beyond 10Gb/s Ethernet. But as we're still struggling with 10Gb/s Ethernet, I'm fine with a revert for now while we look for a fix for rlogin. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <20090206031025.GA3281@gondor.apana.org.au>]
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin [not found] ` <20090206031025.GA3281@gondor.apana.org.au> @ 2009-02-06 5:39 ` Jeff Chua 2009-02-06 5:45 ` Herbert Xu 0 siblings, 1 reply; 24+ messages in thread From: Jeff Chua @ 2009-02-06 5:39 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, Rafael J. Wysocki, Linus Torvalds, lkml, netdev [-- Attachment #1: Type: text/plain, Size: 1242 bytes --] On Fri, Feb 6, 2009 at 7:29 AM, David Miller <davem@davemloft.net> wrote: > [ netdev CC:'d, please always do this for networking stuff ] Will do. > Oh well, what is running on each side of the rlogin attempt? Nothing at all. Just a pure "rlogin remotehost" trying to get a login prompt. Nothing inside .profile. On Fri, Feb 6, 2009 at 11:10 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote: > Could you please try a strace on both sides, with and without > this patch applied? 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. With strace, it takes a bit more try to get it to hang. In fact, this bug was quite to trigger and I've been having this problem on-and-off since December, and but it was intermittent and didn't think it was a kernel problem until serious chasing. Some network switches "mask" out the problem, and some direct connect always has this problem. Some servers occurred very frequent, some seldom. On Fri, Feb 6, 2009 at 7:32 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > - even just a whiff of "breaks legacy app" just says "revert it". I agree reverting is the right thing here. Thanks, Jeff. [-- Attachment #2: t1.good --] [-- Type: application/octet-stream, Size: 14898 bytes --] execve("/usr/bin/rlogin", ["rlogin", "ju"], [/* 72 vars */]) = 0 brk(0) = 0x9c20000 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef7000 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=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000 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) = 0xb7eb8000 old_mmap(0xb7ec1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7ec1000 old_mmap(0xb7ec3000, 155996, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ec3000 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) = 0xb7eb4000 old_mmap(0xb7eb6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb7eb6000 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) = 0xb7d7a000 old_mmap(0xb7eae000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x134000) = 0xb7eae000 old_mmap(0xb7eb1000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7eb1000 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d79000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d798d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb7eae000, 8192, PROT_READ) = 0 mprotect(0xb7eb6000, 4096, PROT_READ) = 0 mprotect(0xb7ec1000, 4096, PROT_READ) = 0 mprotect(0xb7f15000, 4096, PROT_READ) = 0 munmap(0xb7eea000, 49475) = 0 getuid32() = 0 brk(0) = 0x9c20000 brk(0x9c41000) = 0x9c41000 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) = 0xb7ef6000 read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1307 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7ef6000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000 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) = 0xb7d6e000 old_mmap(0xb7d77000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7d77000 close(3) = 0 mprotect(0xb7d77000, 4096, PROT_READ) = 0 munmap(0xb7eea000, 49475) = 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) = 0xb7ef6000 read(3, "root:bt2L4qrBrz2II:0:0:SuperUser"..., 4096) = 3779 close(3) = 0 munmap(0xb7ef6000, 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) = 0xb7ef6000 read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096 close(3) = 0 munmap(0xb7ef6000, 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() = 13745 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=13745, groups=00000000}, [12]) = 0 time(NULL) = 1233897551 sendto(3, "\24\0\0\0\26\0\1\3O\310\213I\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\0O\310\213I\2615\0\0\2\10\200\376\1\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\0O\310\213I\2615\0\0\0\0\0\0\1\0\0\0\10"..., 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=118, ...}) = 0 old_mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d5e000 read(3, "domain corp.fedex.com\nnameserver"..., 65536) = 118 read(3, "", 65536) = 0 close(3) = 0 munmap(0xb7d5e000, 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) = 0xb7ef6000 read(3, "#order bind, hosts\norder hosts, "..., 4096) = 93 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7ef6000, 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) = 0xb7ef6000 read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7ef6000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000 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) = 0xb7d68000 old_mmap(0xb7d6c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb7d6c000 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) = 0xb7d56000 old_mmap(0xb7d64000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0xb7d64000 old_mmap(0xb7d66000, 6340, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d66000 close(3) = 0 mprotect(0xb7d64000, 4096, PROT_READ) = 0 mprotect(0xb7d6c000, 4096, PROT_READ) = 0 munmap(0xb7eea000, 49475) = 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({1233897552, 77763}, NULL) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 send(3, "_\367\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, "_\367\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")}}, {"vmnet1", {AF_INET, inet_addr("192.168.243.1")}}, {"eth0", {AF_INET, inet_addr("192.168.249.139")}}}}) = 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="vmnet1", ifr_netmask={AF_INET, inet_addr("255.255.255.0")}}) = 0 ioctl(3, SIOCGIFNETMASK, {ifr_name="eth0", ifr_netmask={AF_INET, inet_addr("255.255.248.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) = 0xb7ef6000 read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7ef6000, 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({1233897552, 293794}, NULL) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 send(3, "G\212\1\0\0\1\0\0\0\0\0\0\003118\003243\003168\003192\7"..., 46, MSG_NOSIGNAL) = 46 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(3, FIONREAD, [118]) = 0 recvfrom(3, "G\212\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, 13745) = 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=0xb7d79918) = 13746 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(13746, 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(13746, SIGKILL) = 0 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], 0, NULL) = 13746 --- SIGCHLD (Child exited) @ 0 (0) --- exit_group(0) = ? [-- Attachment #3: t4.bad --] [-- Type: application/octet-stream, Size: 15008 bytes --] execve("/usr/bin/rlogin", ["rlogin", "ju"], [/* 72 vars */]) = 0 brk(0) = 0x9aed000 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f1f000 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=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f12000 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) = 0xb7ee0000 old_mmap(0xb7ee9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7ee9000 old_mmap(0xb7eeb000, 155996, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7eeb000 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) = 0xb7edc000 old_mmap(0xb7ede000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb7ede000 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) = 0xb7da2000 old_mmap(0xb7ed6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x134000) = 0xb7ed6000 old_mmap(0xb7ed9000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ed9000 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7da1000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7da18d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb7ed6000, 8192, PROT_READ) = 0 mprotect(0xb7ede000, 4096, PROT_READ) = 0 mprotect(0xb7ee9000, 4096, PROT_READ) = 0 mprotect(0xb7f3d000, 4096, PROT_READ) = 0 munmap(0xb7f12000, 49475) = 0 getuid32() = 0 brk(0) = 0x9aed000 brk(0x9b0e000) = 0x9b0e000 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) = 0xb7f1e000 read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1307 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f1e000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f12000 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) = 0xb7d96000 old_mmap(0xb7d9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xb7d9f000 close(3) = 0 mprotect(0xb7d9f000, 4096, PROT_READ) = 0 munmap(0xb7f12000, 49475) = 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) = 0xb7f1e000 read(3, "root:bt2L4qrBrz2II:0:0:SuperUser"..., 4096) = 3779 close(3) = 0 munmap(0xb7f1e000, 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) = 0xb7f1e000 read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096 close(3) = 0 munmap(0xb7f1e000, 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() = 13726 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=13726, groups=00000000}, [12]) = 0 time(NULL) = 1233897475 sendto(3, "\24\0\0\0\26\0\1\3\3\310\213I\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\0\3\310\213I\2365\0\0\2\10\200\376\1\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\0\3\310\213I\2365\0\0\0\0\0\0\1\0\0\0\10"..., 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=118, ...}) = 0 old_mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d86000 read(3, "domain corp.fedex.com\nnameserver"..., 65536) = 118 read(3, "", 65536) = 0 close(3) = 0 munmap(0xb7d86000, 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) = 0xb7f1e000 read(3, "#order bind, hosts\norder hosts, "..., 4096) = 93 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f1e000, 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) = 0xb7f1e000 read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f1e000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=49475, ...}) = 0 old_mmap(NULL, 49475, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f12000 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) = 0xb7d90000 old_mmap(0xb7d94000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb7d94000 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) = 0xb7d7e000 old_mmap(0xb7d8c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0xb7d8c000 old_mmap(0xb7d8e000, 6340, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d8e000 close(3) = 0 mprotect(0xb7d8c000, 4096, PROT_READ) = 0 mprotect(0xb7d94000, 4096, PROT_READ) = 0 munmap(0xb7f12000, 49475) = 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({1233897475, 633762}, NULL) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 send(3, "\306t\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, "\306t\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")}}, {"vmnet1", {AF_INET, inet_addr("192.168.243.1")}}, {"eth0", {AF_INET, inet_addr("192.168.249.139")}}}}) = 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="vmnet1", ifr_netmask={AF_INET, inet_addr("255.255.255.0")}}) = 0 ioctl(3, SIOCGIFNETMASK, {ifr_name="eth0", ifr_netmask={AF_INET, inet_addr("255.255.248.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) = 0xb7f1e000 read(3, "# localhost ...\n127.0.0.1\tlocalh"..., 4096) = 96 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f1e000, 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({1233897475, 698466}, NULL) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 send(3, "#\364\1\0\0\1\0\0\0\0\0\0\003118\003243\003168\003192\7"..., 46, MSG_NOSIGNAL) = 46 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(3, FIONREAD, [118]) = 0 recvfrom(3, "#\364\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) = -1 EADDRINUSE (Address already in use) bind(3, {sa_family=AF_INET, sin_port=htons(1022), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use) bind(3, {sa_family=AF_INET, sin_port=htons(1021), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 fcntl64(3, F_SETOWN, 13726) = 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=0xb7da1918) = 13728 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 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(13728, SIGKILL) = 0 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], 0, NULL) = 13728 --- SIGCHLD (Child exited) @ 0 (0) --- exit_group(0) = ? ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-06 5:39 ` Jeff Chua @ 2009-02-06 5:45 ` Herbert Xu 2009-02-06 11:35 ` Jeff Chua 0 siblings, 1 reply; 24+ messages in thread From: Herbert Xu @ 2009-02-06 5:45 UTC (permalink / raw) To: Jeff Chua; +Cc: David Miller, Rafael J. Wysocki, Linus Torvalds, lkml, netdev 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. Did you change the kernel on the other side during these tests? If reverting the patch on the other side does fix the problem for you, please do the two straces there. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-06 5:45 ` Herbert Xu @ 2009-02-06 11:35 ` Jeff Chua 2009-02-09 5:58 ` Herbert Xu 0 siblings, 1 reply; 24+ messages in thread From: Jeff Chua @ 2009-02-06 11:35 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, Rafael J. Wysocki, Linus Torvalds, lkml, netdev [-- 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) = ? ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-06 11:35 ` Jeff Chua @ 2009-02-09 5:58 ` Herbert Xu 2009-02-09 6:03 ` David Miller 2009-02-09 15:44 ` Linus Torvalds 0 siblings, 2 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-09 5:58 UTC (permalink / raw) To: Jeff Chua; +Cc: David Miller, Rafael J. Wysocki, Linus Torvalds, lkml, netdev On Fri, Feb 06, 2009 at 07:35:50PM +0800, Jeff Chua wrote: > > > 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. Then the problem isn't my patch at all. My patch only affects the side sending the urgent data, according to your straces, rlogin is only receiving urgent data, not sending it. So the patch cannot have an affect. > > 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. No you're still stracing rlogin, which in this case is the receiver of the urgent data. Please strace the sending side, which would be presumably be rlogind in this case. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 5:58 ` Herbert Xu @ 2009-02-09 6:03 ` David Miller 2009-02-09 6:11 ` Herbert Xu 2009-02-09 15:44 ` Linus Torvalds 1 sibling, 1 reply; 24+ messages in thread From: David Miller @ 2009-02-09 6:03 UTC (permalink / raw) To: herbert; +Cc: jeff.chua.linux, rjw, torvalds, linux-kernel, netdev From: Herbert Xu <herbert@gondor.apana.org.au> Date: Mon, 9 Feb 2009 16:58:48 +1100 > On Fri, Feb 06, 2009 at 07:35:50PM +0800, Jeff Chua wrote: > > > > > 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. > > Then the problem isn't my patch at all. My patch only affects > the side sending the urgent data, according to your straces, rlogin > is only receiving urgent data, not sending it. So the patch cannot > have an affect. Hmmm... let's figure out exactly what's going on here. I would expect to see the URG packets from rlogin not rlogind, from things like hitting Ctrl-C etc. On the other hand, I can't imagine what the server, rlogind, would be sending URGs out for. So I would say that it is more likely to be rlogin sending the URG packets. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 6:03 ` David Miller @ 2009-02-09 6:11 ` Herbert Xu 2009-02-09 7:13 ` Ilpo Järvinen 0 siblings, 1 reply; 24+ messages in thread From: Herbert Xu @ 2009-02-09 6:11 UTC (permalink / raw) To: David Miller; +Cc: jeff.chua.linux, rjw, torvalds, linux-kernel, netdev On Sun, Feb 08, 2009 at 10:03:57PM -0800, David Miller wrote: > > I would expect to see the URG packets from rlogin not rlogind, from > things like hitting Ctrl-C etc. That's what I thought too, however, the strace says otherwise: 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 FD 3 is the TCP socket. As you can see, the only operations done were write/writev/read/setsockopt. None of these can enter urgent mode for sending, so that's how I concluded that my patch should have zero effect on this side. Note also that we got an SIGURG, which indicates that we received urgent data. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 6:11 ` Herbert Xu @ 2009-02-09 7:13 ` Ilpo Järvinen 2009-02-09 7:28 ` Herbert Xu 2009-02-09 14:10 ` Jeff Chua 0 siblings, 2 replies; 24+ messages in thread From: Ilpo Järvinen @ 2009-02-09 7:13 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 3815 bytes --] On Mon, 9 Feb 2009, Herbert Xu wrote: > On Sun, Feb 08, 2009 at 10:03:57PM -0800, David Miller wrote: > > > > I would expect to see the URG packets from rlogin not rlogind, from > > things like hitting Ctrl-C etc. > > That's what I thought too, however, the strace says otherwise: > > 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 > > FD 3 is the TCP socket. As you can see, the only operations done > were write/writev/read/setsockopt. None of these can enter urgent > mode for sending, so that's how I concluded that my patch should > have zero effect on this side. > > Note also that we got an SIGURG, which indicates that we received > urgent data. Hmm, what happens if a opposite dir ACK gets sent (it's zero sized seqno range will be above urgent sequence when urg is not yet acknowledged)? So we'll take the later branch after your change and send bogus 0xffff urg? I think you're change might have actually broken bidir tcp completely (and probably window probing as well under some conditions). Congraz, two flies with a single stroke :-). You would have needed an additional check that the tcb->seq is below urg... ...Below is a patch but Jeff might need to revert the revert first if he tests with the latest Linus' tree. -- i. [PATCH] tcp: check that we're still < urg instead of sending a bogus one Opposite dir ACK with zero sized seqno range can go into the later condition once urg is in the outstanding window not yet acknowledge (we're still in urg mode but seqno we sent in the ack won't be below snd_up). Need to check that we never advertize bogus urg for a segment which is after the snd_up. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/ipv4/tcp_output.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 557fe16..c808d73 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -667,7 +667,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { th->urg_ptr = htons(tp->snd_up - tcb->seq); th->urg = 1; - } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt) && + before(tcb->seq, tcp->snd_up)) { th->urg_ptr = 0xFFFF; th->urg = 1; } -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 7:13 ` Ilpo Järvinen @ 2009-02-09 7:28 ` Herbert Xu 2009-02-09 7:33 ` Herbert Xu 2009-02-09 13:28 ` Ilpo Järvinen 2009-02-09 14:10 ` Jeff Chua 1 sibling, 2 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-09 7:28 UTC (permalink / raw) To: Ilpo Järvinen Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev On Mon, Feb 09, 2009 at 09:13:00AM +0200, Ilpo Järvinen wrote: > > Hmm, what happens if a opposite dir ACK gets sent (it's zero sized seqno > range will be above urgent sequence when urg is not yet acknowledged)? So > we'll take the later branch after your change and send bogus 0xffff urg? > I think you're change might have actually broken bidir tcp completely (and > probably window probing as well under some conditions). Congraz, two flies > with a single stroke :-). You would have needed an additional check that > the tcb->seq is below urg... > > ...Below is a patch but Jeff might need to revert the revert first if > he tests with the latest Linus' tree. Good point! That would definitely explain this. > [PATCH] tcp: check that we're still < urg instead of sending a bogus one > > Opposite dir ACK with zero sized seqno range can go into the > later condition once urg is in the outstanding window not > yet acknowledge (we're still in urg mode but seqno we sent in > the ack won't be below snd_up). Need to check that we never > advertize bogus urg for a segment which is after the snd_up. > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > --- > net/ipv4/tcp_output.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index 557fe16..c808d73 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -667,7 +667,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, > if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { > th->urg_ptr = htons(tp->snd_up - tcb->seq); > th->urg = 1; > - } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { > + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt) && > + before(tcb->seq, tcp->snd_up)) { > th->urg_ptr = 0xFFFF; > th->urg = 1; > } We could rewrite this as if (unlikely(tcp_urg_mode(tp) && before(tcb->seq, tcp->snd_up))) { if (before(tp->sndup, tcb->seq + 0x10000)) { th->urg_ptr = htons(tp->snd_up - tcb->seq); th->urg = 1; } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { th->urg_ptr = 0xFFFF; th->urg = 1; } } Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 7:28 ` Herbert Xu @ 2009-02-09 7:33 ` Herbert Xu 2009-02-09 13:28 ` Ilpo Järvinen 1 sibling, 0 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-09 7:33 UTC (permalink / raw) To: Ilpo Järvinen Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev On Mon, Feb 09, 2009 at 06:28:06PM +1100, Herbert Xu wrote: > On Mon, Feb 09, 2009 at 09:13:00AM +0200, Ilpo Järvinen wrote: > > > > Hmm, what happens if a opposite dir ACK gets sent (it's zero sized seqno > > range will be above urgent sequence when urg is not yet acknowledged)? So > > we'll take the later branch after your change and send bogus 0xffff urg? > > I think you're change might have actually broken bidir tcp completely (and > > probably window probing as well under some conditions). Congraz, two flies > > with a single stroke :-). You would have needed an additional check that > > the tcb->seq is below urg... > > > > ...Below is a patch but Jeff might need to revert the revert first if > > he tests with the latest Linus' tree. > > Good point! That would definitely explain this. Actually, I don't see how we can have tcp_urg_mode being true when his strace shows no OOB data at all (it only did write and writev). So I'm not sure if this bug is the one causing this. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 7:28 ` Herbert Xu 2009-02-09 7:33 ` Herbert Xu @ 2009-02-09 13:28 ` Ilpo Järvinen 2009-02-21 13:24 ` Herbert Xu 1 sibling, 1 reply; 24+ messages in thread From: Ilpo Järvinen @ 2009-02-09 13:28 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 2387 bytes --] On Mon, 9 Feb 2009, Herbert Xu wrote: > On Mon, Feb 09, 2009 at 09:13:00AM +0200, Ilpo Järvinen wrote: > > > > Hmm, what happens if a opposite dir ACK gets sent (it's zero sized seqno > > range will be above urgent sequence when urg is not yet acknowledged)? So > > we'll take the later branch after your change and send bogus 0xffff urg? > > I think you're change might have actually broken bidir tcp completely (and > > probably window probing as well under some conditions). Congraz, two flies > > with a single stroke :-). You would have needed an additional check that > > the tcb->seq is below urg... > > > > ...Below is a patch but Jeff might need to revert the revert first if > > he tests with the latest Linus' tree. > > Good point! That would definitely explain this. > > > [PATCH] tcp: check that we're still < urg instead of sending a bogus one > > > > Opposite dir ACK with zero sized seqno range can go into the > > later condition once urg is in the outstanding window not > > yet acknowledge (we're still in urg mode but seqno we sent in > > the ack won't be below snd_up). Need to check that we never > > advertize bogus urg for a segment which is after the snd_up. > > > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > > --- > > net/ipv4/tcp_output.c | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > > index 557fe16..c808d73 100644 > > --- a/net/ipv4/tcp_output.c > > +++ b/net/ipv4/tcp_output.c > > @@ -667,7 +667,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, > > if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { > > th->urg_ptr = htons(tp->snd_up - tcb->seq); > > th->urg = 1; > > - } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { > > + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt) && > > + before(tcb->seq, tcp->snd_up)) { > > th->urg_ptr = 0xFFFF; > > th->urg = 1; > > } > > We could rewrite this as > > if (unlikely(tcp_urg_mode(tp) && before(tcb->seq, tcp->snd_up))) { > if (before(tp->sndup, tcb->seq + 0x10000)) { > th->urg_ptr = htons(tp->snd_up - tcb->seq); > th->urg = 1; > } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { > th->urg_ptr = 0xFFFF; > th->urg = 1; > } > } Yes, that should work too except the gcc catchable typo. -- i. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 13:28 ` Ilpo Järvinen @ 2009-02-21 13:24 ` Herbert Xu 2009-02-21 18:54 ` Ilpo Järvinen 0 siblings, 1 reply; 24+ messages in thread From: Herbert Xu @ 2009-02-21 13:24 UTC (permalink / raw) To: Ilpo Järvinen Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev On Mon, Feb 09, 2009 at 03:28:09PM +0200, Ilpo Järvinen wrote: > > Yes, that should work too except the gcc catchable typo. Thanks, so let's try again for net-next: tcp: Always set urgent pointer if it's beyond snd_nxt Our TCP stack does not set the urgent flag if the urgent pointer does not fit in 16 bits, i.e., if it is more than 64K from the sequence number of a packet. This behaviour is different from the BSDs, and clearly contradicts the purpose of urgent mode, which is to send the notification (though not necessarily the associated data) as soon as possible. Our current behaviour may in fact delay the urgent notification indefinitely if the receiver window does not open up. Simply matching BSD however may break legacy applications which incorrectly rely on the out-of-band delivery of urgent data, and conversely the in-band delivery of non-urgent data. Alexey Kuznetsov suggested a safe solution of following BSD only if the urgent pointer itself has not yet been transmitted. This way we guarantee that when the remote end sees the packet with non-urgent data marked as urgent due to wrap-around we would have advanced the urgent pointer beyond, either to the actual urgent data or to an as-yet untransmitted packet. The only potential downside is that applications on the remote end may see multiple SIGURG notifications. However, this would occur anyway with other TCP stacks. More importantly, the outcome of such a duplicate notification is likely to be harmless since the signal itself does not carry any information other than the fact that we're in urgent mode. Thanks to Ilpo Järvinen for fixing a critical bug in this and Jeff Chua for reporting that bug. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dda42f0..f5263c8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -663,10 +663,14 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, th->urg_ptr = 0; /* The urg_mode check is necessary during a below snd_una win probe */ - if (unlikely(tcp_urg_mode(tp) && - between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF))) { - th->urg_ptr = htons(tp->snd_up - tcb->seq); - th->urg = 1; + if (unlikely(tcp_urg_mode(tp) && before(tcb->seq, tp->snd_up))) { + if (before(tp->snd_up, tcb->seq + 0x10000)) { + th->urg_ptr = htons(tp->snd_up - tcb->seq); + th->urg = 1; + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { + th->urg_ptr = 0xFFFF; + th->urg = 1; + } } tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-21 13:24 ` Herbert Xu @ 2009-02-21 18:54 ` Ilpo Järvinen 2009-02-22 7:53 ` David Miller 0 siblings, 1 reply; 24+ messages in thread From: Ilpo Järvinen @ 2009-02-21 18:54 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, jeff.chua.linux, rjw, torvalds, LKML, Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 3186 bytes --] On Sat, 21 Feb 2009, Herbert Xu wrote: > On Mon, Feb 09, 2009 at 03:28:09PM +0200, Ilpo Järvinen wrote: > > > > Yes, that should work too except the gcc catchable typo. > > Thanks, so let's try again for net-next: > > tcp: Always set urgent pointer if it's beyond snd_nxt > > Our TCP stack does not set the urgent flag if the urgent pointer > does not fit in 16 bits, i.e., if it is more than 64K from the > sequence number of a packet. > > This behaviour is different from the BSDs, and clearly contradicts > the purpose of urgent mode, which is to send the notification > (though not necessarily the associated data) as soon as possible. > Our current behaviour may in fact delay the urgent notification > indefinitely if the receiver window does not open up. > > Simply matching BSD however may break legacy applications which > incorrectly rely on the out-of-band delivery of urgent data, and > conversely the in-band delivery of non-urgent data. > > Alexey Kuznetsov suggested a safe solution of following BSD only > if the urgent pointer itself has not yet been transmitted. This > way we guarantee that when the remote end sees the packet with > non-urgent data marked as urgent due to wrap-around we would have > advanced the urgent pointer beyond, either to the actual urgent > data or to an as-yet untransmitted packet. > > The only potential downside is that applications on the remote > end may see multiple SIGURG notifications. However, this would > occur anyway with other TCP stacks. More importantly, the outcome > of such a duplicate notification is likely to be harmless since > the signal itself does not carry any information other than the > fact that we're in urgent mode. > > Thanks to Ilpo Järvinen for fixing a critical bug in this and > Jeff Chua for reporting that bug. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index dda42f0..f5263c8 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -663,10 +663,14 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, > th->urg_ptr = 0; > > /* The urg_mode check is necessary during a below snd_una win probe */ > - if (unlikely(tcp_urg_mode(tp) && > - between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF))) { > - th->urg_ptr = htons(tp->snd_up - tcb->seq); > - th->urg = 1; > + if (unlikely(tcp_urg_mode(tp) && before(tcb->seq, tp->snd_up))) { > + if (before(tp->snd_up, tcb->seq + 0x10000)) { > + th->urg_ptr = htons(tp->snd_up - tcb->seq); > + th->urg = 1; > + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { > + th->urg_ptr = 0xFFFF; > + th->urg = 1; > + } > } > > tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); I thought this through already at the last time... so I think it really should work in all cases I could think of (including the below window probes whose existance is not very obvious before they bite back :-)): Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> But I mostly agree with Linus that URG is legacy that would be good to just deprecate instead of trying to "fix" it. -- i. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-21 18:54 ` Ilpo Järvinen @ 2009-02-22 7:53 ` David Miller 2009-02-24 6:40 ` Jeff Chua 0 siblings, 1 reply; 24+ messages in thread From: David Miller @ 2009-02-22 7:53 UTC (permalink / raw) To: ilpo.jarvinen Cc: herbert, jeff.chua.linux, rjw, torvalds, linux-kernel, netdev From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 21 Feb 2009 20:54:11 +0200 (EET) > On Sat, 21 Feb 2009, Herbert Xu wrote: > > > On Mon, Feb 09, 2009 at 03:28:09PM +0200, Ilpo Järvinen wrote: > > > > > > Yes, that should work too except the gcc catchable typo. > > > > Thanks, so let's try again for net-next: > > > > tcp: Always set urgent pointer if it's beyond snd_nxt ... > I thought this through already at the last time... so I think it really > should work in all cases I could think of (including the below window > probes whose existance is not very obvious before they bite back :-)): > > Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > > But I mostly agree with Linus that URG is legacy that would be good > to just deprecate instead of trying to "fix" it. Sure, but I'll give Herbert one more chance :-) Applied to net-next-2.6 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-22 7:53 ` David Miller @ 2009-02-24 6:40 ` Jeff Chua 2009-02-24 6:44 ` Herbert Xu 2009-02-24 6:46 ` David Miller 0 siblings, 2 replies; 24+ messages in thread From: Jeff Chua @ 2009-02-24 6:40 UTC (permalink / raw) To: David Miller; +Cc: ilpo.jarvinen, herbert, rjw, torvalds, linux-kernel, netdev On Sun, Feb 22, 2009 at 3:53 PM, David Miller <davem@davemloft.net> wrote: > Sure, but I'll give Herbert one more chance :-) > > Applied to net-next-2.6 I see that this is already in linux-2.6.29-rc6. Tested and working fine. Thanks, Jeff. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-24 6:40 ` Jeff Chua @ 2009-02-24 6:44 ` Herbert Xu 2009-02-24 6:46 ` David Miller 1 sibling, 0 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-24 6:44 UTC (permalink / raw) To: Jeff Chua Cc: David Miller, ilpo.jarvinen, rjw, torvalds, linux-kernel, netdev On Tue, Feb 24, 2009 at 02:40:30PM +0800, Jeff Chua wrote: > On Sun, Feb 22, 2009 at 3:53 PM, David Miller <davem@davemloft.net> wrote: > > > Sure, but I'll give Herbert one more chance :-) > > > > Applied to net-next-2.6 > > I see that this is already in linux-2.6.29-rc6. Tested and working fine. Are you sure? It's not in my copy of rc6 :) net-next-2.6 is for the release after the current one so the earliest you're going to see this is in 2.6.30. For now you'll either need to pull net-next-2.6 directly, use linux-next, or apply the patch by hand. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-24 6:40 ` Jeff Chua 2009-02-24 6:44 ` Herbert Xu @ 2009-02-24 6:46 ` David Miller 2009-02-24 8:01 ` Jeff Chua 1 sibling, 1 reply; 24+ messages in thread From: David Miller @ 2009-02-24 6:46 UTC (permalink / raw) To: jeff.chua.linux Cc: ilpo.jarvinen, herbert, rjw, torvalds, linux-kernel, netdev From: Jeff Chua <jeff.chua.linux@gmail.com> Date: Tue, 24 Feb 2009 14:40:30 +0800 > On Sun, Feb 22, 2009 at 3:53 PM, David Miller <davem@davemloft.net> wrote: > > > Sure, but I'll give Herbert one more chance :-) > > > > Applied to net-next-2.6 > > I see that this is already in linux-2.6.29-rc6. Tested and working fine. Actually, it isn't. Herbert's change is in net-next-2.6 which will show up in linux-next rather than Linus's 2.6.29-rcX tree. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-24 6:46 ` David Miller @ 2009-02-24 8:01 ` Jeff Chua 0 siblings, 0 replies; 24+ messages in thread From: Jeff Chua @ 2009-02-24 8:01 UTC (permalink / raw) To: David Miller; +Cc: ilpo.jarvinen, herbert, rjw, torvalds, linux-kernel, netdev On Tue, Feb 24, 2009 at 2:46 PM, David Miller <davem@davemloft.net> wrote: > Actually, it isn't. > > Herbert's change is in net-next-2.6 which will show up in linux-next > rather than Linus's 2.6.29-rcX tree. > Uh, I got it wrong. Didn't look into details. Just noticed that tcp_output.c was changed today, so I just assume that was the one ... which turned out to a one-liner comment removed. Anyway, I just tested the Herbert's patch and it looks good. rlogin not hanging. Sorry for the earlier fault report. Thanks Jeff. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 7:13 ` Ilpo Järvinen 2009-02-09 7:28 ` Herbert Xu @ 2009-02-09 14:10 ` Jeff Chua 1 sibling, 0 replies; 24+ messages in thread From: Jeff Chua @ 2009-02-09 14:10 UTC (permalink / raw) To: Ilpo Järvinen; +Cc: Herbert Xu, David Miller, rjw, torvalds, LKML, Netdev On Mon, Feb 9, 2009 at 3:13 PM, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> wrote: > net/ipv4/tcp_output.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index 557fe16..c808d73 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -667,7 +667,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, > if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { > th->urg_ptr = htons(tp->snd_up - tcb->seq); > th->urg = 1; > - } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { > + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt) && > + before(tcb->seq, tcp->snd_up)) { > th->urg_ptr = 0xFFFF; > th->urg = 1; > } > -- > 1.5.6.5 > Ilpo, Got this error ... CC net/ipv4/tcp_output.o net/ipv4/tcp_output.c: In function 'tcp_transmit_skb': net/ipv4/tcp_output.c:671: error: 'tcp' undeclared (first use in this function) net/ipv4/tcp_output.c:671: error: (Each undeclared identifier is reported only once net/ipv4/tcp_output.c:671: error: for each function it appears in.) > + before(tcb->seq, tcp->snd_up)) { That should be "tp->snd_up" instead of "tcp->snd_up". Other than that, the good news is I've tested your patch on top of Herbert's patch, and it works! No more rlogin hangs! Thanks, Jeff. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 5:58 ` Herbert Xu 2009-02-09 6:03 ` David Miller @ 2009-02-09 15:44 ` Linus Torvalds 2009-02-09 21:17 ` Herbert Xu 1 sibling, 1 reply; 24+ messages in thread From: Linus Torvalds @ 2009-02-09 15:44 UTC (permalink / raw) To: Herbert Xu; +Cc: Jeff Chua, David Miller, Rafael J. Wysocki, lkml, netdev On Mon, 9 Feb 2009, Herbert Xu wrote: > > Then the problem isn't my patch at all. My patch only affects > the side sending the urgent data, according to your straces, rlogin > is only receiving urgent data, not sending it. So the patch cannot > have an affect. The trace is incolclusive about that - just look at it. It's not following threads/children etc, so it's missing all the relevant pieces. Which you should have realized, Herbert, since you had the knowledge that your patch _DOES_ make a difference, enough to bisect to it, and enough to see that reverting it changes behaviour. Why are you arguing against facts? >From the trace: 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 IOW, the trace isn't saying anything at all, because all the real work probably got done in that child process. > No you're still stracing rlogin, which in this case is the receiver > of the urgent data. Please strace the sending side, which would be > presumably be rlogind in this case. Herbert, how sure are you that there is no URG data on that side? You clearly spent _zero_ time actually looking at the trace, so... Linus ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin 2009-02-09 15:44 ` Linus Torvalds @ 2009-02-09 21:17 ` Herbert Xu 0 siblings, 0 replies; 24+ messages in thread From: Herbert Xu @ 2009-02-09 21:17 UTC (permalink / raw) To: Linus Torvalds; +Cc: Jeff Chua, David Miller, Rafael J. Wysocki, lkml, netdev On Mon, Feb 09, 2009 at 07:44:56AM -0800, Linus Torvalds wrote: > > The trace is incolclusive about that - just look at it. It's not following > threads/children etc, so it's missing all the relevant pieces. > > Which you should have realized, Herbert, since you had the knowledge that > your patch _DOES_ make a difference, enough to bisect to it, and enough > to see that reverting it changes behaviour. > > Why are you arguing against facts? > > >From the trace: > > 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 > > IOW, the trace isn't saying anything at all, because all the real work > probably got done in that child process. Ah yes, I knew the strace didn't tally with the reported behaviour, but I'd been focusing on the SIGURG and missed the clone. Thanks! -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2009-02-24 8:01 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b6a2187b0902050641h7943816ds26275a320e724440@mail.gmail.com>
2009-02-05 23:29 ` commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin David Miller
2009-02-05 23:32 ` Linus Torvalds
2009-02-05 23:38 ` David Miller
2009-02-05 23:52 ` Herbert Xu
[not found] ` <20090206031025.GA3281@gondor.apana.org.au>
2009-02-06 5:39 ` Jeff Chua
2009-02-06 5:45 ` Herbert Xu
2009-02-06 11:35 ` Jeff Chua
2009-02-09 5:58 ` Herbert Xu
2009-02-09 6:03 ` David Miller
2009-02-09 6:11 ` Herbert Xu
2009-02-09 7:13 ` Ilpo Järvinen
2009-02-09 7:28 ` Herbert Xu
2009-02-09 7:33 ` Herbert Xu
2009-02-09 13:28 ` Ilpo Järvinen
2009-02-21 13:24 ` Herbert Xu
2009-02-21 18:54 ` Ilpo Järvinen
2009-02-22 7:53 ` David Miller
2009-02-24 6:40 ` Jeff Chua
2009-02-24 6:44 ` Herbert Xu
2009-02-24 6:46 ` David Miller
2009-02-24 8:01 ` Jeff Chua
2009-02-09 14:10 ` Jeff Chua
2009-02-09 15:44 ` Linus Torvalds
2009-02-09 21:17 ` Herbert Xu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox