Date: Wed, 24 Dec 2003 10:04:04 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: freebsd-current@freebsd.org Subject: Re: file descriptor leak in 5.2-RC Message-ID: <20031224160404.GG2890@dan.emsphone.com> In-Reply-To: <20031224154121.GA83770@e-Gitt.NET> References: <Pine.NEB.3.96L.1031220105954.46326Q-100000@fledge.watson.org> <21370.1071952691@critter.freebsd.dk> <20031224154121.GA83770@e-Gitt.NET>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 24), Oliver Brandmueller said: > I just started (by accident) a new thread regarding the same topic... > On Sat, Dec 20, 2003 at 09:38:11PM +0100, Poul-Henning Kamp wrote: > > In message <Pine.NEB.3.96L.1031220105954.46326Q-100000@fledge.watson.org>, Robe > > rt Watson writes: > > > > >[...] so if we actually have a leak, > > >fstat(8) should show a small number of files, but the sysctl > > >kern.openfiles should reveal a large number of files open. > > > > sysctl kern.malloc | grep "file desc" ? > > I can with no problems reproduce this behaviour. > > The machine is a mail filtering server running exim, amavisd + > SpamAssassin and ClamAV. I do have the machine currently in a testing > environment and thus can do some experimentation. > > The machine gets the whole feed of messages we usually have (but just > not delivers any mail back to the main servers after filtering). This > means about 3-5 Mails per second going through the machine, which > seems enough to reproduce the effect very fast. > > The following values are (with SCHED_4BSD, SCHED-ULE give the same) > read in single user mode after the machine had been up for about 25 > minutes and did 10 minutes of mail filtering. Of course none of the > daemons are running anymore: > > # sysctl kern.openfiles > kern.openfiles: 4715 > # lsof | wc -l > 35 > # fstat | wc -l > 23 pstat -f might help here; it should list the raw contents of the file table. Then again, fstat should too :) . Interesting columns would be TYPE and CNT. If you're good with gdb -k, LOC/DATA might let you figure out the filename/socket details. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031224160404.GG2890>