From owner-freebsd-current@FreeBSD.ORG Sat Nov 15 17:13:22 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 DBAA416A4CF for ; Sat, 15 Nov 2003 17:13:22 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8782E43FBD for ; Sat, 15 Nov 2003 17:13:21 -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 hAG1D7eF084152; Sat, 15 Nov 2003 17:13:12 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200311160113.hAG1D7eF084152@gw.catspoiler.org> Date: Sat, 15 Nov 2003 17:13:07 -0800 (PST) From: Don Lewis To: l.ertl@univie.ac.at In-Reply-To: <20031111192944.K678@korben.in.tern> 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: Sun, 16 Nov 2003 01:13:23 -0000 On 11 Nov, Lukas Ertl wrote: > On Tue, 11 Nov 2003, Lukas Ertl wrote: > >> Unfortunately, we are still seeing a problem here: we are running uvscan >> (virus scanner), and while running it we are still seeing increasing unpcb >> usage and orphaned unix domain sockets. >> >> We added some debug printfs to the fifo routines and found out that >> fifo_cleanup is called from fifo_close with a vnode which has v_usecount >> == 2 so the socket close calls aren't reached. > > 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(). I just committed a fix for this. Fifo_vnops.c 1.91 should not leak memory and sockets when used with nullfs.