Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2012 15:21:15 -0500
From:      Chris Ross <cross+freebsd@distal.com>
To:        Chris Ross <cross+freebsd@distal.com>
Cc:        freebsd-sparc64@freebsd.org, Marius Strobl <marius@alchemy.franken.de>
Subject:   Re: Changes to kern.geom.debugflags?
Message-ID:  <49AEC210-6BB6-4778-B71C-2E3B86E0902C@distal.com>
In-Reply-To: <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com>
References:  <7AA0B5D0-D49C-4D5A-8FA0-AA57C091C040@distal.com> <6A0C1005-F328-4C4C-BB83-CA463BD85127@distal.com> <20121225232507.GA47735@alchemy.franken.de> <8D01A854-97D9-4F1F-906A-7AB59BF8850B@distal.com> <A947C892-5379-4F70-BFA0-0A7AB94DF0C6@distal.com> <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Dec 29, 2012, at 3:01 PM, Chris Ross <cross+freebsd@distal.com> =
wrote:
> On Dec 27, 2012, at 1:15 PM, Chris Ross <cross+freebsd@distal.com> =
wrote:
>> So, I've started with the tiring process of "printf debugging".  I =
have gotten out of
>> the loader code, and can show that it's inside of the call to the zfs =
devsw dv_init()
>> call where it's failing.
>=20
>  Okay.  Many many iterations, and I found out where it's crashing.  In
> sys/boot/zfs/zfsimpl.c, in dnode_read(), the first line of the while =
loop
> is:
>=20
>                uint64_t bn =3D offset / bsize;
>=20
> And, bsize is calculated from:
>=20
>        int bsize =3D dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT;
>=20
>  When running the code, though, I can confirm that bsize is 0 before =
the divide
> is hit, thus causing the divide by zero trap.
>=20
>  I'm going to guess this is a problem with dnode->dn_datablkszsec.  =
Has anything
> changed recently in zfs_fmtdev, or more likely zfs_get_root() or =
objset_get_dnode(),
> which is the callchain right before dnode_read() ?

  So, the dnode in question is the MOS os_meta_dnode, for the MOS that's =
in the
SPA for the root.  (Mind you, the internals of ZFS are all a black box =
to me, so I don't
understand what I just said).

  Anyone have any idea why the dn_datablkszsec would be unset or wrote =
for
said meta dnode?  That seems to be the crux of the problem.  Where does =
that
all get initialized?

                                         - Chris




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49AEC210-6BB6-4778-B71C-2E3B86E0902C>