From owner-freebsd-hackers Wed Feb 26 11: 7:26 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D045737B401 for ; Wed, 26 Feb 2003 11:07:24 -0800 (PST) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13D9B43FAF for ; Wed, 26 Feb 2003 11:07:24 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc03.attbi.com (sccrmhc03) with ESMTP id <20030226190722003007dt60e>; Wed, 26 Feb 2003 19:07:23 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA97629; Wed, 26 Feb 2003 11:07:20 -0800 (PST) Date: Wed, 26 Feb 2003 11:07:18 -0800 (PST) From: Julian Elischer To: Ed Alley Cc: daxbert_news@dweebsoft.com, wea@llnl.gov, freebsd-hackers@freebsd.org Subject: Re: HOWTO track resource leaks in kernel modules? In-Reply-To: <20030226105759.N3150-100000@jordan.llnl.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 26 Feb 2003, Ed Alley wrote: > > Re: Resource leaks > what KIND of resource leaks? > > Hi -- > > A question like yours (How to?) usually gets ignored on the hackers list. > I've tried it before. I believe that they're only interested in bugs/hacks > in > the current source. I am not aware of any newsletter/questions digest that > can/will answer a technical how-to like yours. > My suggestion is to place panic(9) calls in strategic places in > your code and see where it blows. Also putting strategic printf statements > before the panic will help. > Finally: don't compile as a module because the kernel.debug file > will not have the module symbols in it, which makes it difficult to > debug; you can load the module symbols with gdb (see the developers handbook) > but that is a pain in the neck after a while. It's easy to switch from > in-kernel to module after you have developed your package. > I am not aware of any software that you can use to debug leaking > resources except gdb -k. Look at the v_usecount, v_writecount, v_holdcount > values in the struct vnode.h. Things like that. > > Ed Alley > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message