Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2007 12:30:14 +1100
From:      Antony Mawer <fbsd-stable@mawer.org>
To:        Jeremy Chadwick <koitsu@FreeBSD.org>
Cc:        freebsd-stable@freebsd.org
Subject:   swapon running before savecore (was Re: RELENG_6 kernel panic + savecore(8) problem)
Message-ID:  <474F67A6.6070306@mawer.org>
In-Reply-To: <20071126023313.GA2376@eos.sc1.parodius.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?474F67A6.6070306>