Date: Thu, 15 Jan 2004 19:13:01 +0100 From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) To: Scott Long <scottl@freebsd.org> Cc: current@freebsd.org Subject: Re: Panic with this morning's (~9am EDT, 15 jan 2004) sources. Message-ID: <xzpad4p13o2.fsf@dwp.des.no> In-Reply-To: <4006D6B5.3050601@freebsd.org> (Scott Long's message of "Thu, 15 Jan 2004 11:06:45 -0700") References: <EE3D3FBAFFCAED448C21C398FDAD91AC0108D4@EBE1.gc.nat> <4006D6B5.3050601@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Scott Long <scottl@freebsd.org> writes: > This is likely due to the new fd allocation code. DES, can you please > enable WITNESS and INVARIANTS in your test system and fix this? I have INVARIANTS (the fdalloc code is riddled with KASSERTS) but forgot to test with WITNESS. In any case, the fix is pretty straightforward; please try the attached patch. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=fdalloc-witness.diff Index: sys/kern/kern_descrip.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.219 diff -u -r1.219 kern_descrip.c --- sys/kern/kern_descrip.c 15 Jan 2004 10:15:03 -0000 1.219 +++ sys/kern/kern_descrip.c 15 Jan 2004 18:11:48 -0000 @@ -1430,8 +1430,11 @@ FILEDESC_LOCK_ASSERT(fdp, MA_OWNED); newfdp = fdinit(fdp); FILEDESC_LOCK(newfdp); - if (fdp->fd_lastfile >= newfdp->fd_nfiles) + while (fdp->fd_lastfile >= newfdp->fd_nfiles) { + FILEDESC_UNLOCK(fdp); fdgrowtable(newfdp, fdp->fd_lastfile + 1); + FILEDESC_LOCK(fdp); + } KASSERT(newfdp->fd_nfiles > fdp->fd_lastfile, ("fdgrowtable() failed to grow table")); /* copy everything except kqueue descriptors */ --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpad4p13o2.fsf>