From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 15 03:40:01 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63D9516A475 for ; Sat, 15 Dec 2007 03:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A7F213C4E3 for ; Sat, 15 Dec 2007 03:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBF3e1Ak015790 for ; Sat, 15 Dec 2007 03:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBF3e1D5015789; Sat, 15 Dec 2007 03:40:01 GMT (envelope-from gnats) Resent-Date: Sat, 15 Dec 2007 03:40:01 GMT Resent-Message-Id: <200712150340.lBF3e1D5015789@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, Michael Haro Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6C2E16A46B for ; Sat, 15 Dec 2007 03:36:53 +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 8E58A13C447 for ; Sat, 15 Dec 2007 03:36:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBF3agqo016356 for ; Sat, 15 Dec 2007 03:36:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id lBF3agJ1016355; Sat, 15 Dec 2007 03:36:42 GMT (envelope-from nobody) Message-Id: <200712150336.lBF3agJ1016355@www.freebsd.org> Date: Sat, 15 Dec 2007 03:36:42 GMT From: Michael Haro To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/118713: Display media size required for a kernel dump X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2007 03:40:01 -0000 >Number: 118713 >Category: kern >Synopsis: Display media size required for a kernel dump >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 15 03:40:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Michael Haro >Release: 7.0-beta4 >Organization: >Environment: >Description: My raw swap partition is smaller than the amount of ram on my system. This is okay since freebsd now has minidump support and it doesn't require swap to be the same size as ram. Unfortunately I was still unable to save a dump when a kernel panic occured. The attached patch displays the size required. I assume you could do a better job at making the output pretty, but this does the job and answered my question, allowing me to resize some partitions so I'd have enough swap space to capture dumps. >How-To-Repeat: Enter a condition that causes a kernel panic and have a swap partition that's too small to dump to. >Fix: --- i386/i386/minidump_machdep.c.orig 2007-04-06 11:15:02.000000000 -0700 +++ i386/i386/minidump_machdep.c 2007-12-07 00:04:48.373609771 -0800 @@ -375,9 +375,12 @@ if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == ENOSPC) + else if (error == ENOSPC) { printf("\nDump failed. Partition too small.\n"); - else + printf("media size (%llu) < required space (%llu)\n", + (unsigned long long)di->mediasize, + SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); } >Release-Note: >Audit-Trail: >Unformatted: