From owner-freebsd-fs@FreeBSD.ORG Tue Mar 23 13:21:42 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430D5106566B; Tue, 23 Mar 2010 13:21:42 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id CB0528FC0C; Tue, 23 Mar 2010 13:21:41 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAFddqEuDaFvI/2dsb2JhbACbLHO7R4R9BI5P X-IronPort-AV: E=Sophos;i="4.51,295,1267419600"; d="scan'208";a="69624609" Received: from darling.cs.uoguelph.ca ([131.104.91.200]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 23 Mar 2010 09:21:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id A359894011C; Tue, 23 Mar 2010 09:21:40 -0400 (EDT) X-Virus-Scanned: amavisd-new at darling.cs.uoguelph.ca Received: from darling.cs.uoguelph.ca ([127.0.0.1]) by localhost (darling.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BdkrlGJN7My5; Tue, 23 Mar 2010 09:21:40 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id 15A16940117; Tue, 23 Mar 2010 09:21:40 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o2NDYd228055; Tue, 23 Mar 2010 09:34:39 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Tue, 23 Mar 2010 09:34:39 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Daniel Braniss In-Reply-To: Message-ID: References: <201003171120.o2HBK3CV082081@freefall.freebsd.org> <20100317113953.GA14582@icarus.home.lan> <86tys9eqo6.fsf@kopusha.onet> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bug-followup@FreeBSD.org, freebsd-fs@FreeBSD.org, Kai Kockro Subject: Re: kern/144330: [nfs] mbuf leakage in nfsd with zfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2010 13:21:42 -0000 On Tue, 23 Mar 2010, Daniel Braniss wrote: >> I only have a FreeBSD client at this point, and it doesn't cause the >> leak for nfsv3,udp for me here. > my client is also FreeBSD 8.0, strange > I was already using the patch below when I tested and couldn't see it, so I guess it now appears that the patch works. >> >> Doug Rabson pointed out that there would be a leak for the "default:" >> case too, although didn't know if that would occur in practice. > it does! :-) > >> >> So, maybe you could test this variant of the patch (just in case that >> was the slow leak...): >> --- rpc/svc.c.sav 2010-03-21 18:46:20.000000000 -0400 >> +++ rpc/svc.c 2010-03-22 19:00:17.000000000 -0400 >> @@ -819,9 +819,11 @@ >> free(r->rq_addr, M_SONAME); >> r->rq_addr = NULL; >> } >> + m_freem(args); >> goto call_done; >> >> default: >> + m_freem(args); >> goto call_done; >> } >> } > that plugged it! > see > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/mbuf-leak/store-02+++.ps Good work with the testing. I'll get it committed and put it up on the nfs patches page I have under http://people.freebsd.org/~rmacklem > thanks to you for taking time off of your retirement :-) > I plan on doing quite a bit of FreeBSD/NFS stuff during it, rick