Sporadically erroneous keystroke repetitions

Nix nix at esperi.org.uk
Wed Nov 18 15:17:39 PST 2009


On 16 Nov 2009, Oliver Block said:

> On Sat, Nov 14, 2009 at 10:18:01PM +0000, Nix wrote:
>> Are you using kernels 2.6.31--2.6.31.4 on an SMP system or with PREEMPT
>> enabled? If so, this is a Linux kernel bug, fixed in 2.6.31.5.
> No. I use 2.6.26-2-686 (a Debian kernel). Is this really a new problem
> in 2.6.31? In this case it must have another cause in my case.

Yes, I'd guess so.

See <http://lkml.indiana.edu/hypermail/linux/kernel/0910.1/01372.html>.

> Is it documented anywhere? It is hard to imagine that such a serious
> problem exists in the Linux kernel for a longer time.

The TTY layer's locking has been famously incomprehensible and known
buggy for a *very* long time (it's ancient code obeying insane rules
which nobody can change because they're required by POSIX and nobody
really understands it except perhaps Alan Cox). Normally breakage in it
is subtle enough that you rarely notice it (maybe a character is dropped
every so often on some weird TTY line discipline that hardly anyone
uses, since virtually the only ldisc in wide use is ppp/slip and its
requirements are not extreme on modern hardware). But this time the
locking bug had... bigger effects. In my case it led to X being entirely
unusable until restarted (a key was 'held down' and never released,
although *perhaps* if I could have triggered the same bug 2^64-1 times
it would have been released again: restarting X seemed easier).

(I think Alan reads this list sometimes so will doubtless correct me if
I'm wrong. God knows *I* don't pretend to understand the TTY code, I am
but mortal.)



More information about the xorg mailing list