From owner-freebsd-stable Sun Dec 30 13:50:32 2001 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 9471237B405 for ; Sun, 30 Dec 2001 13:50:28 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 30 Dec 2001 21:50:27 +0000 (GMT) Date: Sun, 30 Dec 2001 21:50:27 +0000 From: David Malone To: Brian McDonald Cc: Chris Johnson , stable@FreeBSD.ORG Subject: Re: syslogd blocking => can't su to root Message-ID: <20011230215027.A62327@walton.maths.tcd.ie> References: <20011230081106.A98698@palomine.net> <20011230111949.G2732-100000@nivomede.internal.lustygrapes.net> <20011230173548.A58662@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011230173548.A58662@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Sun, Dec 30, 2001 at 05:35:48PM +0000 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Dec 30, 2001 at 05:35:48PM +0000, David Malone wrote: > On Sun, Dec 30, 2001 at 11:30:54AM -0500, Brian McDonald wrote: > > I've seen this on 4.1-RELEASE boxes as well. Was hoping it would just go > > away when I upgrade them to 4.5. I noticed it when it blocked other > > processes waiting for syslog, such as named. > > To fix this there we'd have to decide what should happen when syslogd > finds that some destination for messages becomes blocking. Syslogd > could just drop messages which would cause blocking. Alternatively, > syslogd could allow a certain amount of backup for which it would > buffer. > > Also, it is bad that syslogd can stop other processes by not reading > from its socket - it's possible we should change syslog(3) to timeout > or not to block. Actually, I've looked at the syslog(3) code and I think I understand what is going on. Syslog(3) won't block while sending a message to syslogd, but if it fails to do this then it tries to write the message to /dev/console. I guess it is getting stuck here, in the same way as syslogd is stuck. If someone has a machine in this state then if they hit control-t when su is stuck, then it should show up as stuck in state ttywai. I guess a fix for this would be to make syslog(3) write to /dev/console in a non-blocking way. There is actually a comment saying "don't worry about blocking; if the console blocks everything will". This doesn't seem to be true if network services could keep running. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message