From owner-freebsd-bugs Mon Feb 27 11:02:15 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id LAA02459 for bugs-outgoing; Mon, 27 Feb 1995 11:02:15 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id LAA02451 for ; Mon, 27 Feb 1995 11:02:08 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id FAA16373; Tue, 28 Feb 1995 05:56:28 +1100 Date: Tue, 28 Feb 1995 05:56:28 +1100 From: Bruce Evans Message-Id: <199502271856.FAA16373@godzilla.zeta.org.au> To: ROBIN@ptnsct.nis.za, davidg@Root.COM Subject: Re: MB_MAP FULL SYSTEM CRASH Cc: bugs@FreeBSD.org Sender: bugs-owner@FreeBSD.org Precedence: bulk >>Now the old girl occasionaly (on a whim) says: "MB_MAP FULL" and crashes >>completely so it has to be reset. > The mb_map full message is only generated once and is just informational. >Are you sure that the panic occurs just after this appears, or is it possible >that it occurred sometime earlier? >>Any ideas to help? > I need more information before I can help. I need the panic message and any >additional information that may be printed before it. I thought this was well known. kmem_malloc() panics if mb_map is full and (waitflag == M_WAITOK). If (waitflag != M_WAITOK) when the map is first found to be full, then m_clalloc() prints "mb map full". If the full condition persists, then kmem_malloc() eventually gets called with (waitflag == M_WAITOK) and panics with the message "kmem_malloc: map too small" (it stupidly doesn't tell you which map). I use the following kludgy fix. It works because all allocations of mb_map go through ml_clalloc(), and ml_clalloc() handles the NULL return value even in the M_WAITOK case. Another problem is that if mb_map fills up due to transient loads, the 1 or 2MB of memory in it is never released. This would not work well on systems with 2 or 4MB of memory. Bruce *** vm_kern.c~ Wed Feb 22 08:49:18 1995 --- vm_kern.c Wed Feb 22 08:49:47 1995 *************** *** 303,313 **** if (vm_map_findspace(map, 0, size, &addr)) { vm_map_unlock(map); ! #if 0 ! if (canwait) /* XXX should wait */ ! panic("kmem_malloc: %s too small", ! map == kmem_map ? "kmem_map" : "mb_map"); ! #endif ! if (waitflag == M_WAITOK) ! panic("kmem_malloc: map too small"); return (0); } --- 303,308 ---- if (vm_map_findspace(map, 0, size, &addr)) { vm_map_unlock(map); ! if (waitflag == M_WAITOK && map != mb_map) ! panic("kmem_malloc: kmem_map too small"); return (0); }