more eating CPU
Joakim Tjernlund
joakim.tjernlund at transmode.se
Mon Dec 13 13:43:07 UTC 2010
Denys Vlasenko <vda.linux at googlemail.com> wrote on 2010/12/13 14:28:27:
>
> On Thu, Dec 9, 2010 at 10:07 AM, Joakim Tjernlund
> <joakim.tjernlund at transmode.se> wrote:
> >
> > We noticed a hung more command, consuming 100% CPU. strace
> > showed this:
> >
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> > read(3, "", 4096) = 0
> > write(1, "\r "..., 114) = -1 EIO (Input/output error)
> >
> > This is on BusyBox v1.14.2, I know it is a bit old but I figured I report it anyway.
>
> Can you confirm that this is a working fix?
>
> }
> /* My small mind cannot fathom backspaces and UTF-8 */
> putchar(c);
> +
> + if (ferror(stdout)) /* if tty was destroyed (closed xterm, etc) */
> + goto end;
hmm, I can confirm that closing the telnet session sends more into the above spin.
Will be some time before I get a chance to test the fix though. I think the fix
is good in any case though.
Jocke
More information about the busybox
mailing list