From owner-freebsd-stable@FreeBSD.ORG Wed Oct 1 19:26:34 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46E599BA; Wed, 1 Oct 2014 19:26:34 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F2BAB8; Wed, 1 Oct 2014 19:26:33 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XZLYU-0000zZ-Bz; Wed, 01 Oct 2014 19:11:02 +0400 Message-ID: <542C5529.9030800@FreeBSD.org> Date: Wed, 01 Oct 2014 23:25:29 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Rumen Telbizov , Gleb Smirnoff Subject: Re: 10.1-BETA2 possible kernel memory leak in routing table References: <542AAA3C.1080803@ipfw.ru> <542AE376.6000003@FreeBSD.org> <542AFAE3.9030705@FreeBSD.org> <20141001135124.GM73266@glebius.int.ru> <542C20D7.3070606@sentex.net> <20141001171646.GQ73266@glebius.int.ru> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: brian@freebsd.org, "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 19:26:34 -0000 On 01.10.2014 22:49, Rumen Telbizov wrote: > Submitted PR with details at > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194078 > > > On Wed, Oct 1, 2014 at 10:16 AM, Gleb Smirnoff > wrote: > > On Wed, Oct 01, 2014 at 11:42:15AM -0400, Mike Tancsa wrote: > M> On 10/1/2014 9:51 AM, Gleb Smirnoff wrote: > M> > On Tue, Sep 30, 2014 at 04:56:00PM -0700, Rumen Telbizov wrote: > M> > R> Brian Somers and I are currently looking into the source > of PF in latest > M> > R> 10-STABLE and trying to figure out what is going on. We > were able to > M> > R> replicate this problem on a 11-CURRENT (Sep 12th) machine > as well. A simple > M> > R> PF ruleset with 1 rule and 1 table. Every few reloads of > the firewall > M> > R> and vmstat > M> > R> -m | grep routetbl shows increased memory usage. > M> > > M> > I plugged the easy leak, but there is also a hard one. > Actually, the > M> > entire pf_table.c needs a good shake. Right now I am out of > time for this. > M> > M> Is that easy fix > M> > M> > http://lists.freebsd.org/pipermail/svn-src-head/2014-October/063178.html > > Yes, it seems the leak slowed down. > > M> Also, is there any work around to this ? I tried a simple set > of pf > M> rules with no tables, hoping that was the cause of it, but > memory grows > M> with each pf reload. > > No workaround available. Can you please file a PR for that? Once I > have > time, I will work on this. > Remaining leak is not related to pf. It happens due to rn_detachhead() not properly freeing items inside it masks tree. I'll try to fix this soon. > > > -- > Totus tuus, Glebius. > > > > > -- > Rumen Telbizov > Unix Systems Administrator