From owner-freebsd-sparc64@FreeBSD.ORG Sat Dec 29 20:02:03 2012 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6691369 for ; Sat, 29 Dec 2012 20:02:03 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200::ae25]) by mx1.freebsd.org (Postfix) with ESMTP id 57E748FC08 for ; Sat, 29 Dec 2012 20:02:03 +0000 (UTC) Received: from [192.168.1.122] (ip98-166-181-220.hr.hr.cox.net [98.166.181.220]) (authenticated bits=0) by mail.distal.com (8.14.3/8.14.3) with ESMTP id qBTK1txP000420 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 29 Dec 2012 15:01:56 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Changes to kern.geom.debugflags? From: Chris Ross In-Reply-To: Date: Sat, 29 Dec 2012 15:01:55 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <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> To: Chris Ross X-Mailer: Apple Mail (2.1499) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.2 (mail.distal.com [206.138.151.250]); Sat, 29 Dec 2012 15:01:57 -0500 (EST) Cc: freebsd-sparc64@freebsd.org, Marius Strobl X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 20:02:03 -0000 On Dec 27, 2012, at 1:15 PM, Chris Ross = wrote: >=20 > On Dec 27, 2012, at 10:43 AM, Chris Ross wrote: >>>> FreeBSD/sparc64 ZFS boot block >> Boot path: /pci@1c,600000/scsi@2/disk@1,0:a >> Consoles: Open Firmware console =20 >> ERROR: Last Trap: Division by Zero >>=20 >> {1} ok ctrace >> No saved state >> {1} ok=20 >>=20 >> Anything else you can suggest to get debugging information out of = zfsloader? >=20 > 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 =3D offset / bsize; And, bsize is calculated from: int bsize =3D 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