From owner-freebsd-stable@FreeBSD.ORG Fri Nov 30 01:42:06 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00F0D16A420; Fri, 30 Nov 2007 01:42:06 +0000 (UTC) (envelope-from fbsd-stable@mawer.org) Received: from outbound.icp-qv1-irony-out3.iinet.net.au (outbound.icp-qv1-irony-out3.iinet.net.au [203.59.1.148]) by mx1.freebsd.org (Postfix) with ESMTP id 31A0E13C45B; Fri, 30 Nov 2007 01:42:04 +0000 (UTC) (envelope-from fbsd-stable@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKL2TkfLzq3r/2dsb2JhbAAI X-IronPort-AV: E=Sophos;i="4.23,231,1194188400"; d="scan'208";a="188834689" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out3.iinet.net.au with ESMTP; 30 Nov 2007 10:31:58 +0900 Message-ID: <474F67A6.6070306@mawer.org> Date: Fri, 30 Nov 2007 12:30:14 +1100 From: Antony Mawer User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Jeremy Chadwick References: <20071107191611.GA1400@eos.sc1.parodius.com> <20071107232328.GA1678@eos.sc1.parodius.com> <20071126022136.GA1564@eos.sc1.parodius.com> <20071126023313.GA2376@eos.sc1.parodius.com> In-Reply-To: <20071126023313.GA2376@eos.sc1.parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: swapon running before savecore (was Re: RELENG_6 kernel panic + savecore(8) problem) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 01:42:06 -0000 On 26/11/2007 1:33 PM, Jeremy Chadwick wrote: > On Sun, Nov 25, 2007 at 06:21:36PM -0800, Jeremy Chadwick wrote: >> I believe the problem is that /etc/rc.d/swap1 is being run before >> savecore. I'm guessing that swapon(8) actually destroys/clobbers the >> existing saved kernel panic/core data, thus one will never get a >> coredump in /var/crash. I believe some re-organisation of rcorder(8) >> arguments in the files is in order, but I don't know what should >> be changed to what. >> >> I'll submit a PR for the above, because IMHO that's a serious one. > > PR 118255 has been opened for this matter. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=118255 There seems to be conflicting information about what constitutes the correct behaviour here. The original 4.4BSD "Unix System Manager's Manual (SMM)", found here: http://docs.freebsd.org/44doc/smm/02.config/paper-6.html Indicates the following (found under the "System dumps" heading): - Kernel dumps write from the end of swap and work backwards - The kernel uses swap from the front and works forward - This way it reduces the chance of swapping overwriting the dump during the boot process until savecore is run This somewhat more modern posting suggests that is still the case: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2005-11/0703.html However the FreeBSD Developers' Handbook suggests a behaviour that does not match the current reality: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html#EXTRACT-DUMP Can anyone speak with more authority on this...? --Antony