Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2015 13:25:04 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Michael Jung <mikej@mikej.com>
Cc:        freebsd-stable@freebsd.org, Brandon Allbery <allbery.b@gmail.com>, Michael BlackHeart <amdmiek@gmail.com>
Subject:   Re: savecore problem
Message-ID:  <7133006.rnVJT8O1gz@ralph.baldwin.cx>
In-Reply-To: <2142548d6fac1894597a45a042966c7a@mail.mikej.com>
References:  <CA%2BAz77No%2B0k=S4xq5MPK-YEgm7HGh%2B%2BSBNRHeV0hHq7AqOc0Tw@mail.gmail.com> <2959054.c91S7azMUP@ralph.baldwin.cx> <2142548d6fac1894597a45a042966c7a@mail.mikej.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, March 16, 2015 11:54:52 AM Michael Jung wrote:
> On 2015-03-16 11:23, John Baldwin wrote:
> > On Monday, March 16, 2015 10:17:54 AM Brandon Allbery wrote:
> >> On Mon, Mar 16, 2015 at 9:40 AM, Michael BlackHeart 
> >> <amdmiek@gmail.com>
> >> wrote:
> >> 
> >> > Hello there. I've got a problem. Recently my personal server issued a
> >> > kernel panic. Then there's a dump and so on. But there's no dump
> >> > information after reboot. I do not know what was really the panic cause but
> >> > assume that savecore failed because of RAID.
> >> >
> >> > Problem - minidump was done (I saw it was) but was not recovered by
> >> > savecore after reboot into /var/vrash
> >> >
> >> (...)
> >> 
> >> > /dev/ufs/varfs          /var            ufs     rw,noatime
> >> >      2       2
> >> >
> >> 
> >> Last I checked, savecore had to happen very early --- before 
> >> filesystems
> >> other than / are mounted.
> > 
> > No, it can happen after that.  What really has to happen is that you 
> > don't
> > use swap (if you are dumping to your swap partition) before savecore 
> > runs.
> 
> Can someone elaborate on not using swap as a dump device a little more? 
> I have
> had instances in the past were I had issues with getting a core dump
> and resorted to a dedicated dump device but didn't investigate further 
> nor have
> I read this as a requirement.

Typically the first swap partition is used as the dump partition.  If the
system writes anything out to swap before savecore runs, then it can
potentially overwrite part of the core.  (Note that the running kernel doesn't
"know" that there is a core on the swap partition to try to preserve, it just
sees that there is an available swap partition.)  To try to minimize the chances of
this happening, the dump is written at the end of the swap partition instead
of the start, but that is not foolproof.  Usually you don't run too many things
during early boot before savecore that would cause swapping, though a fsck
of a large filesystem might use quite a bit of RAM which could result in swapping.

> A second question - Can a USB devices be used reliably for a dump device 
> for
> ZFS on boot systems?

I'm not sure if USB devices will work as a dump device or not.

-- 
John Baldwin



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