From nobody@FreeBSD.org  Wed Apr  8 14:49:26 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76CAB106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  8 Apr 2009 14:49:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 652358FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  8 Apr 2009 14:49:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n38EnPWj058087
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 8 Apr 2009 14:49:25 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n38EnPUY058086;
	Wed, 8 Apr 2009 14:49:25 GMT
	(envelope-from nobody)
Message-Id: <200904081449.n38EnPUY058086@www.freebsd.org>
Date: Wed, 8 Apr 2009 14:49:25 GMT
From: Terry <plethora87@aim.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 'kmem_map too small' panic on Dell r900 when bpf_bufsize and bpf_maxbufsize are increased
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133490
>Category:       kern
>Synopsis:       [bpf] [panic] 'kmem_map too small' panic on Dell r900 when bpf_bufsize and bpf_maxbufsize are increased
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 08 14:50:04 UTC 2009
>Closed-Date:    
>Last-Modified:  Wed Apr 15 14:20:09 UTC 2009
>Originator:     Terry
>Release:        7.1
>Organization:
Army
>Environment:
FreeBSD schnozz-nap-a 7.1-RELEASE FreeBSD 7.1-RELEASE #3: Wed Apr  1 11:04:28 EDT 2009     root@schnozz-nap-a:/usr/obj/usr/src/sys/CCSP-KERNEL  i386
>Description:
When increasing bpf_bufsize and bpf_maxbufsize to, say, 4MB in sysctl.conf, the machine immediately panics upon getting to the "login" prompt on reboot.  

The system is quad-core Xeon with two Intel 10GE NICs (82598EB).  Kernel is standard except for:

options         DEVICE_POLLING  
options         HZ=1000

Just increasing bpf_bufsize doesn't cause the problem.  It only panics when both values are increased.

Apr  8 10:17:32 schnozz-nap-a savecore: reboot after panic: kmem_malloc(4194304): kmem_map too small: 333324288 total allocated

>How-To-Repeat:
In sysctl.conf:

net.bpf.bufsize=4194304
net.bpf.maxbufsize=4194304

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 13 05:29:45 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133490 

From: plethora87@aim.com
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/133490: [bpf] [panic] 'kmem_map too small' panic on Dell r900 when
 bpf_bufsize and bpf_maxbufsize are increased
Date: Wed, 15 Apr 2009 10:00:04 -0400

 If I set the net.bpf buffers after boot-up, there's no immediate crash. 
  But I just had a crash after a couple days of uptime:
 
 Dump header from device /dev/mfid0s1b
   Architecture: i386
   Architecture Version: 2
   Dump Length: 456548352B (435 MB)
   Blocksize: 512
   Dumptime: Wed Apr 15 09:04:06 2009
   Hostname: schnozz-nap-b
   Magic: FreeBSD Kernel Dump
   Version String: FreeBSD 7.1-RELEASE #3: Wed Apr  1 11:04:28 EDT 2009
     root@schnozz-nap-a:/usr/obj/usr/src/sys/CCSP-KERNEL
    Panic String: kmem_malloc(16777216): kmem_map too small: 326787072 
 total allocated
   Dump Parity: 366409564
   Bounds: 7
   Dump Status: good
 
 I can upload the core file somewhere if it would be helpful.
 
 -Terry
 
 
>Unformatted:
