From owner-freebsd-current Mon Feb 4 8: 0:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 7904D37B429; Mon, 4 Feb 2002 08:00:16 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g14G0Bx51382; Mon, 4 Feb 2002 16:00:11 GMT (envelope-from mark@grondar.za) Received: from greenpeace.grondar.org (greenpeace [192.168.42.2]) by gratis.grondar.org (Postfix) with ESMTP id 6587AA8; Mon, 4 Feb 2002 15:56:56 +0000 (GMT) Received: from grondar.za (localhost [127.0.0.1]) by greenpeace.grondar.org (8.11.6/8.11.6) with ESMTP id g14FuoE54487; Mon, 4 Feb 2002 15:56:56 GMT (envelope-from mark@grondar.za) Message-Id: <200202041556.g14FuoE54487@greenpeace.grondar.org> To: Bruce Evans Cc: John Polstra , current@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: Panics in ffs_clusteracct with todays -current References: <20020205000829.A22758-100000@gamplex.bde.org> In-Reply-To: <20020205000829.A22758-100000@gamplex.bde.org> ; from Bruce Evans "Tue, 05 Feb 2002 00:28:43 +1100." Date: Mon, 04 Feb 2002 15:56:45 +0000 From: Mark Murray Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If this fixes a problem, then please go ahead and commit it. :-) M > On Sun, 3 Feb 2002, John Polstra wrote: > > > The kernel from today's current (CVSupped 3 Feb 2002 around 17:40 > > PST) can't stay up for more than a few minutes without getting a > > page-not-present panic at line 1815 of ufs/ffs/ffs_alloc.c revision > > 1.86. It is in this code: > > > > /* > > * Find the size of the cluster going backward. > > */ > > start = blkno - 1; > > end = start - fs->fs_contigsumsize; > > if (end < 0) > > end = -1; > > mapp = &freemapp[start / NBBY]; > > map = *mapp--; > > ^^^^^ > > BANG! > > This was broken by a recent change to the type of NBBY. > > `start' is apparently negative (it would be for blkno == 0). Small > negative values of `start' used to give an index of 0 in freemapp (not > even small negative, since integer division bogusly rounds negative > values towards 0). They now give an index of about 0x1fffffff on > 32-bit machines. > > I also got panics in vm. The vm code apparently trapped while trying > to map the preposterous address generated by the above. > > This patch just backs out the change to NBBY. > > %%% > Index: types.h > =================================================================== > RCS file: /home/ncvs/src/sys/sys/types.h,v > retrieving revision 1.50 > diff -u -2 -r1.50 types.h > --- types.h 3 Feb 2002 11:36:59 -0000 1.50 > +++ types.h 4 Feb 2002 13:08:05 -0000 > @@ -172,5 +172,5 @@ > > #ifndef _POSIX_SOURCE > -#define NBBY 8U /* number of bits in a byte */ > +#define NBBY 8 /* number of bits in a byte */ > > /* > %%% > > Bruce > -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message