[comp.unix.ultrix] su hanging

ricks@shambhala.Berkeley.EDU (Rick L Spickelmier) (09/26/89)

Occasionally on my DECstation 3100 (actually far too frequently),
running UWS 2.1, 'su' will hang in 'D' after taking the password.
It will eventually come back (after many minutes) or as soon as I
do another 'su'.  I also find that when I have 'su's behaving like
this, certain other commands behave this way: xterm, mail, ...

Has anybody else since this problem?  Why does a second 'su' cause
the first to get unstuck?  Should I just trash the / and /usr file
systems, reformat and reload?  This is really bugging me.

			
				Rick Spickelmier
				UC Berkeley

grr@cbmvax.UUCP (George Robbins) (09/27/89)

In article <17684@pasteur.Berkeley.EDU> ricks@berkeley.edu writes:
> 
> Occasionally on my DECstation 3100 (actually far too frequently),
> running UWS 2.1, 'su' will hang in 'D' after taking the password.
> It will eventually come back (after many minutes) or as soon as I
> do another 'su'.  I also find that when I have 'su's behaving like
> this, certain other commands behave this way: xterm, mail, ...

Could it be a problem with NFS mounts in root directory or search
path that have to time out, or other NFS related diseases?



-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)

avolio@decuac.dec.com (Frederick M. Avolio) (09/27/89)

Submit an SPR (I did).  I have seen this for 3 versions of UWS now on
VAX and RISC.

Fred

bin@primate.wisc.edu (Brain in Neutral) (09/28/89)

From article <2749@decuac.DEC.COM>, by avolio@decuac.dec.com (Frederick M. Avolio):
> 
> Submit an SPR (I did).  I have seen this for 3 versions of UWS now on
> VAX and RISC.

So how many versions will it go through before DEC *fixes* it? :-)

Paul DuBois
dubois@primate.wisc.edu

woods@ncar.ucar.edu (Greg Woods) (09/28/89)

I don't know if this is the problem in any of the cases under discussion,
but I've seen "su" hang when someone types ^S on the console. If this
happens, the symptoms will be that you can su to any ordinary user,
but if you try to su to root it will hang trying to write to the console. 
The fix is obvious.

--Greg

avolio@decuac.dec.com (Frederick M. Avolio) (09/28/89)

Actually -- and I did note the ':-)', Paul -- I suspect it is a problem
that is terribly hard to track down.  I would -- out of curiousity and
I guess masocism (sp? )-- be interested in knowing how many have seen this
problem (with su hanging).  Send me (gosh, I'm going to regret this)
your cpu type, ultrix version, symptom in as few lines as possible.

Fred

jonathan@cs.keele.ac.uk (Jonathan Knight) (09/29/89)

Su can hang if someone hits ^S on the console.  When su tries to log the
message 'SU: .....' it hangs waiting for a ^Q on the console.  Very
irritating, especially if the operators have gone home for the night
and the machine room is locked up tight....
-- 
  ______    JANET :jonathan@uk.ac.keele.cs     Jonathan Knight,
    /       BITNET:jonathan%cs.kl.ac.uk@ukacrl Department of Computer Science
   / _   __ other :jonathan@cs.keele.ac.uk     University of Keele, Keele,
(_/ (_) / / UUCP  :...!ukc!kl-cs!jonathan      Staffordshire.  ST5 5BG.  U.K.

cmf@obie.cis.pitt.edu (Carl M. Fongheiser) (10/02/89)

In article <772@kl-cs.UUCP> jonathan@cs.keele.ac.uk (Jonathan Knight) writes:
>Su can hang if someone hits ^S on the console.  When su tries to log the
>message 'SU: .....' it hangs waiting for a ^Q on the console.  Very
>irritating, especially if the operators have gone home for the night
>and the machine room is locked up tight....


Well, you could try something like this (WARNING: I haven't tested
this!) :

#include <sys/ioctl.h>

main()
{
    int fd;
    char c;

    fd = open("/dev/console", 1);	/* Open the console */
    if (fd < 0) {
	perror("open");
	exit(1);
    }
    c = 'Q' ^ 0100;			/* A ^Q */
    if (ioctl(fd, TIOCSTI, &c) < 0) {
	perror("ioctl");
	exit(1);
    }
}


Note that you'll need to make this setuid root, otherwise the ioctl
will fail.  In fact, if you set up your system correctly, the open
should fail as well!

				Carl Fongheiser
				cmf@unix.cis.pitt.edu