Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 2004 21:04:33 GMT
From:      Andrew Reiter <arr@watson.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/73177: kldload geom_* causes panic due to memory exhaustion
Message-ID:  <200410262104.i9QL4X57096259@www.freebsd.org>
Resent-Message-ID: <200410262110.i9QLAJuc010172@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         73177
>Category:       kern
>Synopsis:       kldload geom_* causes panic due to memory exhaustion
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 26 21:10:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Reiter
>Release:        5.3
>Organization:
FreeBSD
>Environment:
FreeBSD snackshop 5.3-STABLE FreeBSD 5.3-STABLE #17: Tue Oct 26 04:40:32 PDT 2004     root@snackshop:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
When attempting to load all the geom_* modules at once on the command line (kldload geom_*), GEOM seems to go into a loop which ends up exhausting memory and kmem_malloc() throws a panic().

The backtrace is as follows:
#0  doadump () at pcpu.h:159
#1  0xc060c271 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc060c52d in panic (
    fmt=0xc082a7f2 "kmem_malloc(%ld): kmem_map too small: %ld total allocated")
    at /usr/src/sys/kern/kern_shutdown.c:553
#3  0xc075ebc5 in kmem_malloc (map=0xc103a0c0, size=4096, flags=2)
    at /usr/src/sys/vm/vm_kern.c:300
#4  0xc076daae in page_alloc (zone=0xc10447e0, bytes=4096, pflag=0x0, wait=2)
    at /usr/src/sys/vm/uma_core.c:935
#5  0xc076d5ed in slab_zalloc (zone=0xc10447e0, wait=2)
    at /usr/src/sys/vm/uma_core.c:805
#6  0xc076ed40 in uma_zone_slab (zone=0xc10447e0, flags=258)
    at /usr/src/sys/vm/uma_core.c:1962
#7  0xc076ef60 in uma_zalloc_bucket (zone=0xc10447e0, flags=258)
    at /usr/src/sys/vm/uma_core.c:2071
#8  0xc076ebec in uma_zalloc_arg (zone=0xc10447e0, udata=0x0, flags=258)
    at /usr/src/sys/vm/uma_core.c:1889
#9  0xc06020de in malloc (size=4096, type=0xc0870820, flags=258) at uma.h:274
#10 0xc0622247 in devstat_alloc () at /usr/src/sys/kern/subr_devstat.c:503
#11 0xc0621a2d in devstat_new_entry (dev_name=0xc393e540, unit_number=-1,
    block_size=0, flags=DEVSTAT_ALL_SUPPORTED,
    device_type=DEVSTAT_TYPE_DIRECT, priority=DEVSTAT_PRIORITY_MAX)
    at /usr/src/sys/kern/subr_devstat.c:82
#12 0xc05da85b in g_new_consumer (gp=0xc3983200)
    at /usr/src/sys/geom/geom_subr.c:365
#13 0xc05da1a7 in g_slice_new (mp=0xc08ad620, slices=8, pp=0xc153e300,
    cpp=0x0, extrap=0xc7abcc44, extra=592, start=0)
    at /usr/src/sys/geom/geom_slice.c:472
#14 0xc07a1d41 in g_bsd_taste (mp=0xc08ad620, pp=0xc153e300, flags=0)
    at /usr/src/sys/geom/geom_bsd.c:488
#15 0xc05da2fb in g_load_class (arg=0x0, flag=0)
    at /usr/src/sys/geom/geom_subr.c:106
#16 0xc05d81f8 in one_event () at /usr/src/sys/geom/geom_event.c:180
#17 0xc05d8269 in g_run_events () at /usr/src/sys/geom/geom_event.c:200
#18 0xc05d94ad in g_event_procbody () at /usr/src/sys/geom/geom_kern.c:134
#19 0xc05f760d in fork_exit (callout=0xc05d948c <g_event_procbody>, arg=0x0,
    frame=0xc7abcd48) at /usr/src/sys/kern/kern_fork.c:811
#20 0xc07a5f6c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209

>How-To-Repeat:
Build RELENG_5 from 10/25/2004 around 17:00 hours PDT
Once built/installed/running:

  cd /boot/kernel
  kldload geom_*


>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:



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