ash endless loop after ssh client is killed

Alexander Kriegisch Alexander at Kriegisch.name
Fri Apr 20 02:37:12 UTC 2007


The following problem occurs in bb 1.4.1 and, AFAIK in
1.5.0. In 1.3.1 it does not happen. Platform is mipsel.

How to reproduce:
  - Dropbear interactive ssh session to router box running busybox
  - ssh client is putty on Windows or OpenSSH on Ubuntu 6.10
  - Action: kill client by closing window or sending kill signal
    (no clean exit)
  - Symptom: sh process shoots to >90% CPU permanently, sooner or later
    making the router stall or reboot
     PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
    3435 root     R        472     1 30.6  1.5 sh
  - strace transcript:
    Process 3435 attached - interrupt to quit
    write(2, "Cannot set tty process group (", 30) = -1 EIO (Input/output error)
    write(2, "\n", 1)                       = -1 EIO (Input/output error)
    ioctl(10, 0x80047476, 0x7fb969bc)       = -1 ENOTTY (Inappropriate ioctl for device)
    write(2, "-sh", 3)                      = -1 EIO (Input/output error)
    write(2, "Cannot set tty process group (", 30) = -1 EIO (Input/output error)
    write(2, "\n", 1)                       = -1 EIO (Input/output error)
    ioctl(10, 0x80047476, 0x7fb969bc)       = -1 ENOTTY (Inappropriate ioctl for device)
    (...)

Somehow 'xtcsetpgrp' is called repeatedly, maybe because
of the negative return value. Can you get this fixed?

Regards
-- 
Alexander Kriegisch



More information about the busybox mailing list