From owner-freebsd-ppc@freebsd.org Tue May 3 14:33:40 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AB04B2AEEC for ; Tue, 3 May 2016 14:33:40 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm7-vm5.bullet.mail.gq1.yahoo.com (nm7-vm5.bullet.mail.gq1.yahoo.com [98.136.218.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 670201B08 for ; Tue, 3 May 2016 14:33:40 +0000 (UTC) (envelope-from scott4long@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1462285674; bh=hpQw02F8Rp2eNUp77U0oes0TxrsLqTk3NgAqeON/HPk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=LNDsgRVTxbwjRrgOCG2/OEZ/RCTu/aFJMFQ7vxJOfBgPYDUEtVNZDc4nKqQgCqkUMpTovDUmu0jMiERR6xiyXDkA/HL2eYSDcCyLXJhgnyaaqVOcQRe1+ww12IOmNn9SZm2iGVaEf4q1pO/YXBDJWD9s7E1mei9cSIh498xi0l4ksFloRSAnP69YNYKMr6lH83+ioaPI6DXXjq2Bn+T9dLIH2epgm+QWMKgMbrPePnRq7pT01HG7O3NRLOoalZr3AkEltxAVJgtu/wzXLN7Vj+Icer9M1qYKLBHzmwjQsWduHWslMg+G2vWPq+oip30pkvRPBHhBLjHLUx/v1QMVVQ== Received: from [98.137.12.55] by nm7.bullet.mail.gq1.yahoo.com with NNFMP; 03 May 2016 14:27:54 -0000 Received: from [98.136.164.77] by tm15.bullet.mail.gq1.yahoo.com with NNFMP; 03 May 2016 14:27:54 -0000 Received: from [127.0.0.1] by smtp239.mail.gq1.yahoo.com with NNFMP; 03 May 2016 14:27:54 -0000 X-Yahoo-Newman-Id: 909627.77454.bm@smtp239.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9WGsZOEVM1lAFTvJu7Bl5wvimwbGTVj4LvA7rZwMC2h4Ikm NASAfpR3xv784xxMw7EZRXNjO6dJVmqu7nOX4pbI0qpbdqd8UA8kFXIwackR MAQVUs6oRNVFRHXoZh5roPicu7PR_anyk1nFgpxZDmDr30A1xuJq5OLTiJQL PXZvdRzQSBY4cvpLKKOxuw6xEDZQY_sD3PZBxK53vixHPnmDCW2rjo.IkMd7 soTcmiVbFhg_WatBfI0YCQ1UNM.l4wCDRJUp9VWpH33M0kYQgVl1._3ESx6f sifIs0DC.PZKn8eHRMUUXJ.zSQX90S7pftWoBWMSZaZbkXiJakrJojWB.OuG HN.DJ0Rf8lExqi.LtZ0J.pjhYIW2sGN1rCrFHfxTwEjgnYk.udb0BSkwtvUG 9THRvFYb8icQ55gAAXOWeaZWjKo8mjy5AbYYLoLbfhhHDsaGQLI.pIP.vvdO 5r_VQyDiwZ1oPTxhZ8HgTRKbIrkcdBs51DSnTefwyLpuKoUWAyR6HPezwxga F8YOdszU2Lgp2JNZoRqSV7SIfGgJc6N_j_IQ1zO4- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: wired memory leak at r298785 From: Scott Long In-Reply-To: <20160503062031.GA2209@raichu> Date: Tue, 3 May 2016 08:27:52 -0600 Cc: Steve Wills , FreeBSD PowerPC ML , freebsd-current@freebsd.org, scottl@FreeBSD.org, Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: References: <572756DF.1010809@FreeBSD.org> <5727F71E.20101@FreeBSD.org> <20160503062031.GA2209@raichu> To: Mark Johnston X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2016 14:33:40 -0000 > On May 3, 2016, at 12:20 AM, Mark Johnston wrote: >=20 > On Mon, May 02, 2016 at 08:55:58PM -0400, Steve Wills wrote: >> Hi, >>=20 >> On 05/ 2/16 09:32 AM, Steve Wills wrote: >>> Hi, >>>=20 >>> Just did my monthly update and r298785 seems to be leaking wired = memory >>> rather rapidly. My system has 8gb of RAM and the amount of wired = memory >>> just goes up and up continuously. It takes about 12 hours before it >>> exhausts all the RAM and sort of locks up (though shutdown still = works). >>>=20 >>> I also made one other change to the system at the same time as = updating, >>> which was to add another disk and configure it using ZFS. Perhaps = this >>> is a ZFS on PowerPC64 issue? My amd64 box running the same rev of >>> CURRENT doesn't have the issue. >>>=20 >>=20 >> I've rebooted the box and started repeatedly logging the output of >> vmstat -m. It seems to show CAM CCB using a lot of memory and growing >> rather rapidly. For example, here's a few lines of diff output: >>=20 >> - CAM CCB 91418 182836K - 187149 2048 >> + CAM CCB 447070 894140K - 900292 2048 >>=20 >> from two samples that are 60 minutes apart. >>=20 >> The box is isn't terribly busy, it's just running the monitoring = daemons >> running (snmpd, collectd), whatever web requests are hitting it (very >> few if any), this logging process, and my shell, etc. >=20 > This was causing problems on one of my amd64 systems, so it's not > specific to powerpc64. It turns out to be due to r298004: the CCB > allocated in cam_periph_devctl_notify() never gets freed. The patch > below seems to fix it. Thanks Mark, that looks like the right fix. I=E2=80=99ll put it in = today. Scott