Re: tty: ctrl-c not always echoed, especially under load

From: Alan Cox
Date: Mon Aug 04 2008 - 19:28:51 EST


On Mon, 04 Aug 2008 16:03:02 -0600
Joe Peterson <joe@xxxxxxxxxxx> wrote:

> I am experiencing a rather intermittent and hard-to-reproduce issue in the tty
> layer, and I am posting here to get ideas on how to debug it from those of you
> who have delved into the tty internals. I suspect some kind of race is going on
> or the echo is caught in the tty buffer when it gets flushed (and never makes it
> to the tty). Heavy load (compiling, etc.) seems to make it more likely.
>
> When a signal character (e.g. ctrl-c) is received, the tty ldisc and driver are
> flushed, the character is echoed (e.g. "^C" if echoctl is on), and the signal is
> issued. Because the flush happens first, the echo should always appear on the
> tty, but sometimes it does not. What I am wondering is how the echo could get
> "swallowed". The code I have been using to test this is:

If the output buffer is full then echoed characters/^C etc will vanish the
way n_tty implements its buffering internally. It's always worked that
way.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/