BB 1.7.2 and many old versions down to 1.4.x, I don't know exactly.
Platform: mipsel

We have had this problem for months, maybe 1-2 years, with different BB
versions, but now I think it is time to report it:

On my embedded system there is BB running telnetd. The shell is ash. A
client logs in and works until he types "exit". After that the session
is terminated, but the telnet client hanngs waiting for - I don't know
what. I can reproduce it with several telnet clients. It does not happen
with Dropbear sshd, so I strongly assume it is a BB problem.

Interestingly, the session exits cleanly if I call "setconsole -r"
during the telnet session.

I have attached two sets of log files generated like this:

> strace -p 1186 -p 742 -f -ff -s 100 -o /ash-telnet-ok.log

PID 742 is telnetd, 1131/1186 are ash, respectively. The ash protocols
are just there for completeness, they are identical. The telnetd logs
differ, though.

Maybe somebody can find out what is wrong here. It might be a similar
case to "ash endless loop after ssh client is killed" (April 20-29,
2007), I don't know.

Regards
-- 
Alexander Kriegisch
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "e", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "e", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "e", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "e", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "x", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "x", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "x", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "x", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "i", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "i", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "i", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "i", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "t", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "t", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "t", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "t", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "\r\n", 2022)             = 2
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "\r", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "\r\n", 2022) = 2
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "\r\n", 2) = 2
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   --- SIGCHLD (Child exited) @ 0 (0) ---
742   read(5, 0x4a7822, 2022)           = -1 EIO (Input/output error)
742   kill(1186, SIGKILL)               = 0
742   wait4(1186, NULL, 0, NULL)        = 1186
742   close(5)                          = 0
742   close(4)                          = 0
742   close(4)                          = -1 EBADF (Bad file descriptor)
742   _newselect(4, [3], [], NULL, NULL <unfinished ...>
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "e", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "e", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "e", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "e", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "x", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "x", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "x", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "x", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "i", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "i", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "i", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "i", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "t", 2022)                = 1
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "t", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "t", 2022)                = 1
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "t", 1)                  = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [4])
742   read(4, "\r\n", 2022)             = 2
742   _newselect(6, [3 4 5], [5], NULL, NULL) = 1 (out [5])
742   write(5, "\r", 1) = 1
742   _newselect(6, [3 4 5], [], NULL, NULL) = 1 (in [5])
742   read(5, "\r\n", 2022) = 2
742   _newselect(6, [3 4 5], [4], NULL, NULL) = 1 (out [4])
742   write(4, "\r\n", 2) = 2
742   _newselect(6, [3 4 5], [], NULL, NULL) = ? ERESTARTNOHAND (To be 
restarted)
742   --- SIGCHLD (Child exited) @ 0 (0) ---
742   _newselect(6, [3 4 5], [], NULL, NULL <unfinished ...>
1186  read(0, "e", 1)            = 1
1186  write(1, "e", 1) = 1
1186  read(0, "x", 1)            = 1
1186  write(1, "x", 1) = 1
1186  read(0, "i", 1)            = 1
1186  write(1, "i", 1)                  = 1
1186  read(0, "t", 1)            = 1
1186  write(1, "t", 1)                  = 1
1186  read(0, "\n", 1)          = 1
1186  write(1, "\n", 1) = 1
1186  ioctl(0, TIOCSCTTY, {B38400 opost isig icanon echo ...}) = 0
1186  ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
1186  rt_sigaction(SIGWINCH, {0x10000000, [], 0}, {0x10000000, [], 
SA_SIGINFO|SA_NOCLDWAIT|0x46ab70}, 16) = 0
1186  ioctl(10, 0x80047476, 0x7fa4596c) = 0
1186  setpgid(0, 1186)                  = -1 EPERM (Operation not permitted)
1186  close(10)                         = 0
1186  exit(0)                           = ?
1131  read(0, "e", 1)            = 1
1131  write(1, "e", 1) = 1
1131  read(0, "x", 1)            = 1
1131  write(1, "x", 1) = 1
1131  read(0, "i", 1)            = 1
1131  write(1, "i", 1) = 1
1131  read(0, "t", 1)            = 1
1131  write(1, "t", 1) = 1
1131  read(0, "\n", 1)          = 1
1131  write(1, "\n", 1) = 1
1131  ioctl(0, TIOCSCTTY, {B38400 opost isig icanon echo ...}) = 0
1131  ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
1131  rt_sigaction(SIGWINCH, {0x10000000, [], 0}, {0x10000000, [], 
SA_SIGINFO|SA_NOCLDWAIT|0x46ab70}, 16) = 0
1131  ioctl(10, 0x80047476, 0x7fc9296c) = 0
1131  setpgid(0, 1131)                  = -1 EPERM (Operation not permitted)
1131  close(10)                         = 0
1131  exit(0)                           = ?
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to