wired memory leak at r298785

Mark Johnston markj at FreeBSD.org
Tue May 3 23:51:51 UTC 2016

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 at 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.

More information about the freebsd-current mailing list