Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 1998 12:19:28 -0400 (EDT)
From:      Brian Tao <taob@risc.org>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        FREEBSD-CURRENT <freebsd-current@FreeBSD.ORG>
Subject:   Re: Processes stuck waiting for tty drain?
Message-ID:  <Pine.GSO.3.96.981003121349.23916I-100000@tor-dev1.nbc.netcom.ca>
In-Reply-To: <199810021456.KAA24945@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 Oct 1998, Garrett Wollman wrote:
> 
> Since it was running on a pty, probably something had gone wrong
> with the process on the master side, and so the buffer wasn't
> getting drained.

    Hrm, so this is a telnetd-related problem then?  It happened again
during a cvsup -L 2 of the ports collection (again, lots of output to
the tty).  An echo or cat to the device would block, although the
output queue would not rise above 1301 bytes for that tty:

# pstat -t | fgrep -C ttyp | head
64 pty lines
  LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC
  ttyp0  0   0   0   512   448 1296 256       0 OCc           0     0 term
  ttyp1  0   2 1301   512   448 1296 256       0 OCcA   f1885a00 12689 term
  ttyp2  0   0   0   512   448 1296 256       0 OCc    f12588c0 12715 term
      3  0   0   0     0     0    0   0       0 -             0     0 term
      4  0   0   0     0     0    0   0       0 -             0     0 term

# ps -laxt p1
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
 1000  5008  5007   0  18  0   452  324 pause  Is    p1    0:00.03 -csh (csh)
    0  5010  5008   0  18  0  1396 1112 pause  I     p1    0:01.29 -usr/local/bin/tcsh
    0 12689  5010   0   2  0  5264 4828 select S+    p1    0:31.41 cvsup -g -L2 -Pm /usr/local/etc/cvsupfile

# kill 12689
# ps -laxt p1
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
 1000  5008  5007   0  18  0   452  324 pause  Is    p1    0:00.03 -csh (csh)
    0  5010  5008   0  18  0  1396 1112 pause  I     p1    0:01.29 -usr/local/bin/tcsh
    0 12689  5010   0   4  0  5264 4828 ttywri S+    p1    0:31.41 cvsup -g -L2 -Pm /usr/local/etc/cvsupfile

# kill -1 12689
# ps -laxt p1
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
 1000  5008  5007   0  18  0   452  324 pause  Is    p1    0:00.03 -csh (csh)
    0  5010  5008   0   4  0  1396 1112 ttywri S+    p1    0:01.29 -usr/local/bin/tcsh

# ps -lfp 5007
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
    0  5007   148   0   2  0   880  548 select Is    ??    0:06.62 telnetd

# kill 5007
# ps -laxt p1
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND


    So far, the problem has not reappeared if I ssh in instead of
telnetting in.
-- 
Brian Tao (BT300, taob@risc.org)
"Though this be madness, yet there is method in't"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.981003121349.23916I-100000>