From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 7 12:20:03 2008 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 481DC10656B0 for ; Tue, 7 Oct 2008 12:20:03 +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 24A368FC17 for ; Tue, 7 Oct 2008 12:20:03 +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 m97CK2DC095868 for ; Tue, 7 Oct 2008 12:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m97CK2jU095867; Tue, 7 Oct 2008 12:20:02 GMT (envelope-from gnats) Resent-Date: Tue, 7 Oct 2008 12:20:02 GMT Resent-Message-Id: <200810071220.m97CK2jU095867@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, pluknet Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CECF1065699 for ; Tue, 7 Oct 2008 12:16:13 +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 7B56A8FC08 for ; Tue, 7 Oct 2008 12:16:13 +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 m97CGDEw014431 for ; Tue, 7 Oct 2008 12:16:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id m97CGDHm014430; Tue, 7 Oct 2008 12:16:13 GMT (envelope-from nobody) Message-Id: <200810071216.m97CGDHm014430@www.freebsd.org> Date: Tue, 7 Oct 2008 12:16:13 GMT From: pluknet To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/127917: [patch] dumpon rejects on start with physmem>swap even with minidump=1 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: Tue, 07 Oct 2008 12:20:03 -0000 >Number: 127917 >Category: misc >Synopsis: [patch] dumpon rejects on start with physmem>swap even with minidump=1 >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: Tue Oct 07 12:20:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: pluknet >Release: 6.2-R >Organization: RIPN >Environment: FreeBSD jaw.ripn.net 6.2-RELEASE-p12 FreeBSD 6.2-RELEASE-p12 #86: Tue Oct 7 15:43:58 MSD 2008 root@jaw.ripn.net:/usr/obj/usr/src/sys/JAW i386 >Description: Minidump feature allows to dump kcore even with physical memory less than size of a swap device. $ sysctl debug.minidump=0 debug.minidump: 1 -> 0 $ /etc/rc.d/dumpon start /dev/ad0s1b is smaller than physical memory $ sysctl debug.minidump=1 debug.minidump: 0 -> 1 $ /etc/rc.d/dumpon start kernel dumps on /dev/ad0s1b All right. But it does not always work on boot (of course, with properly set debug.minidump=1 in /etc/sysctl.conf) and we have on boot: /dev/ad0s1b is smaller than physical memory. >How-To-Repeat: Get a lesser swap slice then phys memory size. Set sysctl debug.minidump=1 in /etc/sysctl.conf Place dumpdev="/dev/ad0s1b" (according to your setup) in /etc/rc.conf Reboot. >Fix: That's because /etc/rc.d/dumpon starts before /etc/rc.d/sysctl. To be fixed. ----------- --- /etc/rc.d/dumpon.orig Tue Oct 7 16:09:52 2008 +++ /etc/rc.d/dumpon Tue Oct 7 15:49:42 2008 @@ -5,6 +5,7 @@ # PROVIDE: dumpon # BEFORE: disks savecore initrandom +# REQUIRE: sysctl # KEYWORD: nojail . /etc/rc.subr ----------- After fix (dmesg -a): --- /dev/ad0s1d: clean, 417342 free (694 frags, 52081 blocks, 0.1% fragmentation) net.inet6.ip6.auto_linklocal: 1 -> 0 hw.syscons.bell: 1 -> 0 debug.minidump: 0 -> 1 kernel dumps on /dev/ad0s1b Entropy harvesting: --- >Release-Note: >Audit-Trail: >Unformatted: