Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2016 16:55:29 -0700
From:      Mark Johnston <markj@FreeBSD.org>
To:        Trond =?iso-8859-1?Q?Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Cc:        Scott Long <scott4long@yahoo.com>, Steve Wills <swills@FreeBSD.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, freebsd-current@freebsd.org, scottl@FreeBSD.org, Warner Losh <imp@bsdimp.com>
Subject:   Re: wired memory leak at r298785
Message-ID:  <20160503235529.GA44671@wkstn-mjohnston.west.isilon.com>
In-Reply-To: <alpine.BSF.2.20.1605032016280.37262@mail.fig.ol.no>
References:  <572756DF.1010809@FreeBSD.org> <5727F71E.20101@FreeBSD.org> <20160503062031.GA2209@raichu> <E7308871-DC4F-4DB2-867C-271AF01F8DD6@yahoo.com> <alpine.BSF.2.20.1605032016280.37262@mail.fig.ol.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 03, 2016 at 08:20:46PM +0200, Trond Endrestøl wrote:
> On Tue, 3 May 2016 08:27-0600, Scott Long wrote:
> > > On May 3, 2016, at 12:20 AM, Mark Johnston <markj@FreeBSD.org> wrote:
> > > 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’ll put it in today.
> > 
> > Scott
> 
> A few of my stable/10 systems simple froze due to this bug. Would it 
> be possible for the kernel to detect when it's running low on (kernel) 
> memory, or when it's completely out of (kernel) memory, and call on 
> panic() only to limp away for a day or so before rebooting again?

I don't know of a mechanism in the kernel that would let you do this.
The closest thing I can think of would be a cron job that periodically
checks the amount of leaked memory with

  vmstat -m | awk '/CAM CCB/{print $(NF - 3)}'

and triggers a reboot once that value rises above some threshold.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160503235529.GA44671>