From owner-freebsd-current@FreeBSD.ORG Sat Sep 20 10:54:22 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5656616A4B3 for ; Sat, 20 Sep 2003 10:54:22 -0700 (PDT) Received: from web40303.mail.yahoo.com (web40303.mail.yahoo.com [66.218.78.82]) by mx1.FreeBSD.org (Postfix) with SMTP id DF33643FAF for ; Sat, 20 Sep 2003 10:54:21 -0700 (PDT) (envelope-from m_evmenkin@yahoo.com) Message-ID: <20030920175421.37161.qmail@web40303.mail.yahoo.com> Received: from [68.170.42.64] by web40303.mail.yahoo.com via HTTP; Sat, 20 Sep 2003 10:54:21 PDT Date: Sat, 20 Sep 2003 10:54:21 -0700 (PDT) From: Maksim Yevmenkin To: Gary Palmer In-Reply-To: <40053.1064078735@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: current@freebsd.org Subject: Re: ubt0, Bluetooth and kernel memory leaking X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2003 17:54:22 -0000 Hello Gary, > It seems when using rfcomm_pppd (at least) as a Bluetooth <-> LAN > gateway there is a fairly large memory leak which eventually crashes > the box running the ppp server. To track down where, I recorded the > output of kern.malloc every minute until the box crashed. At the > start of the debugging run, I saw: > > devbuf 441 2650K 2861K 2504 > 16,32,64,128,256,512,1024,2048,4096,8192,16384,65536 > > A mere 32 minutes later (right before it crashed), it was up a > considerable ammount: > > devbuf 89943184451K 184451K 92399 > 16,32,64,128,256,512,1024,2048,4096,8192,16384,65536 > > I'm pretty sure that kernel virtual memory got exhausted and the > machine paniced and rebooted. hmmm... please correct me if i wrong, but devbuf means memory allocated with M_DEVBUF. if that is true then ng_ubt(4) is likely not a problem as it never allocated memory from M_DEVBUF. > I'm not even sure where to start looking for this. I'm using a MSI USB > dongle: [...] this all looks normal to me. i seem to recall very similar discussion. someone else had exactly the same problem. i think last time it was tracked back to USB code memory leak. > This is on -current from approx. Aug 14 2003. i just quickly checked the CVS. according to your -current date you should have this fix. can you double check? perhaps there is another bug somewhere. i will take close look at ng_ubt(4) today once again. ================================================= CVS log for src/sys/dev/usb/usb_mem.c Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 29 05:07:37 2003 UTC (7 weeks, 4 days ago) by jmg Branch: MAIN CVS Tags: HEAD Changes since 1.3: +2 -0 lines Diff to previous 1.3 (colored) fix another bus_dma leak due to not having a size param for our bus_dma allocation function. With this patch, it prevents continous growth of the devbuf memory pool. Tested with ssh dd of=/dev/null < /dev/zero and vmstat -m | grep devbuf ====================================================== thanks, max __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com