ubt0, Bluetooth and kernel memory leaking
Maksim Yevmenkin
m_evmenkin at yahoo.com
Sat Sep 20 10:54:22 PDT 2003
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 <host> 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
More information about the freebsd-current
mailing list