From owner-freebsd-current@FreeBSD.ORG Tue Dec 7 02:42:58 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58A0716A4CE for ; Tue, 7 Dec 2004 02:42:58 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2471543D66 for ; Tue, 7 Dec 2004 02:42:58 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 0BEDD72DD4; Mon, 6 Dec 2004 18:42:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 0690D72DCB; Mon, 6 Dec 2004 18:42:58 -0800 (PST) Date: Mon, 6 Dec 2004 18:42:57 -0800 (PST) From: Doug White To: Erik Greenwald In-Reply-To: <20041206193921.GA31784@phoenix.smluc.org> Message-ID: <20041206183531.T23442@carver.gumbysoft.com> References: <006501c4da28$5692e130$0a64a8c0@techiebod.com> <20041206193921.GA31784@phoenix.smluc.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Henry Whincup cc: freebsd-current@freebsd.org cc: erikg@arl.army.mil Subject: Re: ffs_clusteralloc: allocated out of group on 5TB fs (5.3-Stable) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2004 02:42:58 -0000 On Mon, 6 Dec 2004, Erik Greenwald wrote: > > 1545 if (dtog(fs, bno) != cg) > > 1546 panic("ffs_clusteralloc: allocated out of group"); > > a couple weeks ago, when I found the issue, I tried dumping that line > using a printf and got > > dtog(0xc4896800, -1894026712) != 25518 > > (I think I used %x, %d, %d) Unfortunately bno is a int64_t (via ufs2_daddr_t) so that value is incorrect. > I've no idea what those #'s mean, and couldn't find any documentation on > 'dtog' (something to group?) dtog translates a filesystem block to a cylinder group: #define dtog(fs, d) ((d) / (fs)->fs_fpg) (fpg is frags per group) bno comes from: bno = cg * fs->fs_fpg + blkstofrags(fs, got - run + 1); That seems more likely to overflow or be the victim of a bad cast since everything on the rhs are ints. blkstofrags is a bit-shift. a 'bt full' would print all this, but if you have to instrument then this should be a good start. > I have a kernel with the DEBUG=-g option, (and config -g), can't get the > dang thing to dump, though It might help if you put the dump volume on something other than the gigantic array, in case stuff is getting tied up there because of the ffs problem. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org