From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 6 01:40:19 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7524016A4CE for ; Sat, 6 Dec 2003 01:40:19 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3876743FDF for ; Sat, 6 Dec 2003 01:40:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hB69eHFY012867 for ; Sat, 6 Dec 2003 01:40:17 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hB69eHbS012866; Sat, 6 Dec 2003 01:40:17 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 6 Dec 2003 01:40:17 -0800 (PST) Resent-Message-Id: <200312060940.hB69eHbS012866@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Colin Percival Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48FC116A4CE for ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/59988: undocumented panic with large malloc-backed md X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Colin Percival List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2003 09:40:19 -0000 >Number: 59988 >Category: bin >Synopsis: undocumented panic with large malloc-backed md >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 06 01:40:16 PST 2003 >Closed-Date: >Last-Modified: >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 >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: >Unformatted: