Date: Wed, 26 Feb 2003 11:07:18 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: Ed Alley <alley1@llnl.gov> Cc: daxbert_news@dweebsoft.com, wea@llnl.gov, freebsd-hackers@freebsd.org Subject: Re: HOWTO track resource leaks in kernel modules? Message-ID: <Pine.BSF.4.21.0302261106570.88133-100000@InterJet.elischer.org> In-Reply-To: <20030226105759.N3150-100000@jordan.llnl.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 26 Feb 2003, Ed Alley wrote: > > Re: Resource leaks > <HOWTO track resource leaks in kernel modules?> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0302261106570.88133-100000>