From owner-freebsd-current@FreeBSD.ORG Fri Nov 4 18:29:27 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D486116A44A for ; Fri, 4 Nov 2005 18:29:27 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A80DA43D45 for ; Fri, 4 Nov 2005 18:29:25 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 76587 invoked from network); 4 Nov 2005 18:32:05 -0000 Received: from dotat.atdotat.at (HELO [62.48.0.47]) ([62.48.0.47]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 4 Nov 2005 18:32:05 -0000 Message-ID: <436BA8B5.9070104@freebsd.org> Date: Fri, 04 Nov 2005 19:30:13 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: thierry@herbelot.com References: <20051104092724.GA33945@xor.obsecurity.org> <436B885B.6010609@freebsd.org> <20051104163526.GC82727@flame.pc> <200511041833.30955.thierry@herbelot.com> In-Reply-To: <200511041833.30955.thierry@herbelot.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-current@freebsd.org Subject: Re: panic: mb_dtor_pack: ref_cnt != 1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 18:29:28 -0000 Thierry Herbelot wrote: > Le Friday 4 November 2005 17:35, Giorgos Keramidas a écrit : > >>On 2005-11-04 17:12, Andre Oppermann wrote: >> >>>Ok, thanks to Danny Braniss and Peter Holm the KASSERT is working now. >> >>Very fast fix. Thanks. I barely had the time to build a kernel and >>read Peter's warning about a broken build, before the fix was ready :) >> > > Hello, > > I have applied your second patch, to solve an mbuf exhaustion which I see with > NFS traffic. > I still have the same symptoms : > after launching over an ssh session a recusrive 'ls' over an NFS disk, the > -current NFS client is blocked (and complains with 'nfs server truc:/files: > not responding') - I first saw this when cvs-ing the sources from the same > shared disk. > > I have enclosed the trace showing the mbuf stats : > > multi-cur% while (1) > while? sleep 10 > while? netstat -m | head -2 > while? end > 65/460/525 mbufs in use (current/cache/total) > 64/210/274/3776 mbuf clusters in use (current/cache/total/max) > 66/2124/2190 mbufs in use (current/cache/total) > 64/2016/2080/3776 mbuf clusters in use (current/cache/total/max) > 68/3652/3720 mbufs in use (current/cache/total) > 65/3439/3504/3776 mbuf clusters in use (current/cache/total/max) > 67/3908/3975 mbufs in use (current/cache/total) > 64/3712/3776/3776 mbuf clusters in use (current/cache/total/max) > 67/3908/3975 mbufs in use (current/cache/total) > 64/3712/3776/3776 mbuf clusters in use (current/cache/total/max) > > This isssue is seen on 3 different PCs running recent -current, clients for a > FreeBSD-6 NFS server (same problem when the NFS server is NetBSD). All 3 > clients have a small RAM, which may be a cause for faster apparition of the > issue. Please try the attached patch to see whether it makes a difference. -- Andre Index: kern/uipc_mbuf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_mbuf.c,v retrieving revision 1.157 diff -u -p -r1.157 uipc_mbuf.c --- kern/uipc_mbuf.c 4 Nov 2005 17:20:53 -0000 1.157 +++ kern/uipc_mbuf.c 4 Nov 2005 18:28:02 -0000 @@ -218,10 +218,11 @@ mb_free_ext(struct mbuf *m) atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) { switch (m->m_ext.ext_type) { case EXT_CLUSTER: /* The packet zone is special. */ - if (*(m->m_ext.ref_cnt) == 0) - *(m->m_ext.ref_cnt) = 1; - uma_zfree(zone_pack, m); - return; /* Job done. */ + /* if (*(m->m_ext.ref_cnt) == 0) */ + /* *(m->m_ext.ref_cnt) = 1; */ + /* uma_zfree(zone_pack, m); */ + /* return; */ /* Job done. */ + uma_zfree(zone_clust, m->m_ext.ext_buf); break; case EXT_JUMBO9: uma_zfree(zone_jumbo9, m->m_ext.ext_buf);