Changes to kern.geom.debugflags?

Chris Ross cross+freebsd at distal.com
Sat Dec 29 20:02:03 UTC 2012


On Dec 27, 2012, at 1:15 PM, Chris Ross <cross+freebsd at distal.com> wrote:

> 
> On Dec 27, 2012, at 10:43 AM, Chris Ross wrote:
>>>> FreeBSD/sparc64 ZFS boot block
>>  Boot path:   /pci at 1c,600000/scsi at 2/disk at 1,0:a
>> Consoles: Open Firmware console  
>> ERROR: Last Trap: Division by Zero
>> 
>> {1} ok ctrace
>> No saved state
>> {1} ok 
>> 
>> Anything else you can suggest to get debugging information out of zfsloader?
> 
>  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.

  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:

                uint64_t bn = offset / bsize;

And, bsize is calculated from:

        int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT;

  When running the code, though, I can confirm that bsize is 0 before the divide
is hit, thus causing the divide by zero trap.

  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() ?

                                               - Chris



More information about the freebsd-sparc64 mailing list