From reichert@numachi.com  Wed Nov 25 14:44:23 1998
Received: from mail.numachi.com (numachi.numachi.com [198.175.254.2])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA21355
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Nov 1998 14:44:02 -0800 (PST)
          (envelope-from reichert@numachi.com)
Received: (qmail 762 invoked by uid 1001); 25 Nov 1998 22:44:29 -0000
Message-Id: <19981125224429.761.qmail@mail.numachi.com>
Date: 25 Nov 1998 22:44:29 -0000
From: reichert@numachi.com
Reply-To: reichert@numachi.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: syslogd hangs with serial console
X-Send-Pr-Version: 3.2

>Number:         8865
>Category:       bin
>Synopsis:       syslogd hangs with serial console
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 25 14:50:00 PST 1998
>Closed-Date:    Sat Mar 01 19:38:01 UTC 2008
>Last-Modified:  Sat Mar 01 19:38:01 UTC 2008
>Originator:     Brian Reichert
>Release:        FreeBSD 2.2.7-RELEASE i386
>Organization:
Numachi
>Environment:

	

FreeBSD torii.numachi.com 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0: Mon Nov 23
16:26:21 GMT 1998     reichert@torii.numachi.com:/usr/src/sys/compile/TORII
i386

>Description:

	

Related to i386/8847 ?

(I hope these details are meaningful.)

On my firewall (a 486 with a serial console), after a large log
has been created, after newsyslog runs, the syslogd process hangs,
blocking any process trying to log via syslog.  This is with default
syslog.conf and newsyslog.conf files.  (I'm booting it '-P' in
boot.config.)

Experimentation reveals that syslogd does not like to be stopped.

On other boxes (2.2.2-R and 2.2.5-R), I can perform the following
after a fresh boot:

  # killall -TERM syslogd;	# syslogd goes away
  # syslogd -d;			# expected output
  # syslogd; 			# back running just fine

On this box, however, syslogd -d shows:

  torii# syslogd -d
  off & running....
  init
  cfline("*.err;kern.debug;auth.notice;mail.crit          /dev/console", f, "*")

but hangs here, rather than listing the rest of the files.  If I
then log in on the serial console, the 'syslog -d' process shows:

  syslogd: /dev/console: Interrupted system call
  logmsg: pri 53, flags 4, from torii, msg syslogd: /dev/console:
  Interrupted system call

At this point, the syslogd process is hung, and nothing short of a sigKILL
will stop it.  (Oddly, it will report 'exiting on signal N' when issued a
signal, but won't acually exit.

After manually killing it, starting it in debug mode ('-d') again
reveals the messages:

  syslogd: cannot create /var/run/log: Address already in use
  logmsg: pri 53, flags 4, from torii, msg syslogd: cannot create
  /var/run/log: Address already in use

Again, it must be KILLed.  At this point, simply starting syslogd
fails, as it dies with the message:

  syslogd: timed out waiting for child

>How-To-Repeat:

	

On a 2.2.7-R 486 with a serial console, on any terminal:

	# killall -TERM syslogd;	# syslogd goes away
	# syslogd -d;			# end of the world

>Fix:

Rebooting saves it.  :)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Fri Nov 27 14:17:42 PST 1998 
Responsible-Changed-Why:  
Misfiled PR. 

From: igor sviridov <sia@nest.org>
To: freebsd-gnats-submit@freebsd.org, reichert@numachi.com
Cc: sia@nest.org
Subject: Re: bin/8865: syslogd hangs with serial console
Date: Mon, 26 Apr 1999 06:05:12 -0700

 Hi.
 
 > Problem Report bin/8865
 > 
 > syslogd hangs with serial console
  
 > Originator
 >      Brian Reichert reichert@numachi.com
 > Release
 >      FreeBSD 2.2.7-RELEASE i386
 
 I've experienced exactly same problem on 2.2.8-RELEASE system - all
 symptoms
 same as described in this PR. In addition after a while other network
 daemons
 (named, gated) started to hang as well (syslog() call tries to log on
 /dev/console
 when syslogd is not running - it should NOT block there).
 
 Apparently syslogd is not able to open /dev/console -- when i've
 commented /dev/console
 entry out of /etc/syslog.conf syslogd started ok.
 
 In my case the source of the problem was getty, which was configured to
 run
 on port cuaa0 instead of ttyd0; after it was reconfigured to run on
 "ttyd0"
 all problems disappeared.
 
 --igor
 

From: Nick Hibma <nick.hibma@jrc.it>
To: freebsd-gnats-submit@freebsd.org, reichert@numachi.com
Cc:  
Subject: Re: bin/8865: syslogd hangs with serial console
Date: Sat, 24 Jul 1999 13:29:30 +0200

 http://www.freebsd.org/cgi/query-pr.cgi?pr=8865
 
 Did you check out the possible solution that was provided by Igor?
 
 Cheers,
 
 Nick
 -- 
 ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy
 
State-Changed-From-To: open->feedback 
State-Changed-By: johan 
State-Changed-When: Sun Sep 17 07:42:09 PDT 2000 
State-Changed-Why:  
Did the solution by Igor solve your problem? 




Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Sep 17 07:42:09 PDT 2000 
Responsible-Changed-Why:  
I belive David asked for syslogd related PR a while back. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8865 

From: Borja Marcos <borjamar@sarenet.es>
To: freebsd-gnats-submit@FreeBSD.org, reichert@numachi.com
Cc:  
Subject: Re: bin/8865: syslogd hangs with serial console
Date: Fri, 10 Nov 2000 21:52:42 +0100

 Same behavior with 4.2-BETA. I am using a serial console 
 booting with "-P".
 
 I first noticed I was unable to do a "su" after some uptime.
 Further investigation showed that whenever there was no user
 logged in the console *or* the user had "mesg n", the syslog
 messages didn't get to the console and it ended hanging.
 
 I tried some tweaks, like using /dev/cuaa0, /dev/ttyd0 and
 even /dev/console for the getty (changing /etc/ttys) without
 success. I had to remove the /dev/console line from
 /etc/syslog.conf
 
 
 Borja.
 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Nov 13 07:30:20 GMT 2005 
State-Changed-Why:  
Chase feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8865 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Nov 13 07:31:44 GMT 2005 
State-Changed-Why:  
Is this still a problem with modern versions of FreeBSD? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8865 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 19:37:08 UTC 2008 
State-Changed-Why:  
Feedback timeout (> 1 year). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8865 
>Unformatted:
