From owner-freebsd-bugs Fri Sep 15 2:19:59 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 7E9A837B422 for ; Fri, 15 Sep 2000 02:19:56 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 15 Sep 2000 10:19:55 +0100 (BST) Date: Fri, 15 Sep 2000 10:19:55 +0100 From: David Malone To: Chad Oleary Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/21240: mbufs allocated to data is huge number in netstat -m Message-ID: <20000915101955.A26498@walton.maths.tcd.ie> References: <200009150000.RAA39561@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200009150000.RAA39561@freefall.freebsd.org>; from col@pobox.com on Thu, Sep 14, 2000 at 05:00:03PM -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org You could try this diff - it should make the machine panic but if you can get a trace of where the kernel is when it panics then that could be useful. To get a trace back you will need to compile the kernel with the debugger and then type "t" when it panics. Copy down what gets printed and mail it to the followup address for the PR. Basically you'll need to add: options DDB options INVARIANTS options INVARIANT_SUPPORT to your kernel's config file. I can't actually check the patch below until I get home, but I'll do some tests with it when I get home to see if I can reproduce what's going on. David. Index: mbuf.h =================================================================== RCS file: /FreeBSD/FreeBSD-CVS/src/sys/sys/mbuf.h,v retrieving revision 1.44.2.6 diff -u -r1.44.2.6 mbuf.h --- mbuf.h 2000/08/25 23:18:52 1.44.2.6 +++ mbuf.h 2000/09/15 09:05:35 @@ -420,6 +420,7 @@ struct mbuf *_mm = (m); \ \ KASSERT(_mm->m_type != MT_FREE, ("freeing free mbuf")); \ + KASSERT(mbtypes[_mm->m_type] > 0 , ("corrupted mbuf stats")); \ mbtypes[_mm->m_type]--; \ if (_mm->m_flags & M_EXT) \ MEXTFREE1(m); \ @@ -509,6 +510,7 @@ int _mt = (t); \ int _ms = splimp(); \ \ + KASSERT(mbtypes[_mm->m_type] > 0 , ("corrupted mbuf stats")); \ mbtypes[_mm->m_type]--; \ mbtypes[_mt]++; \ splx(_ms); \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message