From owner-freebsd-stable Sat Feb 23 12:21:48 2002 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id B67C637B404 for ; Sat, 23 Feb 2002 12:21:35 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 23 Feb 2002 20:21:34 +0000 (GMT) To: "Jan L. Peterson" Cc: freebsd-stable@freebsd.org Subject: Re: crashes on 4.5-RELEASE In-Reply-To: Your message of "Thu, 21 Feb 2002 15:10:44 MST." <20020221221044.D11E8422D0@mail.flipdog.com> Date: Sat, 23 Feb 2002 20:21:34 +0000 From: Ian Dowse Message-ID: <200202232021.aa04276@salmon.maths.tcd.ie> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020221221044.D11E8422D0@mail.flipdog.com>, "Jan L. Peterson" writ es: >The machine panics (sometimes right away, sometimes after several >minutes). Here's the panic message: > >kernel: type 12 trap, code=0 >Stopped at nfs_realign+0xdb: incb 0(%eax,%edx,1) It looks like some junk cluster pointer is ending up on the mbuf cluster freelist. Try adding "options INVARIANTS" and "options INVARIANT_SUPPORT" to your kernel config, and apply the following patch in /usr/src/sys/sys. This won't fix the panics, but it should hopefully narrow down the cause by panicking at the point that the bad cluster pointer is first seen. Try to get a few stack traces with this patch in place. Ian Index: mbuf.h =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/sys/mbuf.h,v retrieving revision 1.44.2.12 diff -u -r1.44.2.12 mbuf.h --- mbuf.h 13 Feb 2002 00:43:11 -0000 1.44.2.12 +++ mbuf.h 20 Feb 2002 00:53:36 -0000 @@ -366,6 +366,10 @@ else \ (p) = NULL; \ } \ + KASSERT((p) == NULL || ((char *)(p) >= (char *)mbutl && \ + (char *)(p) < (char *)mbutl + \ + mbstat.m_clusters * MCLBYTES + mbstat.m_mbufs * MSIZE), \ + ("MCLALLOC: bad cluster %p", (p))); \ } while (0) #define MCLGET(m, how) do { \ @@ -384,6 +388,10 @@ #define MCLFREE1(p) do { \ union mcluster *_mp = (union mcluster *)(p); \ \ + KASSERT((char *)(p) >= (char *)mbutl && \ + (char *)(p) < (char *)mbutl + \ + mbstat.m_clusters * MCLBYTES + mbstat.m_mbufs * MSIZE, \ + ("MCLFREE1: bad cluster %p", (p))); \ KASSERT(mclrefcnt[mtocl(_mp)] > 0, ("freeing free cluster")); \ if (--mclrefcnt[mtocl(_mp)] == 0) { \ _mp->mcl_next = mclfree; \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message