Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2010 13:09:53 +0200
From:      Daniel Braniss <danny@cs.huji.ac.il>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        bug-followup@FreeBSD.org, freebsd-fs@FreeBSD.org, Kai Kockro <kkockro@web.de>
Subject:   Re: kern/144330: [nfs] mbuf leakage in nfsd with zfs 
Message-ID:  <E1NtfW6-0008E7-9q@kabab.cs.huji.ac.il>
In-Reply-To: <Pine.GSO.4.63.1003212018180.28991@muncher.cs.uoguelph.ca> 
References:  <201003171120.o2HBK3CV082081@freefall.freebsd.org>  <20100317113953.GA14582@icarus.home.lan> <Pine.GSO.4.63.1003171844120.20254@muncher.cs.uoguelph.ca> <86tys9eqo6.fsf@kopusha.onet> <Pine.GSO.4.63.1003212018180.28991@muncher.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> 
> On Sun, 21 Mar 2010, Mikolaj Golub wrote:
> 
> >
> > Reviewing rpc/svc.c:svc_getreq() it looks for me that for RS_DONE case args
> > are nevere freed. Shouldn't it be like in the attached patch?
> >
> Oops, I meant to ask Daniel Braniss (not Jeremy) w.r.t testing the patch,
> since he can easily reproduce the problem. Of course, I'd appreciate
> anyone who can test it to do so and let us know how it goes.
> 
> Daniel, here's the patch just in case you didn't see Mikolaj's email.
> 
> rick
> Mikolaj's patch:
> --- sys/rpc/svc.c.orig	2010-03-21 10:17:20.000000000 +0200
> +++ sys/rpc/svc.c	2010-03-21 10:20:05.000000000 +0200
> @@ -819,6 +819,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req
>   					free(r->rq_addr, M_SONAME);
>   					r->rq_addr = NULL;
>   				}
> +				m_freem(args);
>   				goto call_done;
> 
>   			default:

well, it's much better!, but no cookies yet :-)

from comparing graphs in
	ftp://ftp.cs.huji.ac.il/users/danny/freebsd/mbuf-leak/
store-01-e.ps: a production server running newfsd - now up almost 20 days
	notice that the average used mbuf is below 1000!

store-02.ps: kernel without last patch, classic nfsd
	the leak is huge.

store-02++.ps: with latest patch
	the leak is much smaller but I see 2 issues:
		- the initial leap to over 2000, then a smaller leak.

could someone explain replay_prune() to me?

cheers,
	danny








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1NtfW6-0008E7-9q>