From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 20 19:30:03 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C02F16A406 for ; Wed, 20 Feb 2008 19:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 446C713C458 for ; Wed, 20 Feb 2008 19:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1KJU3qn053850 for ; Wed, 20 Feb 2008 19:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1KJU3bw053847; Wed, 20 Feb 2008 19:30:03 GMT (envelope-from gnats) Resent-Date: Wed, 20 Feb 2008 19:30:03 GMT Resent-Message-Id: <200802201930.m1KJU3bw053847@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, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307AD16A402 for ; Wed, 20 Feb 2008 19:27:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 17C5B13C442 for ; Wed, 20 Feb 2008 19:27:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1KJP5cx055152 for ; Wed, 20 Feb 2008 19:25:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m1KJP5DL055151; Wed, 20 Feb 2008 19:25:05 GMT (envelope-from nobody) Message-Id: <200802201925.m1KJP5DL055151@www.freebsd.org> Date: Wed, 20 Feb 2008 19:25:05 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/120914: [patch] proposed fix to rc.shutdown to turn off the mixed buffer messages with an rc.conf tuneable 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: Wed, 20 Feb 2008 19:30:03 -0000 >Number: 120914 >Category: misc >Synopsis: [patch] proposed fix to rc.shutdown to turn off the mixed buffer messages with an rc.conf tuneable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 20 19:30:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_7 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #3: Wed Feb 13 17:52:28 CET 2008 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 >Description: On multicore machines several buffers simultaneously write to the screen and produce unreadable output. >How-To-Repeat: Apply the patch and add shutdown_clean_enable="YES" to your /etc/rc.conf. >Fix: --- rc.shutdown 2008-02-20 19:28:45.000000000 +0100 +++ /etc/rc.shutdown 2008-02-20 19:59:03.000000000 +0100 @@ -43,10 +43,21 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin export HOME PATH +# The next three lines belong into /etc/defaults/rc.conf. +shutdown_clean_enable="NO" # Set to YES to stop all but the first CPU + # core to prevent mixed buffer output + # upon shutdown. + . /etc/rc.subr load_rc_config 'XXX' +# Fall back to single core mode to guarantee clean output. +if checkyesno shutdown_clean_enable; then + bitmask="$(jot -s '' -b1 $(expr $(sysctl -n hw.ncpu) - 1))0" + sysctl machdep.hlt_cpus=$bitmask +fi + # reverse_list list # print the list in reverse order # >Release-Note: >Audit-Trail: >Unformatted: