SUMMARY: hung tty port

From: Tina J Lorentzen (loren@seth.nadn.navy.mil)
Date: Fri May 07 1993 - 01:49:17 CDT


< I have a user that has "hung" a tty port. There are no processes
< running for ttyp1, but the "w" command shows this user is still
< associated with this port. (current process is "-"). Short of
< rebooting the system, what can I do to free ttyp1?

I have received many replies to my original message (above). Thanks.
A thunderstorm came through town a few hours later and that server lost
power. I was not able to try out the suggestions on this one. Good
news is that ttyp1 was clear when the server rebooted.

Suggestions/information about the problem follow (my comments in parens):

1) The file /etc/utmp, which contains info about logged on users, did
   not properly clear out the entry for the user when user "exited" his
   account. FYI: the commands w, who, and finger read utmp for their
   output.
 
   (I have a feeling this user exited his account ungracefully)

2) Lots of people said to log in a few times for concurrent sessions;
   this should cause one of the sessions to come through ttyp1 and clear
   it up.

   (by the time I saw the problem, this user had been idle on that port
   for 7 days; dozens of other users logged on and off during this time;
   there are 53 tty ports, so perhaps the 54th concurrent session would
   have finally come through ttyp1).

3) Administrators have seen this when users exit Openwindows.

   (user was not using any windowing program)

4) Clean-up the utmp with programs such as "Program to help keep utmp clean",
   located in the Sun-Spots Digest, v6n9 (clean.c ?). Also, a program called
   "utmp" was sent out in '92 in comp.sources.unix, volume25, number 96.
   Write a program to run at logout that checks for psuedo-logins and removes
   them.

   (I have a copy of the first program if anyone wants it; haven't tried it yet).

5) There may be a patch to fix the problem.

6) Check to see if the port is hung using tip.

7) Check permissions/ownership on port; check /var/spool/locks

   (permissions are the same as other ttys; checked the locks dir today but
    it was empty; ownership listed the user's name, which is not unusual).

8) Problem has been seen when using SPC serial cards. Clear out bug by using
   the "sflush" program;see /usr/sys/unbundled/stc/examples.

  (Have not checked on this one yet).

9) Could wipe out entire /etc/utmp file by "echo > /etc/utmp". However, the
   suggester said that anyone logged in already would "disappear". Won't
   hurt the system, may confuse users.

   (This solution crossed my mind but I thought I would try it on myself, first).

Tina J. Lorentzen Internet: loren@seth.nadn.navy.mil
COMPUTER SERVICES
U.S. Naval Academy
Annapolis, MD 21403



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:49 CDT