Subject: kern/24221: Garbage can move between virtual terminals?
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <email@example.com>
Date: 01/24/2004 16:52:20
>Synopsis: Garbage can move between virtual terminals?
>Arrival-Date: Sat Jan 24 23:22:00 UTC 2004
>Originator: Richard Rauch
>Release: NetBSD 1.6ZH
"I probably don't know what I'm talking about." http://www.olib.org/~rkr/
System: NetBSD socrates 1.6ZH NetBSD 1.6ZH (socrates) #3: Sat Jan 24 13:01:02 CST 2004 root@socrates:/usr/netbsd/current/src/sys/arch/amd64/compile/obj.amd64/socrates amd64
[NOTE: I gave this a low priority because, so far, I have never observed
a crash. It is possible that the bug can be induced to crash the
system by "stealing" data from a big virtual console to a small
virtual console. If that proves to be true, a higher
priority/severity would probably be appropriate.]
Under some circumstances, seemingly random characters can appear on
the wrong virtual terminal.
E.g., if I ssh to my web-server and "cat /var/log/httpd/comb*",
then switch to another virtual console, some data can appear on
the new console from the old.
When the "source" console is the "console" (not a ttyE?), this
seems to be limited to one byte of garbage. When the source
is a ttyE?, a much larger block can appear (on the order of a
I have not yet verified what happens if I switch from a 50 line
to a 25-line and get more data than the console can handle.
It is not unreasonable to expect a crash, if the console buffers
are laid out in a suitable manner.
This *may* be an AMD64 issue, but I assume that it is a more
general timing/locking issue in the kernel and may affect any
kernel with wscons virtual terminals.
I have noticed this for some time, but have been too preoccupied
to file a PR until now. (It should go back at least as far as
the November snapshot (or whenever the last AMD64 ISO image/snapshot
was made in 2003).)
Stream a lot of data through one virtual terminal, then give the
computer the suitable 3-fingered salute to change to another
virtual terminal. See if you get a chunk of data showing up.
It may matter whether the virtual console is enabled, etc.