From owner-freebsd-net@freebsd.org Tue May 8 20:05:04 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 042B5FC88B4 for ; Tue, 8 May 2018 20:05:04 +0000 (UTC) (envelope-from tj@enoti.me) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA7C88A24E; Tue, 8 May 2018 20:05:03 +0000 (UTC) (envelope-from tj@enoti.me) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 92F0D225FA; Tue, 8 May 2018 16:04:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 08 May 2018 16:04:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=FExQb/ /tQ0urPwIj72Gh68skwL7aqYMyqXxsl5c6H8s=; b=gJDH3ponQXgyOF81PTTo/4 WyUC6wIrzOq7yzoJ+UIrulVdibyAXDpiKUXRIRuIOXFGyXvZTM0Agx3y4K3bZmc1 KZFHnrkIZ9DgKmMaqAF9aP/3CV6ZFx8S6L+7YoYNPtkaDhpd9LWXzj+JD1yXH1NA N06ew1sHRiRjFEsUbUELqQ0NEIkjBcvB87D9vAKFC89rw3cLrVKk/xQLMxD9c5B+ pN+lF23I1kUT07l60JjUnsCKwxapIz7eIue6YevKY7ChcX7qTHxL1Fs0RJqgoZEV KJU4RuH5MYQIUBdMEIp4hw1vA5LpBbdVzaOX/viZeIhSSrRKUJd/XKZCUES+3jbg == X-ME-Sender: Received: from tom-desk.erg.abdn.ac.uk (tom-desk.erg.abdn.ac.uk [139.133.204.4]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CB54E5091; Tue, 8 May 2018 16:04:54 -0400 (EDT) Date: Tue, 8 May 2018 21:04:39 +0100 From: Tom Jones To: Harsh Jain Cc: freebsd-net@freebsd.org, Navdeep Parhar , John Baldwin , sonyarpitad@chelsio.com, lstewart@freebsd.org Subject: Re: Bug: Newreno; Seems Memory leak in newreno_cb_init Message-ID: <20180508200439.GA32339@tom-desk.erg.abdn.ac.uk> References: <58ab6c13-f9c4-b4d7-7f2c-eade3749457f@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <58ab6c13-f9c4-b4d7-7f2c-eade3749457f@chelsio.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 20:05:04 -0000 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 - [tj]