Date: Wed, 1 Oct 2008 18:56:29 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Gary Palmer <gpalmer@freebsd.org> Cc: Stephen Clark <sclark46@earthlink.net>, Jeremy Chadwick <koitsu@FreeBSD.org>, FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: resource leak Message-ID: <alpine.BSF.1.10.0810011854350.9076@fledge.watson.org> In-Reply-To: <20081001164856.GA6478@in-addr.com> References: <48E36204.5090108@earthlink.net> <20081001115046.GA20384@icarus.home.lan> <20081001164856.GA6478@in-addr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Oct 2008, Gary Palmer wrote: >> Periodically logging "ps -auxw" output to a file would be useful, as >> ideally you'd gradually see the list get longer and longer over time; it's >> possible you have many zombie processes as a result of a parent which is >> not reaping its children (calling waitpid(2) or its friends). > > "ps alxw" may be of interest in addition to "ps auxw" as it displays what > the processes are waiting on. It could conceivably be a problem of some > kind at the filesystem level. I've seen situations before where a problem > escalates to the point where "ls /" hangs, and at that point you're stuck > with an unresponsive box. If you want an even greater level of detail than ps -l, you can use procstat -k to generate kernel stack traces for all user/kernel threads. Wait channels are very useful, but they only tell you what the code that invoked the wait thinks it is for, not how that code was reached. A classic example is waiting on an exhausted UMA zone -- you get a uma wait channel, but no indication of what subsystem performed the memory allocation... This required FreeBSD 7.1 and higher, however. (Obviously, the same can be done easily using DDB, but that's hard on a box without a serial console, and requires interrupting the flow of the operating system, compiling with DDB, etc). Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.1.10.0810011854350.9076>