From owner-freebsd-arch@FreeBSD.ORG Tue Jul 15 09:59:53 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8F2537B404 for ; Tue, 15 Jul 2003 09:59:52 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 039A343F3F for ; Tue, 15 Jul 2003 09:59:52 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h6FGxkVi085626; Tue, 15 Jul 2003 09:59:48 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h6F5K9Ls082923; Mon, 14 Jul 2003 22:20:09 -0700 (PDT) Date: Mon, 14 Jul 2003 22:20:09 -0700 (PDT) From: Matthew Dillon Message-Id: <200307150520.h6F5K9Ls082923@apollo.backplane.com> To: Mike Silbersack References: <20030714191735.Y8225@odysseus.silby.com> cc: arch@freebsd.org cc: Julian Elischer Subject: Re: 4.x mbuf binary compatibility; can it be broken? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2003 16:59:53 -0000 :> How does it get 255+ references? : :I don't know exactly at this point. I can reproduce the situation at will :with (in kernel) test code, but I don't know what exactly causes it in the :wild. : :Given that increasing the ref count limit is so easy, I was hoping to :avoid spending time tracking down one degenerate case. :) : :Mike "Silby" Silbersack It would be a good idea to make sure it isn't a runaway ref count. I may be missing something, but I don't see how the ref count could possibly reach 255 under any circumstances. mbufs using an mbuf cluster (M_EXT with ext_ref == NULL) bump the ref count, and duplicating an mbuf bumps the underlying cluster's ref count, and splitting an mbuf bumps the ref count, and that is pretty much it. Only m_copym() or m_copypacket() have any chance of legitimately increasing the ref count beyond 255. Only a KASSERT() will tell us who the likely candidate is. It could very well be that a ref count is being lost somewhere. -Matt