From owner-freebsd-current@FreeBSD.ORG Tue Nov 11 12:09:12 2003 Return-Path: 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 A6F2116A4CE for ; Tue, 11 Nov 2003 12:09:12 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAB6443FB1 for ; Tue, 11 Nov 2003 12:09:11 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id hABK94eF070133; Tue, 11 Nov 2003 12:09:08 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200311112009.hABK94eF070133@gw.catspoiler.org> Date: Tue, 11 Nov 2003 12:09:04 -0800 (PST) From: Don Lewis To: l.ertl@univie.ac.at In-Reply-To: <200311111928.hABJRxeF070057@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: current@FreeBSD.org Subject: Re: named pipes memory leak? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 11 Nov 2003 20:09:12 -0000 On 11 Nov, Don Lewis wrote: > On 11 Nov, Lukas Ertl wrote: >> Sorry, I probably missed an important part: we're creating the FIFOs on >> nullfs mounts - the test script works great on plain UFS mounts, but the >> null layer seems to VREF the vnode once again, so v_usecount is 2, thus it >> is missong the check in fifo_cleanup(). > > Grrr ... At least I didn't break this, our fifo implementation would > have always leaked when used this way. > > Doing the cleanup in fifo_inactive() would have worked better in this > case. I think I figured out a way to make that work properly, but I > really need to test it. > > Is there any particular reason that you are nuking and re-creating the > fifo? If you don't delete the fifo, the same sockets will get used each > time. Now that I've had some time to think about it, if you reuse the same fifo, you'll run into the same problem that caused me to abandon my previous fifo_inactive() version of the cleanup code, which is stale data being left in the fifo after both ends have been closed. You may be stuck with plan B below ... > As a workaround could you create a little mdfs to hold the fifo?