Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2004 18:42:57 -0800 (PST)
From:      Doug White <dwhite@gumbysoft.com>
To:        Erik Greenwald <erik@smluc.org>
Cc:        erikg@arl.army.mil
Subject:   Re: ffs_clusteralloc: allocated out of group on 5TB fs (5.3-Stable)
Message-ID:  <20041206183531.T23442@carver.gumbysoft.com>
In-Reply-To: <20041206193921.GA31784@phoenix.smluc.org>
References:  <006501c4da28$5692e130$0a64a8c0@techiebod.com> <20041206193921.GA31784@phoenix.smluc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041206183531.T23442>