Re: Odd root (and suid root) behavior

Steven N. Hirsch (hirsch@uvm-gen.emba.uvm.edu)
Tue, 14 May 1996 23:14:52 -0400


Marek Michalkiewicz wrote:
>
> Steven N. Hirsch:
> > As of (at least) 1.99.2, an initial root login (or su root) after
> > system startup hangs for almost a minute on a 486DX4-100 machine. Once
> > logged in, though, everything procedes normally!
>
> Hi,
>
> I noticed this too, and I think I tracked it down - it seems to hang
> in syslog() (root logins are logged). Perhaps the large number of
> boot up messages confuses syslogd somehow (and /dev/log is a stream
> socket, so I guess writes block if data is not read quickly enough).
> It doesnt't seem to depend on verions of kernel/libc/syslogd (happens
> on 1.2.13/4.6.27/1.2 as well as 1.3.100/5.2.18/1.3) except that
> I think it didn't happen on one very old machine (syslogd <1.2?).
>
> > This (mis)behavior also applies to the first suid root program run as a
> > conventional user after login, if this helps.
>
> Perhaps that program happens to use syslog() too, like su?
>

Aha. I drew the wrong conclusion. Yes, the program was a little script that
starts diald (which is suid root). As I recall, something makes an entry into
the syslog when it first comes up. This is all consistant with a problem
writing to the log file. Must be some bizarre race condition, as it won't
occur on my second box using the exact same kernel.

> Any ideas how to fix it?

I'll second that one :-)).

- Steve

-- 
___________________________________________________________
|Steven N. Hirsch	"Anything worth doing is worth     |
|University of Vermont	 overdoing.." - Hunter S. Thompson |
|Computer Science / EE                                     |
------------------------------------------------------------