Subject: port-i386/4177: pccons.c scroll crash
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 09/28/1997 01:16:45
>Synopsis: use of scroll-lock w. pccons.c can hang the machine
>Responsible: gnats-admin (GNATS administrator)
>Arrival-Date: Sun Sep 28 05:50:00 1997
- David A. Holland | VINO project home page:
email@example.com | http://www.eecs.harvard.edu/vino
System: NetBSD chianti.eecs.harvard.edu 1.2.1 NetBSD 1.2.1 (CHIANTI) #1: Tue Sep 9 16:52:39 EDT 1997 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/CHIANTI i386
The tsleep() in sput() that pccons.c uses to hold output
when scroll-lock is on can sometimes get called from an
interrupt handler, leading to a total system lockup.
This happens when you have tty echo on, you press scroll-lock,
and you go off the bottom of the screen by pressing return
(that is, nothing else is in the output queue). The return
comes out of sget() in pcintr() and gets handed to l_rint().
l_rint is ttyinput(), and if tty echo is set, the newline
gets echoed to ttyoutput(). This would be fine, except that
ttyinput() calls ttstart() at the bottom, and pcstart(),
which this calls, tries to handle the output right away.
This means that sput() gets called with the newline... and
since scroll-lock is on, it tries to sleep to wait for it
to turn off. Boom.
Make sure you're running a shell that doesn't put the tty
in raw mode (eg, sh or csh, not tcsh, bash, or zsh), go to
the bottom of the screen, hit scroll-lock, and press return.
Machine hangs completely.
Unfortunately, I don't have any suggestions. This looks like
it could easily turn out to require a substantial rewrite.
Or scroll-lock support could be sacrificed.