Subject: port-i386/675: cannot kill process stuct in ttyout
To: None <gnats-admin@NetBSD.ORG>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: netbsd-bugs
Date: 01/02/1995 00:50:08
>Number:         675
>Category:       port-i386
>Synopsis:       unable to kill process waiting for ttyout (com.c)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan  2 00:50:04 1995
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        1.0
>Environment:
	
System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #6: Tue Dec 13 09:55:20 EST 1994 root@zen.void.oz.au:/usr/src/sys/arch/i386/compile/ZEN i386


>Description:

I've been having a lot of trouble getting term-2.2.5 working reliably.
All works well for a while - then term just sleeps forever on select().

During one such experiment I noticed that I could not even echo
anything to the tty device (trying to wakeup term).  I killed term and
woke up the kermit process, it could not talk to the modem either -
just stopped in ttyout.

I managed to kill the kermit (attempts to hangup eventually timed out
I guess).  The getty process (mgetty actually) that came along next,
could not talk to the modem either (all LEDS indicate modem is happy
etc, and cables are not lose etc etc).  Despite kill -9 many times,
mgetty is still stuck waiting on ttyout.  I'll have to re-boot to
allow this pr out...

ps -axl shows:
    0  9966     1   0   4  0   176  176 ttyout IE   ??    0:00.07 /local/bin/mg

so process is trying to exit.  Catting the device, cycling power on
the modem etc all have no effect.  Its jamed tight.

fstat /dev/tty01 shows
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
root     mgetty      9966    0 /          1664 crw-rw----   tty01 rw  /dev/tty01
root     mgetty      9966    1 /          1664 crw-rw----   tty01 rw  /dev/tty01
root     mgetty      9966    2 /          1664 crw-rw----   tty01 rw  /dev/tty01

I could not detect any major differences b/w the 1.0 com.c and the
Dec18 version (in case updating might help).

I've been running 1.0 since its release, and not had any tty related
problems before.  No hardware or system software has been altered
since 1.0 release. UUCP and kermit use tty01 all the time (hours each
day) with no problem.  mgetty has worked flawlessly since installed
more than 6 months ago.

I've got ddb in the kernel, but would need some hits as to what to
look for, before I could chase this down - sorry.

>How-To-Repeat:
	Its pretty random - this is the 1st time this has happened.
>Fix:
	
>Audit-Trail:
>Unformatted: