From cperciva@builder.daemonology.net  Sat Dec  6 01:38:57 2003
Return-Path: <cperciva@builder.daemonology.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 48FC116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Dec 2003 01:38:57 -0800 (PST)
Received: from builder.daemonology.net (h24-87-233-42.vc.shawcable.net [24.87.233.42])
	by mx1.FreeBSD.org (Postfix) with SMTP id A02A043FE1
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Dec 2003 01:38:55 -0800 (PST)
	(envelope-from cperciva@builder.daemonology.net)
Received: (qmail 55359 invoked by uid 1000); 6 Dec 2003 09:37:10 -0000
Received: (for user cperciva)
Message-Id: <20031206093710.55357.qmail@builder.daemonology.net>
Date: 6 Dec 2003 09:37:10 -0000
From: Colin Percival <cperciva@builder.daemonology.net>
Reply-To: Colin Percival <cperciva@builder.daemonology.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: undocumented panic with large malloc-backed md
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59988
>Category:       bin
>Synopsis:       undocumented panic with large malloc-backed md
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 06 01:40:16 PST 2003
>Closed-Date:    Fri Jan 02 06:28:28 PST 2004
>Last-Modified:  Fri Jan 02 06:28:28 PST 2004
>Originator:     Colin Percival
>Release:        
>Organization:
>Environment:
>Description:

  Large malloc-backed memory disks will cause 5.x systems to panic when they 
are filled.  This isn't documented anywhere.

>How-To-Repeat:

mdconfig -a -t malloc -s 300M -u 0
dd if=/dev/zero of=/dev/md0 bs=1048576 count=300
<do anything which requires kernel memory>

>Fix:

  Document the panic in mdconfig.8

--- src/sbin/mdconfig/mdconfig.8.orig   Sat Dec  6 09:20:15 2003
+++ src/sbin/mdconfig/mdconfig.8        Sat Dec  6 09:26:44 2003
@@ -91,6 +91,11 @@
 Storage for this type of memory disk is allocated with
 .Xr malloc 9 .
 This limits the size to the malloc bucket limit in the kernel.
+If the
+.Fl o Cm reserve
+option is not set, creating and filling a large
+malloc-backed memory disk is a very easy way to
+panic a system.
 .It Cm vnode
 A file specified with
 .Fl f Ar file
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Fri Jan 2 06:28:19 PST 2004 
State-Changed-Why:  
committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59988 
>Unformatted:
