From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 1 11:00:58 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44E8116A405 for ; Thu, 1 Feb 2007 11:00:58 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 0B32313C4A6 for ; Thu, 1 Feb 2007 11:00:58 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l11B0oJR083069 for ; Thu, 1 Feb 2007 11:00:50 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l11B0own083068; Thu, 1 Feb 2007 11:00:50 GMT (envelope-from gnats) Resent-Date: Thu, 1 Feb 2007 11:00:50 GMT Resent-Message-Id: <200702011100.l11B0own083068@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Arne Woerner Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB81316A401 for ; Thu, 1 Feb 2007 10:58:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id A9DEE13C491 for ; Thu, 1 Feb 2007 10:58:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l11AwHGc022109 for ; Thu, 1 Feb 2007 10:58:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l11AwH5G022108; Thu, 1 Feb 2007 10:58:17 GMT (envelope-from nobody) Message-Id: <200702011058.l11AwH5G022108@www.freebsd.org> Date: Thu, 1 Feb 2007 10:58:17 GMT From: Arne Woerner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/108655: messages from kernel are mixed (/dev/klog? syslog?) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 11:00:58 -0000 >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 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 () 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: