Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2001 17:09:45 -0400
From:      pkern@utcc.utoronto.ca
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        pkern@utcc.utoronto.ca
Subject:   kern/27361: kernel log messages only appear 3 times per minute.
Message-ID:  <01May15.170953edt.444525@rodent.utcs.utoronto.ca>

next in thread | raw e-mail | index | archive | help

>Number:         27361
>Category:       kern
>Synopsis:       kernel log messages only appear 3 times per minute.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 15 14:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     pkern
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
Computing and Network Services, University of Toronto.
>Environment:
System: FreeBSD knobs.utcs 4.3-RELEASE FreeBSD 4.3-RELEASE #10: Tue May 15 14:55:19 EDT 2001     pkern@knobs.utcs:/usr/src/sys/compile/KWAI  i386


>Description:

	syslogd gets kernel log messages only once every 30 seconds or
	at the top of the minute, whichever comes first.  It seems
	logtimeout() is only called once after the kernel log is opened
	and then never again after that.  So I guess syslogd only gets
	kernel log messages by virtue of syncer(4)'s flushes ...?

>How-To-Repeat:

	any activity which is guaranteed to generate kernel log
	messages more frequently than once every 30 seconds.

	eg.
	on a kernel configured with IPFIREWALL and IPFIREWALL_VERBOSE ...
	  # ipfw add 10 count log logamount 199990 ip from any to any
	  # ping -c 100 127.0.0.1
	... and look in /var/log/security.  the timestamps will tend to
	clump together at regular 30-sec intervals or at :00 seconds.

>Fix:

	--- /sys/kern/subr_log.c	2001/05/15 16:20:19	1.1
	+++ /sys/kern/subr_log.c	2001/05/15 18:55:15
	@@ -116,8 +116,8 @@
	 logclose(dev_t dev, int flag, int mode, struct proc *p)
	 {
	 
	-	callout_stop(&logsoftc.sc_callout);
		log_open = 0;
	+	callout_stop(&logsoftc.sc_callout);
		logsoftc.sc_state = 0;
		funsetown(logsoftc.sc_sigio);
		return (0);
	@@ -189,11 +189,14 @@
	 logtimeout(void *arg)
	 {
	 
	-	if (msgbuftrigger == 0)
	-		return;
	-	msgbuftrigger = 0;
		if (!log_open)
			return;
	+	if (msgbuftrigger == 0) {
	+		callout_reset(&logsoftc.sc_callout,
	+		    hz / log_wakeups_per_second, logtimeout, NULL);
	+		return;
	+	}
	+	msgbuftrigger = 0;
		selwakeup(&logsoftc.sc_selp);
		if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL)
			pgsigio(logsoftc.sc_sigio, SIGIO, 0);
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01May15.170953edt.444525>