From: Claude Morin (klode@syslab.csd.uwo.ca)
Date: 08/25/92


From: klode@syslab.csd.uwo.ca (Claude Morin)
Subject: Re: Two problems. (Elm/Smail/lib/libc.2.2.2, shutdown)
Date: Tue, 25 Aug 1992 16:16:32 GMT


To:
Subject: Re: Two problems. (Elm/Smail/lib/libc.2.2.2, shutdown)
Newsgroups: comp.os.linux
In-Reply-To: <1992Aug20.040341.27796@constellation.ecn.uoknor.edu>
Organization: Department of Computer Science, University of Western Ontario, London
Cc:
Bcc:

In article <1992Aug20.040341.27796@constellation.ecn.uoknor.edu> callison@uokmax.ecn.uoknor.edu writes:
>I'm having two problems. The first is a problem with Elm ans Smail3 from
[first problem deleted; I dunno]

>Also, shutdown won't work for me anymore. It gives the warning, and just
>sits there forever. (It also happens with reboot and halt, on my HD, and when
>I boot with the .96 root disk...) I tried doing an fsck -a on my Linux
>partitions and rebooting, but that didn't help. This just started after
>I installed X (1.1 from banjo, circa 17 July). X froze my system once
>to the point that I had to a hard reset, so I did the fsck -a, and everything
>seemed OK (everything else worked fine, and I got X working--ah, the

    Sounds like the same problem I heard about a few days ago:

    When shutdown runs, it sends a message to everyone logged into the system.
I believe it figures out who's logged in by examining the file /etc/utmp.
When shutdown tries to send someone a message, it *really* tries. In fact,
it will block until the message is printed.

    The problem occurs when /etc/utmp has a record for someone who is no longer
logged in. When that happens, shutdown will attempt to send a message, will
block, and your system will 'hang'. Note that /etc/utmp corruption is quite
common, and can be caused (as in your case), by rebooting while in X11. Your
/etc/utmp file probably has an entry for user 'smith' on 'ttyp6' or something
like that. You can check with 'who' or 'w'.

    The fix? Log out of all but one console and do:
        cat < /dev/null > /etc/utmp

    This will clobber /etc/utmp. Now log out and back in and check -- there
should be only one entry. Now try 'shutdown'.

    Let me know if this works.