From owner-freebsd-current@FreeBSD.ORG Sat Jul 26 13:06:06 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1890937B401 for ; Sat, 26 Jul 2003 13:06:06 -0700 (PDT) Received: from mailhost1.dircon.co.uk (mailhost1.dircon.co.uk [194.112.32.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D47BF43F85 for ; Sat, 26 Jul 2003 13:06:04 -0700 (PDT) (envelope-from mark@exonetric.com) Received: from exonetric.com (unknown [195.157.223.200]) by mailhost1.dircon.co.uk (Postfix) with ESMTP id 8E06E58E48 for ; Sat, 26 Jul 2003 21:06:01 +0100 (BST) Date: Sat, 26 Jul 2003 21:06:02 +0100 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed From: Mark Blackman To: freebsd-current@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <95013A6C-BFA4-11D7-A23D-00039315D3FE@exonetric.com> X-Mailer: Apple Mail (2.552) Subject: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2003 20:06:06 -0000 Hi all, I'm seeing the same 'kmem_malloc(4096): kmem_map too small: XXXXX total allocated' messages that a few other have reported. Now, I understand that setting kern.vm.kmem.size larger is supposed to help, but I'm using a 128M Celeron-650 i386 system with no unusual devices (expect perhaps a Speedtouch ADSL modem) and I've progressively set the kern.vm.kmem.size to larger and larger values, starting at 64MB, then 96MB and finally 128MB. As I approached the physical memory size of the machine (128MB), the panic problem failed to reappear, but I got another problem whereby the kernel appeared to take over all of memory (i.e. processes were gradually all getting swapped out, but no other process seemed to be taking the memory) within about 30 minutes of boot-up. I noticed in the final minutes of the case where kmem.size=128MB (i.e. all of physical RAM), that kern.malloc was reporting 100M of 'devbuf' memory allocations and that it was gradually increasing at about 25k per second. I can't believe this is normal behaviour, but I'm no expert. I believe the devbuf allocations are specifically for device drivers. From these symptoms, I'm speculating that one or more device drivers are producing kernel memory leaks and either triggering the 'kmem_map too small' messages or pushing all of the userland processes out of the way. Is this a reasonable interpretation? Does anyone else see symptoms that might lead to this conclusion? As a side note, I also briefly witnessed scrolling errors like 'ad0: out of memory in start'. I have no idea if this implies the 'ad' driver is an issue. Regards, Mark Blackman Exonetric Consulting