ZFS related kernel panic

Jeremy Chadwick freebsd at jdc.parodius.com
Fri Sep 10 15:25:47 UTC 2010


On Fri, Sep 10, 2010 at 03:55:10PM +0100, a.smith at ukgrid.net wrote:
> Quoting Jeremy Chadwick <freebsd at jdc.parodius.com>:
> 
> >What we're looking for is something that resembles what's shown here
> >(using this as an example):
> >
> >http://www.mail-archive.com/freebsd-xen@freebsd.org/msg00413.html
> >
> >The KDB and KDB_TRACE options should result in a backtrace automatically
> >being shown when the system panics.  Are you absolutely certain your
> >kernel config has the options Andriy provided, and you rebuilt +
> >reinstalled the kernel?
> >
> 
> Hi Jeremy,
> 
>   well Ive not had to built a custom kernel before, but Ive done the
> make buildkernel and make installkernel and all seems to have gone
> thro as expected. Here is the evidence from after a reboot:
> 
> 
> # pwd
> /usr/src/sys/amd64/conf
> # grep KDB ZFSDEBUG
> options         KDB
> options         KDB_TRACE
> [root at kappa /usr/src/sys/amd64/conf]# uname -a
> FreeBSD kappa.ukgrid.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Fri Sep
> 10 12:30:24 BST 2010
> root at kappa.ukgrid.net:/usr/obj/usr/src/sys/ZFSDEBUG  amd64
> 
> Any ideas?

Not particularly.  Sure looks like you should be seeing a backtrace to
me.  I'd recommend following Andriy's advice of adding "options DDB"
to your kernel configuration, rebuild + install kernel + reboot.

When the panic happens, you will be dropped to a db> prompt at the
console.  You should type "trace" to get a backtrace at that point.

Something you might also try/do before the kernel rebuild/reboot:

If you have a swap slice defined (not on ZFS!), I would would advocate
setting dumpdev="auto" in your /etc/rc.conf prior to the reboot.  This
will allow you to do a post-crash analysis.  You'll need to make sure
that your /var filesystem has enough space to hold an entire memory dump
(e.g. if your system RAM is 8GB, ensure you have at least 8GB free on
/var).

Next, depending on the state of the system (particularly the controller
driver and ATA subsystem), the following may or may not work for you.
After the above db> commands, type "call doadump", which should dump all
the contents of kernel memory to swap.  The next time the system starts
up, savecore(8) should automatically extract the crash contents from
swap and save them in /var/crash -- hopefully without the system
crashing in the middle of writing the contents.  :-)

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-fs mailing list