kern/108655: messages from kernel are mixed (/dev/klog? syslog?)

Arne Woerner arne_woerner at yahoo.com
Thu Feb 1 11:00:58 UTC 2007


>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 at 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:


More information about the freebsd-bugs mailing list