Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: kcwellsc@watdragon.uwaterloo.ca (Ken Wellsch)
Subject: running out of pty's?
Date: Thu, 22 Oct 1992 23:11:06 GMT	[thread overview]
Message-ID: <92Oct22.191107edt.168257-3@watdragon.uwaterloo.ca> (raw)

We have a DECsystem 5500 running Ultrix 4.2A that normally has around
30 or 40 simultaneous users peek a day.  Several days ago, we ran out
of pty's. I checked and there were not 176 pty's in service (as gen'ed). 
Oddly enough, using "pstat -t", I found that around 140 or 150 pty's were
in "W" state (waiting for pending open to complete).

It took a day or so but I tracked it down to a few users that used
"sysline".  I was able to solve the problem via a "fix" to sysline.

When sysline notices a user has logged out (the invoking user no
longer owns the tty) it attempts to clear the status line before
exiting.  It does that approximately like this:

	signal(SIGALRM,exit);
	alarm(30);
	if ( ( fd = open(tty,1) ) >= 0 )
		clear status line
		close(fd);
	exit(0);

I discontinued this (I consider) odd behaviour.  If the user doesn't
own the tty I'd think it likely the open will fail anyway (at least
on non-real tty ports).

Apparently Ultrix hangs the above open and does not clean the pending
open status up when the alarm hits and the process exits.  There never
were any processes left around on the pty's.  I traced it via "lastcomm"
on userid's that last logged in - the offending sysline's were the
last command on the pty login trace and had no controlling tty listed.


                 reply	other threads:[~1992-10-22 23:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox