From nobody@FreeBSD.org  Sun Jan 28 13:12:47 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id ABEF337B402
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Jan 2001 13:12:46 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f0SLCk733189;
	Sun, 28 Jan 2001 13:12:46 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200101282112.f0SLCk733189@freefall.freebsd.org>
Date: Sun, 28 Jan 2001 13:12:46 -0800 (PST)
From: tony@nua.ie
To: freebsd-gnats-submit@FreeBSD.org
Subject: syslog produces repeated corrupt messages to /dev/console under certain circumstances
X-Send-Pr-Version: www-1.0

>Number:         24704
>Category:       bin
>Synopsis:       syslog produces repeated corrupt messages to /dev/console under certain circumstances
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 28 13:20:01 PST 2001
>Closed-Date:    Mon Feb 5 05:36:17 PST 2001
>Last-Modified:  Mon Feb 05 05:36:36 PST 2001
>Originator:     Tony Byrne
>Release:        4.2-STABLE
>Organization:
Nua Ltd.
>Environment:
FreeBSD cerberus.merrion.nua.net 4.2-STABLE FreeBSD 4.2-STABLE #0: Wed Jan 24 15:45:09 GMT 2001     tony@cerberus.merrion.nua.net:/usr/obj/usr/src/sys/CERBERUS  i386
>Description:
Under certain circumstances, syslogd will quickly and repeatedly fill /dev/console with corrupt log output.  Messages are output at a rate of tens per second.  Whenever syslogd exhibits this behaviour, it consumes a large slice of CPU time.  An example of this output is:

4 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus /kernel: Jan 24 23:17:23 cerberus syslogd: restart

These messsages appear on the console without line breaks and without any meaningful log content.

The problem seems to be connected with the newly added LOG_CONSOLE facility (MFC'd recently from CURRENT).  It occurs whenever /etc/syslog.conf contains an entry that causes log messages with the LOG_CONSOLE facility to be directed to /dev/console.  A typical example of a triggering syslog.conf entry would be:

*.*                 /dev/console


>How-To-Repeat:
1) Edit /etc/syslog.conf

2) Insert the line:
   *.*                /dev/console
   near the top of the file.

3) Restart syslogd
>Fix:
Ensure that syslog.conf does not use wildcards in such a way that messages with the LOG_CONSOLE facility are directed to /dev/console.

The syslogd.c source file seems to include code to prevent this particular problem from arising, but it appears to be broken.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Feb 2 02:50:40 PST 2001 
Responsible-Changed-Why:  
phk is the one who added LOG_CONSOLE 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24704 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Mon Feb 5 05:36:17 PST 2001 
State-Changed-Why:  
Should now be fixed in -current and -stable. 

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