swapon running before savecore (was Re: RELENG_6 kernel panic +
savecore(8) problem)
Antony Mawer
fbsd-stable at mawer.org
Thu Nov 29 17:42:06 PST 2007
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
More information about the freebsd-stable
mailing list