Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2003 11:02:12 -0800 (PST)
From:      Ed Alley <alley1@llnl.gov>
To:        <daxbert_news@dweebsoft.com>
Cc:        <wea@llnl.gov>, <freebsd-hackers@freebsd.org>
Subject:   Re: HOWTO track resource leaks in kernel modules?
Message-ID:  <20030226105759.N3150-100000@jordan.llnl.gov>

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

Re: Resource leaks
	<HOWTO track resource leaks in kernel modules?>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030226105759.N3150-100000>