Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 20:06:36 +0100
From:      Dominic Fandrey <kamikaze@bsdforen.de>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        questions@freebsd.org, Steven Friedrich <FreeBSD@insightbb.com>, Jonathan Chen <jonc@chen.org.nz>
Subject:   Re: Shutdown anomaly
Message-ID:  <47BC7A3C.9070002@bsdforen.de>
In-Reply-To: <18359.26373.750798.755610@jerusalem.litteratus.org>
References:  <200802161142.53044.FreeBSD@insightbb.com>	<20080216215521.GB12555@osiris.chen.org.nz> <18359.26373.750798.755610@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Huff wrote:
> Jonathan Chen writes:
> 
>>  > I am seeing the following messages, which appear to indicate a memory 
>>  > overwrite:
>>  > Waiting (max 60 seconds) for system processs 'vnlru' to stop...done
>>  > Waiting (max 60 seconds) for system processs 'bufdaemon' to stop...done
>>  > a
>>  >  iStyinncgi n(gm adxi s6k0s ,s evcnoonddess)  rfeomra isnyisntge.m. .pr0o 
>>  > cess 'syncer' to stop...0 0 done
>>  > All buffers synced.
>>  > Uptime: 8m9s
>>  
>>  It's an interleaved buffer messages on SMP systems. The problem is
>>  known, but I haven't heard of a proposed solution yet.
> 
> 	There is no fix.
> 	The workaround is to increase the size of the kernel printf()
> buffer.  I don't remember how you do that ... but this is not a new
> issue - chech the archives for details.

I would like to propose a fix. Care to test it?

Just apply this patch and add the following line to your /etc/rc.conf file.
shutdown_clean_enable="YES"



--- 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
  #




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