Date: Wed, 9 May 2018 11:00:52 +1000 From: Lawrence Stewart <lstewart@freebsd.org> To: Tom Jones <tj@enoti.me>, Harsh Jain <harsh@chelsio.com> Cc: freebsd-net@freebsd.org, Navdeep Parhar <navdeep@chelsio.com>, John Baldwin <jhb@freebsd.org>, sonyarpitad@chelsio.com Subject: Re: Bug: Newreno; Seems Memory leak in newreno_cb_init Message-ID: <6c84c94a-9d16-db30-f8d5-c6b364cd9469@freebsd.org> In-Reply-To: <20180508200439.GA32339@tom-desk.erg.abdn.ac.uk> References: <58ab6c13-f9c4-b4d7-7f2c-eade3749457f@chelsio.com> <20180508200439.GA32339@tom-desk.erg.abdn.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/05/2018 06:04, Tom Jones wrote: > On Tue, May 08, 2018 at 05:14:49PM +0530, Harsh Jain wrote: >> Hi All, >> >> We have observed memory leak with TCP network traffic in "newreno". >> >> Output of vmstat -m >> >> in_mfilter 3 3K - 3 1024 >> in_multi 4 1K - 4 256 >> ip_moptions 6 1K - 6 64,256 >> encap_export_host 2 2K - 2 1024 >> newreno data 394849273 6169520K - 394849273 16 >> sctp_a_it 0 0K - 5 16 >> sctp_vrf 1 1K - 1 64 >> sctp_ifa 7 1K - 7 128 >> sctp_ifn 4 1K - 4 128 >> >> There is 1 malloc in "newreno_cb_init" whose pointer is not saved in any global structure to free the same. >> >> Is this a BUG? > > > Hi Harsh, > > Adding Lawrence in cc > > It looks like it, running nc in a loop I can watch MemUse grow. > > I think this should address the leak > > https://reviews.freebsd.org/D15358 I'm not clear why yet, but the patch I ultimately committed as r331214 is deeply flawed on account of missing memory allocation and other changes that never ended up in the working copy I committed from. The cb_destroy() change for example exists in the D11616 Phabricator review though. I think I may have refined the final patch and committed from a working copy that started with an older stale version of the patch. Ugh. Mea culpa, thanks for the bug report, and apologies for the oversight. Will work with Tom to get this fixed. Cheers, Lawrence
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6c84c94a-9d16-db30-f8d5-c6b364cd9469>