Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2007 10:58:17 GMT
From:      Arne Woerner<arne_woerner@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/108655: messages from kernel are mixed (/dev/klog? syslog?)
Message-ID:  <200702011058.l11AwH5G022108@www.freebsd.org>
Resent-Message-ID: <200702011100.l11B0own083068@freefall.freebsd.org>

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


>Number:         108655
>Category:       kern
>Synopsis:       messages from kernel are mixed (/dev/klog? syslog?)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 01 11:00:49 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Arne Woerner
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD neo.riddick.homeunix.org 6.2-RELEASE FreeBSD 6.2-RELEASE #2: Wed Jan 17 16:56:44 UTC 2007     aw@neo.riddick.homeunix.org:/usr/src/sys/i386/compile/NEO  i386
>Description:
When my box (UP) comes up, many kernel messages are generated.
I would guess, that they are sent to /dev/klog or so.

When I look at those messages I can see, that messages, that are
generated almost at the same time but by different kernel threads
are mixed. I would guess, that this problem becomes worse in case
of a SMP box...

It looks like this:
Feb  1 07:00:54 neo ad3: 238475MB <Seagate ST3250824ACE 3.ACH> at ata1-slave UDMA100GEOM_RAID5: Device sys created (id=4051465007, stripesize=131072).
Feb  1 07:00:54 neo GEOM_RAID5: Disk ad0s1a attached to sys.

I think, that this problem should be fixed.

-Arne
>How-To-Repeat:
Just generate many kernel messages by different threads quickly...
>Fix:
Ideas:

1.
by one buffer per "klog-ing thread" (organized as a hash map
possibly), that is flushed in case of a newline (<LF>) or so

or

2.
by preparing a kernel message in a piece of memory local to
the thread and then writing that message somehow atomically
to klog)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702011058.l11AwH5G022108>